Let's Make Robots!

IR sensor-Again

I have again problems with my IR-sensors. 

I have two of these http://www.dfrobot.com/index.php?route=product/product&path=36_55&product_id=114 connected to input pin 6 and 7 on my 28x1 picaxe projectboard. And even when there's no program on the microcontroller the sensors think that there's something infront of them, but there isn't.

This is for my http://letsmakerobots.com/node/31232 robot.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

these things pull low when they sense something. so you'll want a 10k pullup resistor from the input to V. Plus, the light will be on even if it's not seeing something, and will be brighter if it sees something. if there is no change at all in the light, you're hooked up wrong.

This sensor is not an analog sensor it just provides a HIGH or LOW. You have to set the treshhold by adjusting the screw (say 30cm) by trying. If this treshold is reached then the sensor switches.


Even when i turn the screw and do what i think what i should do, the sensors think that there's something infront of them.

Then make sure you turn in the right direction ;-)

No kidding, I was turning them on my setup a lot left, right, left and again right...then I checked the data sheet and saw that the minimum distance was lower than I expected. they arre working in a small range only...try it out.

Edit: Oh yeah...use the serial monitor to watch the values while turning the screw.

Apparently there's a pot on the back you can use to adjust the trigger threshold, try adjusting this.