So as a class project we are trying to make laser tag tanks using IR. We have gotten to the point where we can transmit a signal with an IR LED and receive it with an IR receiver. We had our teacher order us some parts but he accidentally got something slightly different. The first thing we noticed is that the new receiver looked like a black LED and had two legs instead of three. We tried using it with some code we modified from the link below.
(Robotix: How to Use IR LED and Photodiode with Arduino)
When we tried it we got random signals from the serial. Sometimes it changed when we turned on the IR LED, but sometimes it had absolutely no effect. So my question is weather we should order the three leg ones or if there's a way to make these work somehow.
So my question is weather we should order the three leg ones or if there's a way to make these work somehow.
There might be a way to make it work but you must tell us what the part number of this device actually is.
ChaseD:
We have gotten to the point where we can transmit a signal with an IR LED and receive it with an IR receiver.
What signal.
If it's a modulated (e.g. 38kHz) signal, then you must use an IR receiver with amplifier and buildin demodulator (3-pin).
If it's unmodulated IR light (e.g. a laser), then you can only use a 2-pin photo diode.
An unmodulated IR light system is sensitive to static (sun) light, and the 50/60Hz from mains powered lights, and can really only be used in the dark.
Leo..