IR Emitters & Receiver Module Question
DataJ
Posts: 23
Gentlemen - -
I have just about completed a small HO model train switching display using an OEM BS-2 Stamp.
Train detection is being accomplished via the IR emitter and Receiver Module·as delineated in
the BOE-BOT manual, and it has worked properly when one output pin is used for the emitter and
a separate line for the input.··The code, "Freqout 1, 2, 38500,·works as advertised, but only at 2 ms rate.
My problem is, that in order to save output pins, I have tied two of the IR emitters to one of the output
pins on the Stamp, and again used the code, "Freqout 1, 2, 38500.· However, the addition of the second emitter causes erratic returns from the receivers.
I have just about concluded that each IR Emitter must have a dedicated output·pin, just as each receiver
must have a dedicated input pin.
Any thoughts about this would be appreciated.
Thank you for your assistance.
Regards,
Jim
I have just about completed a small HO model train switching display using an OEM BS-2 Stamp.
Train detection is being accomplished via the IR emitter and Receiver Module·as delineated in
the BOE-BOT manual, and it has worked properly when one output pin is used for the emitter and
a separate line for the input.··The code, "Freqout 1, 2, 38500,·works as advertised, but only at 2 ms rate.
My problem is, that in order to save output pins, I have tied two of the IR emitters to one of the output
pins on the Stamp, and again used the code, "Freqout 1, 2, 38500.· However, the addition of the second emitter causes erratic returns from the receivers.
I have just about concluded that each IR Emitter must have a dedicated output·pin, just as each receiver
must have a dedicated input pin.
Any thoughts about this would be appreciated.
Thank you for your assistance.
Regards,
Jim
Comments
If you just parallel two IR emitters, each one gets only half as much current and produces roughly half as much light.
If you parallel two IR emitters, each with its own current limiting resistor, you may be trying to draw more current than the Stamp can supply.
It's impossible to tell without more information.
I have changed the resistors all the way down to 220 ohms, running two emitters - - well below the stamp's output
limits. (I have had one set running with 1k ohms on the emitter and 1k on the rcvr - no problem).
My question is more theory -- i.e., is it possible to have several emitters operate from one output pin, given that the power and current source is adequate.
I cannot determine any reason why several emitters cannot be tied to one output provided the power requirements
are met.
Thanks,
Jim
You need to look at the datasheet for the Stamp and the PIC16C57 that it's based on. There's a specification for the output voltage at different currents and you need that to determine the proper resistor value.
Thank you for your reply·- - I had some·reservations when connecting the emitters in
parallel, but thought that since there was only two of them, it would work.· I will give·it a
try with a separate resistor to each and see if it will·operate.· If so,·that will confirm that
the system will·perform as planned.
The·stamp·will need an outboard component in order to handle the current requirements
for the 5 emitters, and I have·found various circuits on the Parallax website that can·handle this.
This is my first full-fledged·project with a microcontroller, and, it has been quite an event - far different
than experimenting·with the BOE.
Regards,
Jim
I have made the changes based upon your analysis and recommendations, and, the two emitters & IR receiver circuits are working·just fine.
Thank you again for your help - it is much appreciated.
Regards,
Jim