View Full Version : IR Distance Measuring

01-26-2006, 04:08 AM
hi there,

I am currently building a Micromouse. I wanted to measure the distance of the walls from the mouse to align it and move in a straight line.

I dont want to use overhead sensors i.e top - down wall sensors.

are there any distance measuring sensors that are available in india like sharp, etc.

I am looking for only Infrared related and not ultrasonic.

thanks in advance...

01-26-2006, 09:57 AM
hey u can use normal tsop based ir sensors on each side of the mouse and then give the output of each sensor to a comparator circuit.by comparing the signals strengths u can say whether the mouse is closer to left wall or right wall and accordingly move the bot in the other direction.the closer the sensor is to a wall the more the signal strength.so u can relatively guess which direction the motor has to be moved

05-17-2007, 09:34 AM
Old post i know...came across it randomly...couldnt resist posting

TSOP is a digital sensor...the output is either 0 or 1 depending on whether 38k modulated light falls on it or not....

No signal strength comparison is useful of course...its either wall present or not...

So please search the forum for micromouse sensors...<for any one new reading this>

07-19-2007, 10:51 PM
ppppking04 is absolutely right......
if i may add..... its absolutely impossible to use TSOP's for distance measurement...... even if u'r thinking abt time measurement to calculate distance, thz is impossible....why ?
Since IR travels at a speed of 3 * 10^8......the time taken for the echo to be received say for 40 cm would be lesser than 1 m/c cyle.....even if u manage to beat thz....u wouldn't be able to diffrentiate b/w say 40 or 100 or 500 cm......

so i think the easiest way for homebrewn slns for distance measurement is ultrasonics.....check thz out....


i have made 6 of these u'sonic sensors & they work fine.....only think u may need is a CRO for quick tuning & debugging.....

07-20-2007, 09:23 PM
Look here http://www.surveyor.com

I have one of these.
The robots use a TSOP to detect distance and can double up as a communication interface.The emitter sends a series of pulses, the TSOP counts the no. of pulses reflected back, which is directly proportional to distance.
Their code is open source, though it's based on the ARM, you can use their logic.


07-20-2007, 10:04 PM
hi guys i am checking the site given above but as far as i remember tsop is a avalanchephotodiode with in buit amlifier circuit with agc(automatic gain controller). so logically speaking it cant be used for distance measurement.


07-21-2007, 12:04 AM
It can be done.I've seen it working.

Look at the code especially the file utils.c

It's the number of reflected pulses detected by the TSOP.
If you transmit 10 pulses, and you get only 5 pulses reflected, you get an idea of distance through a look up table.

07-21-2007, 09:10 AM
If at all TSOP is to be used for distance measurement, this should be the technique...


Have tried this and works well in a crude sense. Might not give you the direct distance but you can use it for differentiating between the an object at say 5cm with another at 15cm...something like that...

08-01-2007, 09:30 AM