“On this project I will show you how to measure the speed of movement of an object using HC-SR04 ultrasonic sensor.
HC-SR 04 Ultrasonic sensor is most commonly used to measure distance, but this time I will show you how to measure the speed of movement of an object using this sensor.
Device is very simple and consist only a few components:
- Arduino Nano microcontroller
- LCD display
- Ultrasonic sensor
- and LED diode
For that purpose we need to take two distance measurements in a short time apart and we have:
distance2 - distance1 = distance speed at a given time
If we make the measurements in a time period of 1 second, then we get the speed of movement of the object in cm/s. The basic code is taken from the arduino cc forum and I just added an LCD display for a visual representation of the results.”