pages
compiler
electronics
laboratory
Processing
Theremino
logggin
sensore_ultrasuoni
introduction
Ultrasound
Ultrasound is an oscillating sound pressure wave with a frequency greater than the upper limit of the human hearing range.
Bats use ultrasound to navigate. They can hear sounds with high frequency. By making sound and hearing echo they determine the distance of objects in their flying area. This is called echolocation.
Their ability to catch flying insects while flying full speed in pitch darkness is astounding. Their sophisticated echolocation permits them to distinguish between a moth (supper) and a falling leaf.
Our ultrasonic sensor has a trigger Tx and a receiver Rx (a microphone). Often it is used, for its appearance, in the little robots as eyes.
Speed = Space / Time
then:
Space = Speed * Time
the speed of sound in air is 343.8 m/s
then, using microseconds and centimeters :
Space = 0,03438 * Time
divided by 2, because ultrasounds go and come back
distance = 0,03438 * Time / 2
then:
distance = 0,01719 * Time
program
algorithm
attrezzaggio
pin9˜ _trigger
pin8 _receiver
variabili
duration = 0
distance = 0
ciclo
SWITCH ON (5 Volt)
_trigger
wait
10 milliseconds
SWITCH OFF (0 Volt)
_trigger
in the variable
duration put the duration of the pulse on the pin:
_receiver
the variable distance is equal to the formula duration*0.01720
write on the serial:
distance:_cm distance
wait
100 milliseconds
Arduino code
electrical connections