SRF05 ultrasonic sensor
Sonar waves are sonic waves that cannot be heard by humans. However, we can see the presence of ultrasonic waves everywhere in nature. We have animals like bats, dolphins ... using ultrasound to communicate with each other, to hunt or locate in space.
Based on observations of their activity, we can see that the principle that animals use sound waves to locate is very simple, can be summarized in 3 steps:
• The host emits sound waves
• This sound wave collides with its surroundings and reflects back
• Based on the transmitter / receiver time, the distance between the host and the surroundings is calculated.
The distance calculation also depends heavily on the transmission medium, for example, sound waves propagating in water or metal will be much faster than sound waves transmitted in air. Note that sound waves cannot be transmitted in a vacuum.
According to this principle, based on the advancement of modern science and technology, we have seen the application of sound waves in many lives, including the undersea navigational equipment of submarines, equipment radar, environmental distance measuring devices like measuring the depth of the ocean ...
SRF05 ultrasonic sensor also works according to the above principle, the device consists of 2 speakers - receiver and transmitter along with 5 pins to connect to Arduino. According to the manufacturer's documentation, the maximum operating range of this sensor is within 5m.
The function of these pins is as follows:
Circuit after completing the installation
Programmable controller:
With the SRF05 sensor, we will illustrate the use by programming the sensor every 1 s, we activate the sensor and check if there are obstructions in the surrounding.
The code for this task is as follows:
update
...