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:
- 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.
- 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?