Page 310 - Amphibionics : Build Your Own Biologically Inspired Robot
P. 310
Amphibionics 07 3/24/03 9:13 AM Page 289
Chapter 7 / Turtletron: Build Your Own Robotic Turtle
There are a couple of requirements to consider
Basic timing.
about the input trigger and the output pulse generated by the
ranger. The input line should be held low (logic 0), and then
brought high for a minimum of 10 µsec to initiate the sonic pulse.
The pulse is generated on the falling edge of the input trigger. The
ranger’s receive circuitry is held in a short blanking interval of 100
µsec to avoid noise from the initial ping, and then it is enabled to
listen to the echo. The echo line is logic low until the receive cir-
cuitry is enabled. Once the receive circuitry is enabled, the falling
edge of the echo line signals either an echo detection or the time-
out of 36 ms if no object is detected. Figure 7.15 illustrates the
timing sequence of the initial trigger input, the 40 kHz sonic burst
that is generated, and the echo output pulse.
FIGURE 7.15
SRF04 timing diagram.
The microcontroller will begin timing on the falling edge of the
trigger input pulse, and end timing on the falling edge of the echo
line. This duration determines the distance between the sonar
module and the object from which the echo is bounced back. If no
object is detected, a time-out will occur, which is indicated by the
echo output line going high for approximately 36 ms.
289