Most people don't like physics when they're at school. It sounds pretty complex, but it uncovers the secrets of the universe. One of the most interesting things in physics is sound since that can be used to determine how far away an object is from you. It doesn't make sense right at the start, but it works.
That's also the basis of understanding how ultrasonic sensors work. Let's start right at the beginning. In order to make sound, two things need to collide. That could be your hands clapping, a stick hitting a drum, or a string on a guitar vibrating. You can go to this link to find out more.
Vibrations also make a sound because air molecules are colliding, which transfers energy and changes the pressure of the air. Depending on the frequency, we can hear it. Because we can't hear everything, scientists invented sensors to see what's happening on the entire spectrum.
Frequency is the term we use to refer to the duration of the length of the wavy motions of sound. The measurement used by the scientific community is called a Hertz. This number tells us the number of soundwaves that have occurred in a single second.
Our ears aren't as good as the rest of the animal kingdom. We can hear sounds between twenty and 20 000 Hertz. It's just above that range that ultrasonic sound enters the stage. We can't hear it, but we can detect it. Additionally, there are lots of use cases for it.
How fast is sound?
If you've watched a lot of movies, you might have noticed that there are plenty of scenes where the villains tie up someone to get run over by a train. That's a common trait in Westerns, and it has happened quite a lot throughout history.
When the villain finishes tying up the hostage, they usually put their ear on the rails to listen to whether the train is coming. That's because sound travels differently based on the medium. Air is the slowest medium, and liquids and metals are much faster. In the air, the average speed is 344 meters per second, which translates to 1130 feet per second.
How do ultrasonics work?
Now that we understand what sound is, we can start going into the technicalities when it comes to ultrasonics. The device emits a pulse that's in the range of 40 000 Hertz or above. There is a microcontroller in the gadget that knows the value of the speed of the emitted pulse.
As soon as it gets sent out into the environment, a timer starts counting. When a return signal from the same range gets registered through a microphone, the timer stops, and the microcontroller performs a calculation to determine the distance.
This is an extremely precise method to determine distance. In nature, however, things are never ideal. We will never get ideal conditions, and the thing that's missing is temperature. Humidity, dampening, and pressure have their role when it comes to influencing the results.
The thing that can distort the measurements most is temperature. The calculations prove it to be nearly linear. The hotter it gets, the faster the pulse can travel. Scientists figured this out quickly and started to add a thermometer that will adjust the microcontroller measurements.
This enhances precision and makes it close to ideal. Another important thing to consider is frequency. The greater the distance, the lower the frequency. You can visit SensComp and read more. Now that we're still in a pandemic, it might be hard to remember the last time you went to a concert.
When you get there, the first thing you hear from a distance are the low tones. The closer you get, the higher pitches can be detected. An average 40 kHz sensor can detect objects that fall into the range of ten meters. If you have a 400 kHz sensor, on the other hand, the maximum distance is just a little bit over half a meter. The most important thing to remember is that the range increases when the frequency decreases.
The components
The thing that's crucial to make an ultrasonic sensor is the microphone. The microphone works in a simple manner. Waves create energy, and they strike the diaphragm. This is a small component that's made from plastic and moves slightly.
It can move back and forth, and it triggers the movement of a coil. The coil has the same range of motion and creates a magnetic field. Coils are used because they can create magnetic fields. This constitutes the microphone, which then sends the information to the microcontroller.
A microcontroller is essentially the same thing as a computer, but it's a lot smaller. It has the ability to process tasks, and it also has a mechanism to store data. In the computer, these two parts are the central processing unit and random-access memory.
Since the microphone needs to send data to the microcontroller, it works as an external unit and a sensor. An equivalent to it on a computer is the keyboard which allows you to input text. All of these small pieces are much smaller than the computer.
Usually, ultrasonics are used in bigger DIY projects. They get attached to drones or robots. The robot or drone gets the data from the sensors and handles all of the digital work. The smallest working part in their construction is the transistor.
This is practically a small switch that allows a little bit of electricity to pass through one portion and a larger amount to go through another side. The little current activates the bigger one. That's the basic operation of all computers. This part can be either on or off, which can be translated to Boolean logic with ones and zeros.
Why are they so cheap?