# suggest a technique to measure distance in inches using uc

Status
Not open for further replies.

#### Abdul Manan

##### Member level 2
plz suggest me a technique to measure distance between two objects using a microcontroller

remember the two objects are in motion
the motion is prependicular to the distance to be measured

SONAR is not the solution because i have to deal with high speed upto 100km/h
the velocity is prependicular to the distance to be measured

plz suggest an idea

#### IanP

Re: suggest a technique to measure distance in inches using

Laser distance meters should work in you application ..

Some of them have serial port so if you use a microcontroller for something you can trig this device and read result via the RS-232 ..
Try DISTO from LEICA ..
https://www.leica-geosystems.com/cpd/en/lgs_3849.htm

Rgds,
IanP

#### Slayerza

##### Full Member level 5
Re: suggest a technique to measure distance in inches using

Why is SONAR not an option? If I recall correctly the speed of sound is approx 300m/s at 100km/h the object is only moving at ~30m/s by measuring the doppler shift, you can calculate the time movement of the object. Alternatively using the time-of-flight the distance can be calculated.

Cheers
Slayer

#### Abdul Manan

##### Member level 2
in my system acceleration is also involve and i have to keep 2 objects at distance upto 5mm constantly so sonar is not an option

#### Abdul Manan

##### Member level 2
anu one there to help me plz?

#### FvM

##### Super Moderator
Staff member
Basically, the question misses the point. It's a problem of selecting a suitable measuring method. A microcontroller is a rather unimportant auxilary function in this regard.

A reason why you may get no satisfying answer is lack of any specification apart from 5 mm nominal distance. The required resolution may be µm to mm, the measurement speed is unknown, also the target size and the degrees of freedom for the relative movement.

Laser measurement has already been mentioned. There are actually different possible techniques with laser: pulse time-of-flight, modulated phase difference, triangulation, interferometry.

Triangulation methods can be used also with LED sources, e. g. Sharp has distance sensors utilizing the technique.

I share the doubts about acoustical methods in this case. Apart from doppler errors, moving air strongly affects the beam focussing. So it's plausible to regard optical methods as first choice.

#### ds18s20

##### Full Member level 3
Re: suggest a technique to measure distance in inches using

I have worked with several sonars and THEY ARE FAST

Sona Switch Mini-S is a great chap sonar transponder. Look for them on eBay or CL.

Yes Mini-S DO provide range information. The range is between 0-10 feet or 18.6ms to 3ms

I found those at mpja.com for \$8 each - what a steal. I got several and then I went back to get more but they ran out of stock by then

When run throught the speed of sound formula/2 the actual tape meassure tests are extremely accurate. I am sooo happy with those. And yes, if you dont want range PWM data there is a simple OC ttl output - short to GND when object in range and Z otherwise.

Take a look at the manual**broken link removed**

Status
Not open for further replies.