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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Are you sure? yes | no