Trying to read ANYTHING from this IR detector

I have this IR emitter/detector pair that I got from Radioshack. (Part 276-142) The thing is, I know it works, but I can't seem to get it working with the Arduino. These are the steps I took:

  1. I first wanted to make sure it worked. To do this, I hooked up the IR detector with an NPN transistor and a 5mm LED without an Arduino like so:

When I operate one of the plastic Apple remotes next to the detector, the LED flashes very dimly, so I know the detector works.

  1. I then proceeded to load the "button" sketch from the examples and moved the LED to pin 13, putting a wire connected to Digital pin 2 in its place. When I fired it up, the LED did nothing as I pressed buttons on the Apple remote.

I whipped up a "voltmeter" sketch to see what was actually going on with the detector. Switching the wire from digital pin 2 to analog pin 0, I now had this:

My voltmeter sketch told me that each time I fired the Apple remote, the voltage to the analog pin would go from 0.00 to 0.01 between flashes. That's not even close to the 3V needed for a "HIGH" input. Then I realized that transistors amplify current, not voltage. I have a feeling that I need to either redesign my entire circuit or buy a new IR sensor. What do I do?


The IR emitter/detector pair that you bought are designed to work together, but it seems that you are trying to use just detector with another emitting device. Most garden variety IR remotes produce bursts of 38 - 40 KHz IR pulses. To detect the signals from one of those remotes you want to use what is commonly called a "38 KHz Infrared Receiver Module". They aren't expensive and you may be able to extract one from almost any junked electronics device nowadays. Look for a metal device about 1/2" x 1/2" x 1/2" in size with three leads. Obviously (I hope) it will be right up front behind a plastic window.


Thanks for being the first to reply after 20 other people.

It was as simple as getting a new part. Alright, I'll just go get that part tomorrow from Radioshack.

Also in your drawing you are showing a LED wired to pin 13, without a series current limiting resistor. There is a good chance you can burn out the Arduino pin 13 and/or the LED without such a resistor. Around a 200 ohm resistor works good.


That way of wiring up the sensor is back to front, as you have found it will never work like that. You need the emitter of the transistor to ground and the resistor in the collector to +5. Then connecting the collector to the input pin will show when it detects IR.

You can also change the value of your resistor to get a greater value through the analog read (use a variable to test).


As the photo transistor is in a darlington arrangement there is not much affect on the reading by changing the resistor. It is a different matter if the photo transistor was being used by itself.