Radioshack IR emitter / detector pair
jzbruno
Posts: 2
Hello I have been working through the BASIC Stamp manual and am having fun. I am trying to make a photogate system and am stuck on getting the ir emitter / detector to work.
I know the emitter works by using a digital camera to see the ir light.
I found this forum post http://forums.parallax.com/showthread.php?p=596666 that says they used the circuit on the bottom right of page 2 of this pdf www.parallax.com/dl/docs/prod/robo/QTILineFollow.pdf With no luck.
I think the problem is in getting the detector to work. How do I wire the detector to the vdd / vss and p3? I have a program written to detect a 1 or 0 in p3 (IN3).
I prefer to stick to the ir emitter / detector alone as those are what I have. Any advice is appreciated.
JB
I know the emitter works by using a digital camera to see the ir light.
I found this forum post http://forums.parallax.com/showthread.php?p=596666 that says they used the circuit on the bottom right of page 2 of this pdf www.parallax.com/dl/docs/prod/robo/QTILineFollow.pdf With no luck.
I think the problem is in getting the detector to work. How do I wire the detector to the vdd / vss and p3? I have a program written to detect a 1 or 0 in p3 (IN3).
I prefer to stick to the ir emitter / detector alone as those are what I have. Any advice is appreciated.
JB
Comments
Pretty much all transistors are sensitive to light including IR light, but they're normally packaged in an opaque package. Phototransistors are simply transistors packaged in transparent packages. Sometimes one is packaged in a housing opaque to visible light, but transparent to IR light.
The particular phototransistor that RadioShack sells has its emitter and collector leads brought out to pins. The base lead is not connected since light serves as the input. Basically, connect the emitter to ground (Vss). Connect a resistor to +5V (Vdd). Any value from 1K to 10K will work fine. The other end of the resistor is connected to both the phototransistor's collector and a Stamp I/O pin. What you will find is that the I/O pin is normally HIGH (1). When the light level gets high enough, the I/O pin will become LOW (0). That's it!
What you will also find is that the phototransistor is also very sensitive to ambient light which will make it pretty useless unless you keep the IR emitter very close or restrict ambient light with some kind of barrier (like a narrow tube restricting the field of view).
In room light or daylight, you really have to use a pulsed light beam and a photodetector with an electronic filter that only responds to light pulsing at a particular frequency. That's what most IR remote controls use and the IR detectors that Parallax (and others) sell. Read the tutorial "IR Remote for the BOEBOT" which you can download from Parallax (under the Stamps in Class Downloads menu). It goes into more detail on this subject.
JB
PS I now understand the internal difference.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--DFaust
On the other hand, photoresistors respond to a much wider range of light levels.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--DFaust