Infrared Emitter and Phototransistor for 2-3 feet

Hi, I was trying to use this pair of Infrared LED and Phototransistor with a Arduino project and so far everything works. The problem is that the distance between the two can't be more than 2-4 inches... Am I doing something wrong? Should I find another solution? Will a brighter IR LED increase the distance, or do I need a more sensitive Phototransistor? Both?

This is what I got: Matched Infrared Emitter and Phototransistor Detector -

This is the schematic I'm using:

TIA -ioan

Depends how they are arranged. If side by side and you're trying to detect reflected IR, then this seems about right. If the emitter is pointing at the detector 2-4 ft, or even metres, would be more like it.

They are pointing at each other and I get only max 4 inches... I even inserted both of them in a tube with the interior the size of the LED/pPhototransistor circumference and length of about 12 inches and they can't see each other.

Am I doing something wrong?

What size resistor are you using on the emitter? Maybe to much resistance.

For the emitter LED I'm using 470 ohm, and for the phototransistor 10 K.

Try 100 ohm for the LED. Check the data for the LED. IR ones should have an If max of 100mA or so. If this is the case you could probably take the resistor down as far as 47 ohm

Even with 47 ohm I get only few inches.

Why don’t you take your TV remote control and point it at your detector and see if the distance increases or not. If not then you probably need a better detector or you could try a amplifer stage after the detector to increase it’s gain.


I get about the same range when I point the remote control at the phototransistor. Can you point me in the right direction on how to build an amplifier for the detector?

One other thing; what pins are you using? You might look at the section on "DIGITAL PINS"

If you are using pin 13 it might be the problem. See NOTE under pullup resistors.

Rather than make an amp, why not buy a 38kHz IR detector? It will mean you have to modulate the LED, but you will get much better range and won't be so badly affected by high DC light levels.

@garym: I'm using rbbb board. This one doesn't have a resistor on pin 13.

@AWOL: I was researching what other options I have and, just like you said, I saw that are IR detectors available, even sparkfun sells one I think. I'm not an electronics guy, how hard is to make a modulator for the IR LED?

What I'm trying to make is a beam-break detector to replace a mechanical button that triggers an event in my project. The solution should be cheap because I'm trying to make a sellable product and I'm at the upper limit already :-)

how hard is to make a modulator for the IR LED

Well, it depends on how busy doing other things your Arduino is - it could be software (if it isn't very busy) or it could be something like a 555 plus couple of resistors and capacitiors (if it is busy). All you need is 38kHz square wave.

For anyone interested in how to do this, Ken Shirriff's blog has an example using the Arduino IR Library:

Have you read the single customer comment on that page - about there being two versions of the phototransistor of different sensitivities?