Page 1 of 1

Ultrasonic sensor detect obstacle's size

Posted: 18 Jun 2012, 11:47
by shaoxiaojun
Hi All,
I try use the US sensor to detect the obstacle's size, like height or width, the theory is simple, there's an object in front of sensor with distance 'line distance', move the US sensor which dirven by a motor, the motor move looply by a tiny steps each time, like:

Code: Select all

RotateMotor(OUT_B, 10, 5);
when the detected distance jumped a big step, it means the the ultrasonic just passed by the edge of the object, then record the degree that motor rotated, like:

Code: Select all

rotationTotalDegree = MotorTachoCount(OUT_B);
so base on 'line distance', 'edge point distance', 'rotated degree', I can easily cacualted the object's size(use the tan(int degreee)).

But I got some problem when use the sensor, it didn't work as I imagined, instead send a single line ultrasonic signal, it actually send 'bunch' of singlal to an object, like a single point light source, it's a Radial, I guess the cross section is like a retangle or sth, and the area of this retangle depens on the distance from the sensor, so this make it nearly impossible to get a clear edge, because from my test, even the sensor passed by the edge of object for a long distance, the distance still displayed very near.
Do you have any idears?

Re: Ultrasonic sensor detect obstacle's size

Posted: 18 Jun 2012, 13:41
by mcsummation
Yes, the ultrasonic sensor a "cone of detection", not a line. Even the IR distance sensors from MindSensors have a "cone of detection". To get what you want, you would need a laser rangefinder.

Re: Ultrasonic sensor detect obstacle's size

Posted: 19 Jun 2012, 08:28
by shaoxiaojun
oh, that's too bad, is that possible to add a special mask with a line mouth in front of US sensor to simulate the 'line siginal' though i guess it might reflect the ultrasonic and make the data mess...

Re: Ultrasonic sensor detect obstacle's size

Posted: 20 Jun 2012, 09:59
by HaWe
I have 4 US sensors mounted "reverse T-shaped" in a distance of at least 15 (-30) cm to the next one, in doubt aligned to each other in a slight angle and all driven in single shot mode. In this case I can get a vague idea of the object size.