Sharp IR gives very inaccurate readings

Attached is a picture of my setup. The sensor used is the Sharp GP2Y0A710K0F, which should have a range of 1 to 5 metres.

The readings however are all over the place; straight walls at a 3m distance will show up as being at a ~1m distance, an object directly placed in front of the lens shows up as 90cm away and regularly the sensor simply cannot calculate the distance.

Is there something wrong with my setup, or is the sensor possibly broken? For my project some deviation (±50cm) is tolerated, but the data I'm receiving from the sensor makes it useless.

EDIT: Probably the issue is caused by an insufficient battery voltage of only 3.7v.

Did you post the wrong image? I see no sensor.

I see you edit relating to insufficient voltage. what happens when you use the correct voltage range????

Paul

an object directly placed in front of the lens shows up as 90cm

Yes that is normal. Look at the data sheet and you will see objects placed closer than the minimum distance give the same readings as objects in the designed range.

You can not use these sensors for any sort of measurements when you are on the back end of that curve.