Hey, I am trying to get my IR sensor to detect that there is an obstacle in front of it. However, nothing I seem to do actually works. This is a brand new sensor (just opened).
The aim of my project is more complex; however, I cannot get this simple circuit to do what it should.
Expected results:
if there is an obstacle, print "Obstacle".
If there is no obstacle, print "clear."
Is the clear LED bent over so it is parallel with the PCB, so that its IR is able to refect of an object, positioned infront, back into the darker IR receiver.
Based on the datasheet (have you downloaded and read it?), you need to set the trimmers up until it works as you expect:
The module has two potentiometers one to control frequency and the other to control the intensity. Use these to optimise the sensitivity of the module.
If you have a too high sensitivity value, you'll always get the OUT pin to LOW. The module seems to have an onboard LED trigger: is it always ON (or OFF), despite of an obstacle presence?
Try adjusting the sensitivity trimmer, starting from one end up to the other one, and see if it changes to HIGH ("clear") and, hopefully, the onboard LED module (not the Arduino one) changing the state.
If changes, keep that trimmer position and try putting something in front and moving it towards the sensor unless turns LOW again.
If nothing works, there might be something else, starting from a bad wiring, up to a defective module (the picture you posted here shows a bad trimmer installing/soldering, and this usually means a very cheap manufacturing...). And the board has also a pin jumper, not described...
EDIT: I found THIS page for a very similar module, but with a lot more information, description and how to use it, than that meager documentation on that Jaycar site... Have a look at it, and see if it somehow helps you.