166Views8Replies

Author Options:

measure distance with raspberry pi? Answered

How should i measure 10 meter distance very accurately with raspberry pi ? 
if anyone knows any sensor that can measure distance of 10 meter accurately please tell me then i will manage ?
thank you.

8 Replies

user
rickharris (author)2017-01-20

Tie Pi to string, lower until it hits the ground, measure string.

You really need to be precise in your question so you can get a sensible answer.

If a mm or two is good enough then an ultra sonic module should do the job.

https://www.modmypi.com/blog/hc-sr04-ultrasonic-ra...

https://www.google.co.uk/#q=measure+distance+with+...

Research should START with google.

Select as Best AnswerUndo Best Answer

user

+1

Ultrasonic is one way to go, optical is another for more accuracy and increased range. But Google could have told you this I'm sure!

Select as Best AnswerUndo Best Answer

user
-max- (author)ThirdEarthDesign2017-01-22

I agree with steve on this one. I've not had good luck with sonar modules. They are very easy to interfere with. Good luck with using more than one at a time, since the pings they release are not modulated. The speed of sound can vary with pressure, humidity, etc. They don't work well against surfaces that don't reflect the ping directly back towards the receiver. (that includes surfaces that absorb sound and that are angled and reflect it away.) and all of these things make the acutall data noisy, prone to random huge spikes, etc.

Select as Best AnswerUndo Best Answer

user
-max- (author)-max-2017-01-22

and of course an annoying trait of them is that it can take a while for the ping to return. When I wrote a basic arduino sketch to measure distance with one and print it to serial, it would update really quick with distances less than 1 foot, but as the distance got larger the code slowed WAY down, as a result of a while loop waiting for the return ping.

If you send out another ping before the last one returns, then you might get into trouble with not knowing which returning ping was which one, a problem if you have a moving object.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)rickharris2017-01-20

Ultrasonic isn't that precise. Variations in the speed of sound wrt temperature bugger it up.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)iceng2017-01-20

Still only +/- 5cm at his distance.....

The Bosch et al laser measurement devices are ACCURATE to less than 3mm....

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)2017-01-20

Well, if you start at the top of a 10 metre building, and start a timer in the Pi, and stop it when it hits the ground...S=at^2/2...very accurate....

HOW "accurate" ? 10mm ? 1 mm, ? 1 um ?

Select as Best AnswerUndo Best Answer