Close

Sharp IR sensors

A project log for Autonomous Pi bot

Autonomous Pi Bot

rlsutton1rlsutton1 04/05/2014 at 11:211 Comment

So my first mistake after deciding to buy these cheap Sharp IR sensors was to try and run them of the 3.3volt rail of the raspberry Pi, it took a while to realise that they were pulling the 3.3v rail down - not enough to crash the Pi but enough to give inconsistent data.

After switching to running them directly of my 5v supply, the next problem was to get sane data out of the inverse log natural output of these devices. I tried sample code I found which didn't work. I resorted to collecting a sizable sample of data, then dropping it into open office calc. I added smoothing to trim off the outliers and created a graph. I then got calc to create a log trend line from the chart, giving me a formula which still needed a simple rearrage. This method actually worked well.

The final problem is that they start to report obects as being close at larger distances. When considering the data out to 4meters it started to look like a parabolic function. This renders these devices useless as I was  in tending to use them for obstical detection in blind spots

Discussions

jay-t wrote 04/27/2014 at 13:42 point
I started to build a robot into a mouse case. I'm using 950nm IR LEDs and TSOP 4838 IR receivers for object detection. The receivers work on 3V and are directly connected to the Propeller microcontroller. The robot can only "see" if there is something but not how far it is away. The sensors react from 0 to about 15 cm range.

  Are you sure? yes | no