IR photodiode transmitter/receiver

I'm quite certain I'm doing something wrong, but not sure what.

I'm trying to make a "tripwire" using IR, because I'd like to use it in photography and don't want any visible light in the photos.

I bought two cheap IR photodiodes, a transmitter and a receiver. I guess they are normally used for remotes.

First about the transmitter. It looks similar to normal LEDs (the head is much smaller tho), but one leg is shorter so I assume it works the same way, except you can't see anything (tip: if you see light coming out of your IR LED theres something terribly wrong!). Problem is, it seems to be terribly weak if I plug it over a resistor. If I plug it directly (eg. one side to pin 13 and the other GND), the other LED that is connected in parallel on the same PIN stops working. With normal LEDs, I can connect 5 in parallel on the same pin and they will keep working, but with this one it's like its doing something bad.

As far as the receiver, I'm not sure if I'm using it correctly. I tried plugging it similarly to a photoresistor that I've been playing with earlier (and it works great) to analog input, but it works different. First of all, it's a diode, so the polarity matters (which is fine), but when I plug it in, it works only if I put the source really close. I kinda hoped it would work from at least a few feet (like a normal remote would).

Do you have any advice? Can you tell me how to properly connect these parts?

What is visible to you and visible to your camera could be two very different things. If you are doing digital photography then the IR light could easily show up. Make no mistake, CCDs can see IR just fine! Normal film may not be as sensitive but is still probably at least marginally reactive to IR.

You do want to use a resistor with an IR LED. It won't necessarily be the same one you'd use on a normal red LED. You have to calculate the current flow given the LED's voltage drop and max amperage. IR LEDs can usually take 100ma so if the drop is 1.8 and you are feeding with 5V then the proper resistor would be 32 ohms. I think a 33 ohm would be closest reasonably common size. Also, to get better range you want a finer viewing angle. Sending the IR energy over a 30 degree angle is not good if all you want is a trip beam. Find the smallest angle possible.

You probably aren't doing anything wrong with the photodiode but maybe it's not really what you want. You might need the higher gain of a phototransistor. It's also possible to actually use a photodiode backwards of the way you normally would and get more gain and a lot more noise. Rather than do that I'd use a phototransistor with lots of gain.

Thanks for your reply!

Most modern SLRs usually have a filter on the CCD that doesn't allow IR to be recorded. Some snapshot cameras have a nightvision mode that can be used to record IR. Its easy to test, just use any IR remote and try to take a picture. IR is often used in photography as a cheaper alternative to other invisible triggering mechanisms like radio.

I figured that the phototransistor would be better/easier to use. It's still strange to me how my TV can detect the signal from across the room and when I test the remote with my IR diode using processing, it doesn't detect anything farther than 5 cm.

I also tried recording the sequence from my camera remote and replaying it using the IR LED, but it didn't work :frowning: The smallest resistor I currently have is about 200 ohms, so I couldn't really test that, but even when I use that resistor it completely shuts down other LEDs in parallel. Is that normal? I'm asking cause I don't want to harm my new Arduino.

The filter may reduce the amount of IR that the CCD registers, but it will still detect it far more readily than your eyes will.

the other LED that is connected in parallel on the same PIN stops working.

Yes they will, each LED needs it's own resistor if not then the LED with the lowest turn on voltage will rob the others of voltage and they won't be able to turn on.

I guess they are normally used for remotes.

No a remote doesn't use a photo diode, it uses a detector with an integrated amplifier, also the IR bean is modulated, this allows more gain in the amplifier without saturating from ambient IR.

I'm asking cause I don't want to harm my new Arduino.

If you use an LED without a resistor you are damaging your Arduino.