![]() How the HC-SR04 worksĪt the front of the HC-SR04 sensor, you can find two silver cylinders (ultrasonic transducers), one is the transmitter of the sound waves and the other is the receiver. This formula doesn’t include the humidity since its effect on the speed of sound is only very small.īelow you can find a tutorial on how to use a DHT11 temperature and humidity sensor to calibrate the speed of sound and get a more accurate distance reading with the HC-SR04. For most cases at 20☌ you can just use 343 m/s but if you want to get more accurate readings, you can calculate the speed of sound with the following formula: Wikipedia states that the speed of sound increases with roughly 0.6 m/s per degree Celsius. The speed of sound actually depends strongly on temperature and to a far lesser degree on the humidity of the air. So you need to divide the result by two.ĭistance (cm) = Speed of sound (cm/µs) × Time (µs) / 2ĭistance (cm) = 0.0343 (cm/µs) × 2000 (µs) / 2 = 34.3 cm Temperature dependence of the speed of sound The distance between the sensor and the object is actually only half this distance because the sound waves traveled from the sensor to the object and back from the object to the sensor. ![]() If you multiply the speed of sound by the time the sound waves traveled, you get the distance that the sound waves traveled.īut that is not the result we are looking for. Let’s say that the time between sending and receiving the sound waves is 2000 microseconds. Source: Īt 20☌, the speed of sound is roughly 343 m/s or 0.034 cm/µs. Ultrasonic distance sensors working principle. By measuring how much time passed between sending and receiving the sound waves, the distance between the sensor and the object can be calculated. If there is an object in front of the sensor, the sound waves get reflected back and the receiver of the ultrasonic sensor detects them. These sound waves travel through the air with the speed of sound, roughly 343 m/s. Ultrasonic sensors work by emitting sound waves with a frequency that is too high for a human to hear. How does an ultrasonic distance sensor work? As an Amazon Associate we earn from qualifying purchases. is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |