Saturday, 11 July 2015

sensor - Alternate ways of measuring distance (lateral)?


I'm working on a micromouse, a small autonomous robot that traverses a maze.
I need an efficient way to measure lateral distance to walls and I'm looking at the Sharp GP2D120 but looking at the datasheet, it has long typical response time of 39ms, is quite bulky, and has a minimum distance of 4cm.
Can you recommend a better sensor (that possibly has a lower minimum distance)?


I was wondering what are some alternate ways of measuring distance? I have seen other micromice use IR LEDs and it was interesting but I'm not sure how it works.


Any input is appreciated. Thanks!



Answer



I have read somewhere (I think the Arduino forums) that sharp no longer manufactures these sensors (though that can be hearsay). I do know however that they are quite expensive compared to much simpler solutions.


The simplest would be a IR LED - IR phototransistor combination:




Phototransistor on left, led on right


You would power the IR LED (remeber the limiting resistor!) and then use the phototransistor to pick it up. The voltage drop over the phototransistor will be proportional to the intensity of the IR light it picks up which is proportional to the distance the emitter and detector are from the reflecting surface.


Pointers (Personal Experience):



  • It will take some experimentation and calibration to find the correct voltage - distance relationship

  • The voltage will vary depending on the reflectivity of the reflector to IR light.

  • The detector and reflector will need to be shielded from each other in order to gain a accurate measurement.

  • This type of sensor is only reasonaly accurate. Keep it in mind.

  • The detector is susceptible to outside sources of IR light, including the sun, incandescent light and florescent light bulbs.



There are many links on the internet on how to use said components. Take a look here: http://letsmakerobots.com/node/2907


Lastly, this method (I have found) is only accurate over small distances (not more than 20cm I'd say). For longer ranges you should consider ultrasonics or those fancy Sharp sensors.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...