IR Detect Circuit

Hello, this is my first post on Arduino Community. I am in trouble for weeks trying to create a simple IR Emit/Detect module.

I have an IR Led (Emitter - 950nm) hooked up and powered up on my arduino. It looks to emit IR light :slight_smile: . Now I have a Phototransistor (900nm - Dark LED IR Receiver), connected on my board.

I want to analog read the value from the IR Phototransistor, when there is a IR Led close. I think I hooked up wrong the LEDs, but I am totally newbie to electronics.

Any advice on how should I do the connection. Am I missing something?

hptb5-14d-b.png

09349-1.png

Can you provide a picture or drawing of how the LED and phototransistor are connected? Please include your code (in code tags, please). You say it "looks to emit IR light". Does that mean that you have seen the LED emitting with a phone or digital camera?

From the datasheet (http://grobotronics.com/images/datasheets/hptb5-14d-b.pdf) it looks like you would use about a 500 Ohm pull-up on the analog input pin and connect the phototransistor between the pin and Ground.

The short pin (collector) goes to the Arduino pin and the long pin (emitter) goes to Ground.