Re: Newbee: Optocoupler to BasicStamp
- From: John Popelish <jpopelish@xxxxxxxx>
- Date: Thu, 06 Oct 2005 22:12:30 -0400
Sam wrote:
I just ordered some 4N28s. While I am waiting for them to arrive I thought I would play around a bit. I just cracked open a mouse and removed the photo transistors, but cant get the circuit to work.
I have the center leg (base?) going to the input on my Stamp it is also pulled up by a 10K resistor. I have tried grounding both (not at the same time) other legs of the photo transistor, straight to ground and also through various resistors.
I cant get the Stamp to detect on/off states. Any suggestions on where my circuit went wrong?
For most sensitivity, you leave the base unconnected, so the charges generated by light build up the maximum base voltage to turn the transistor on. But every photo transistor I have seen in a mouse doesn't even have the base connection brought out to a pin. They are usually two pin devices, just collector and emitter, NPN devices.
I would connect the emitter to ground and use a 10k pull up resistor to the positive supply. Then when you shine light on the transistor, it should pull down the resistor voltage to within about a half volt of zero. When kept in the dark, the resistor voltage should approach the positive supply voltage. Something like this:
+5V
|
.-.
| |
| |
'-'
+--output
|
|/
-|
|>
|0V (created by AACircuit v1.28.4 beta 13/12/04 www.tech-chat.de)
Once you get that to work, you can make an opto coupler out of that by sticking the infrared LED part of the mouse, lens to lens, against the photo transistor, with a drop of 5 minute epoxy.
drive the LED through a 470 ohm resistor from the 5 volt supply, and you should be able to swing the photo transistor on and off via that light source. Then paint the whole thing black, to keep out stray light.
.
- Follow-Ups:
- Re: Newbee: Optocoupler to BasicStamp
- From: Sam
- Re: Newbee: Optocoupler to BasicStamp
- References:
- Newbee: Optocoupler to BasicStamp
- From: Sam
- Re: Newbee: Optocoupler to BasicStamp
- From: John Popelish
- Re: Newbee: Optocoupler to BasicStamp
- From: Sam
- Re: Newbee: Optocoupler to BasicStamp
- From: John Popelish
- Re: Newbee: Optocoupler to BasicStamp
- From: Sam
- Re: Newbee: Optocoupler to BasicStamp
- From: John Popelish
- Re: Newbee: Optocoupler to BasicStamp
- From: Sam
- Newbee: Optocoupler to BasicStamp
- Prev by Date: Re: Newbee: Optocoupler to BasicStamp
- Next by Date: Re: Newbee: Optocoupler to BasicStamp
- Previous by thread: Re: Newbee: Optocoupler to BasicStamp
- Next by thread: Re: Newbee: Optocoupler to BasicStamp
- Index(es):
Relevant Pages
|