EasyManua.ls Logo

Elegoo Mega2560 - Lesson 10 Ultrasonic Sensor Module; Ultrasonic sensor

Elegoo Mega2560
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
80
/
223
Lesson 10 Ultrasonic Sensor Module
Overview
Ultrasonic sensor is great for all kind of projects that need distance measurements,
avoiding obstacles as examples.
The HC-SR04 is inexpensive and easy to use since we will be using a Library
specifically designed for these sensor.
Component Required:
(1) x Elegoo Mega2560 R3
(1) x Ultrasonic sensor module
(4) x F-M wires (Female to Male DuPont wires)
Component Introduction
Ultrasonic sensor
Ultrasonic sensor module HC-SR04 provides 2cm-400cm non-contact measurement
function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic
transmitters, receiver and control circuit. The basic principle of work:
(1) Using IO trigger for at least 10us high level signal,
(2) The Module automatically sends eight 40 kHz and detect whether there is a pulse
signal back.
(3) IF the signal back, through high level , time of high output IO duration is the time
from sending ultrasonic tore turning.
Test distance = (high level time × velocity of sound (340m/s) /2
The Timing diagram is shown below. You only need to supply a short 10us pulse to
the trigger input to start the ranging, and then the module will send out an 8 cycle
burst of ultrasound at 40 kHz and raise its echo. The Echo is a distance object that is
pulse width and the range in proportion .You can calculate the range through the
time interval between sending trigger signal and receiving echo signal. Formula: us
/ 58 = centimeters or us / 148 =inch; or: the range = high level time * velocity
(340M/S) / 2; we suggest to use over 60ms measurement cycle, in order to prevent
trigger signal to the echo signal.

Table of Contents