Ultrasonic Robot

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Ultrasonic Robot

What is Ultrasound?
Ultrasound is a high-pitched sound wave whose frequency
exceeds the audible range of human hearing.

Humans can hear sound waves that vibrate in the range of


about 20 times a second (a deep rumbling noise) to 20,000
times a second (a high-pitched whistle). However, ultrasound
has a frequency of more than 20,000 Hz and is therefore
inaudible to humans.
What is an Ultrasonic Sensor?
• As the name indicates, ultrasonic
sensors measure distances by
sending out sound waves and
collecting the returning echoes.
• It is an instrument that measures the
distance to an object using
ultrasonic sound waves.
• It can measure items up to 4.5
meters away.
• They are used as proximity sensors.
What is an Ultrasonic Sensor?
Ultrasonic sensors emit a chirp
usually between 23 kHz and 40
kHz, much higher than the typical
audible range of human hearing
at 20 kHz, hence the term
ultrasonic. Using this chirp, they
measure the amount of time it
takes for the sound to bounce off
an object. (This is based on the same
basic principles of echolocation used by
bats to find their prey)
Hardware Overview
An ultrasonic distance sensor actually consists of two
ultrasonic transducers.

One acts as a transmitter that converts the electrical


signal into 40 KHz ultrasonic sound pulses. The other acts
as a receiver and listens for the transmitted pulses.

This sensor provides excellent non-contact range detection


between 2 cm to 400 cm (~13 feet) with an accuracy of 3
mm.
How Does an Ultrasonic Sensor
Work?
It all starts when the trigger pin is set HIGH for 10µs. In response, the
sensor transmits an ultrasonic burst of eight pulses at 40 kHz. This 8-
pulse pattern is specially designed so that the receiver can distinguish
the transmitted pulses from ambient ultrasonic noise.

These eight ultrasonic pulses travel through the air away from the
transmitter. Meanwhile the echo pin goes HIGH to initiate the echo-
back signal.
How Does an Ultrasonic Sensor
Work?
If those pulses are not
reflected back, the echo
signal times out and goes
low after 38ms (38
milliseconds). Thus a pulse
of 38ms indicates no
obstruction within the range
of the sensor.
How Does an Ultrasonic Sensor
Work?
If those pulses are reflected
back, the echo pin goes low
as soon as the signal is
received. This generates a
pulse on the echo pin whose
width varies from 150 µs to
25 ms depending on the time
taken to receive the signal.
Distance calculation
The width of the received pulse is used to calculate the distance
from the reflected object.

Formula: Distance = ½ T x C
Where:
T = Time and
C = the speed of sound
At 20°C (68°F), the speed of sound is 343 meters/second (1125
feet/second), but this varies depending on temperature and
humidity.
Dashing Raptor avoids obstacles

Filename: AvoidObstacles
Activity:

Program the RGB LEDs for different lighting and


sound effects when Dashing Raider sees obstacles.

Filename: AvoidObstaclesAct
Dashing Raptor follows objects

Filename: FollowObjects
Activity:

Make a program do something interesting with the


ultrasonic sensor.

Filename: FollowObjectsAct

You might also like