17
\$\begingroup\$

I'm currently working on my high school final project, which is basically a radar.

I'm using the SRF05 detector to detect objects that are near the surface of the device. My current assignment is to learn and summarize all the different components that will be assembled at the end. (UART, MAX232 74HC244 etc., if you want to know.)

My teacher told me that the more I will know about these components, the better I will do at my work, and in the exams.

Why are sound waves the best choice for the SRF05? Furthermore, why ultrasonic ones? What are the benefits of using sound waves, but not invisible light waves, heat or any other means that can do the job? Light, for example, travels much faster, thus creates a better result and will probably be more effective than sound.

\$\endgroup\$

4 Answers 4

32
\$\begingroup\$

Basically, sound is slow.

Using sound you can easily time how long a wave takes to travel to your object and reflect off it, thus giving you a fairly accurate distance. Light goes too fast for that, unless you are looking to measure the distance of the moon, say.

And why ultrasonic? So you can't hear it. Imagine how annoying it would be if you were forced to hear it all the time? BeeeEEEeeeeEEEEEeeeEEEEEeeeeeEEE...eeEEEEeeEEEP

\$\endgroup\$
5
  • 3
    \$\begingroup\$ Yup, It's also fairly safe, and your room is fairly quite at those sound frequencies.. while there may be a lot of background light to deal with. Heat would work if you wanted to sense hot objects, (like people) but chairs and tables not so well. \$\endgroup\$ Commented Oct 1, 2014 at 15:40
  • 12
    \$\begingroup\$ +1 for the vivid representation of modulating 0's and 1's in audible sound waves. \$\endgroup\$
    – Ricardo
    Commented Oct 1, 2014 at 16:25
  • \$\begingroup\$ Some ultrasonic sensors produce a distinct clicking sound. In a quiet environment some people actually find it to be irritating, so I can only imagine what they'd say about more audible tones... \$\endgroup\$ Commented Oct 2, 2014 at 0:27
  • \$\begingroup\$ Also sound reflect from rigid objects much more reliable than light. With sound sensor you can check water level easily, not so much with light sensor. Another thing: black matte object would reflect only few rays back to sensor. Ultrasound is not affected by color. \$\endgroup\$
    – jnovacho
    Commented Oct 2, 2014 at 7:58
  • 2
    \$\begingroup\$ @jnovacho Counterpoint: Soft, spongy materials would reflect only very little sound back to the sensor. Light is not affected by texture. \$\endgroup\$ Commented Oct 2, 2014 at 16:54
20
\$\begingroup\$

There is some analysis at https://electronics.stackexchange.com/a/130095/9006 in answer to a question about finding the position of an object.

Light, radio and heat radiation are all electromagnetic radiation, and travel very, very quickly. It is not automatically true that they provide a better result just because they are faster.

Electromagnetic radiation travels 1,000,000 times faster than sound. So it is much easier to make something which can measure the time it takes for sound to travel a few metres than it is for light. Sound travels at roughly 0.34 metres per millisecond. Your ears and brain are good enough to detect time-of-flight in a room about 30 metres or more.

A piece of electronics to measure distance using the time-of-flight of sound is low-cost. To get 0.34m, or 34cm it needs to work at one millisecond (0.001 second). Which is sloooooow for any type of computer, though is also much faster than a person. It is relatively straightforward to get 10x better, 3.4cm, which is 0.1 milliseconds. For ultrasound, at 38kHz, that 0.1 milliseconds is almost 4 whole cycles, which is well within the capabilities of low-cost electronics to measure. So measuring 34cm with 10% accuracy is understandable and doable.

To measure time-of-flight for 30cm with light would be much harder. Light would take 1,000,000 less time, or 0.000,000,001 seconds, or 1 nanosecond. To measure to 3cm accuracy would be 0.1 nanosecond, which is approximately 3 times faster than one cycle of the fastest Intel microprocessor. So it would be much harder to do that measurement of 30cm, and even harder to get 10% accuracy using time-of-flight. It can be done, but not as cheaply and easily as sound. It typically does not use time-of-flight, but instead a different property of a light wave.

Side Note (Edit):
If you wanted more accuracy than 3.4cm with sound (not light), how might you do that? What is it that makes it harder to get a lot more accuracy with the SRF05? Have a think about this, and you might understand what limits the chosen SRF05 impose, and hence get a better understanding of the system.

The best known animal which uses ultrasound are bats. They use it for range and position measurement using time-of-flight, and two ears to find direction information. So part of bats' biological systems are able to use sound's time-of-flight well enough to catch 'food' (moths, and other insects) while it is flying. That is very impressive. If you wanted to understand more about how ultrasound can be used, you might look at articles about bat's echo location system. It is highly developed.

Many other animals emit ultrasound, for example rodents and some insects. But for most it is a communication mechanism.

\$\endgroup\$
4
  • \$\begingroup\$ The short answer to "more accuracy with lasers" is inferometery. The long answer appears to be here: repairfaq.org/sam/laserlia.htm#liarfi3 \$\endgroup\$
    – pjc50
    Commented Oct 1, 2014 at 16:10
  • \$\begingroup\$ @pjc50 - My question is ambiguous. I'll fix it. I meant how might the OP get significantly more accuracy than 3.4cm with sound. \$\endgroup\$
    – gbulmer
    Commented Oct 1, 2014 at 16:50
  • \$\begingroup\$ The speed of sound in air is 342 m/sec (== .342 m/msec) (Wikipedia). Your value is off by a decimal place (3d paragraph). [And, I just made, and fixed, the same typo! :) \$\endgroup\$
    – JRobert
    Commented Oct 1, 2014 at 17:51
  • \$\begingroup\$ @JRobert - hopefully fully fixed \$\endgroup\$
    – gbulmer
    Commented Oct 1, 2014 at 18:03
2
\$\begingroup\$

Why not use lasers? This is such an excellent link that I feel it deserves to be an answer: http://www.repairfaq.org/sam/laserlia.htm#liarfi

The whole page is full of information on the subject. It's difficult to excerpt a particular paragraph as it's all relevant, but this is a good overview of the technique.

For much better resolution than would be possible with simple sampling while still maintaining low cost, digital TOF rangefinders can combine a precision analog temporal interpolator with say a CMOS system running at 100 MHz. The analog circuitry to accomplish this is in many production units (for different applications) - but 5 ps resolution has been achieved with low-cost components and in production for 15 years from at least one manufacturer. The idea is interpolate between the digital count periods with a precision time-to-voltage converter which is then sampled by microcontroller and combined with the digital counter results.

Lasers (visible or IR), RADAR etc. work and can give very high precision - at high cost and complexity. For lasers you need a good optical path from laser to receiver, and careful circuit design to allow for the time taken for signals to travel across the circuit.

Crude but cheap distance measurement can be done with IR LEDs and photodiodes simply by measuring how much light is reflected from the target. This is hard to calibrate accurately and vulnerable to ambient illumination, but if you just want "near" or "far" it may be enough. This is the technique used by Microsoft's Kinect distance camera.

\$\endgroup\$
2
  • 6
    \$\begingroup\$ I don't believe Microsoft's Kinect uses "measuring how much light is reflected from the target". AFAIK, it takes a picture of a projected grid, with known dimensional properties, and uses some image processing to derive information from that. \$\endgroup\$
    – gbulmer
    Commented Oct 1, 2014 at 17:16
  • 1
    \$\begingroup\$ There's no way they can measure distance based on apparent brightness: the absorbance, transmittance, and reflectance of every surface is going to be different, with varying amounts of specular and diffuse reflection. \$\endgroup\$
    – Nick T
    Commented Oct 3, 2014 at 4:18
2
\$\begingroup\$

Sound waves are the "best" choice for the SRF05 because you have no choice, it's an ultrasonic distance sensor.

Ultrasonic frequencies are often used for measurement and diagnostic applications for the reason that the noise floor is lower at higher frequencies.

Heat would be extremely difficult to measure distance with due to the physics of thermal diffusion.

Laser light can provide more reliable and accurate results at longer ranges, and a higher cost, but must be aimed precisely.

An ultrasonic acoustic sensor integrates the overall response of the environment, permitting post-processing of the information to make inferences about the distance to more than a single point.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.