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 https://www.robotshop.com/letsmakerobots/node/31232 robot.

Apparently there’s a pot on

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

This sensor is not an analog

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.

 

Don’t know,

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.

pullup resistor

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.

Then make sure you turn in

Then make sure you turn in the right direction :wink:

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.