Page 240 - Amphibionics : Build Your Own Biologically Inspired Robot
P. 240
Amphibionics 06 3/24/03 9:02 AM Page 219
Chapter 6 / Crocobot: Build Your Own Robotic Crocodile
FIGURE 6.33
L298 bidirectional
motor controller.
How it works. The L298 contains two motor control circuits that
are referred to as the “H-Bridge.” This method of controlling DC
motors gets its name because the four transistors used to control
the motors are configured to form an “H” with the motor being at
the center. Figure 6.34 shows the basic schematic for a typical H-
Bridge. The H-Bridge works by having the control circuitry or
microcontroller turn on only two of the transistors at a time. In this
example, when transistors Q1 and Q4 are turned on, the motor will
spin in one direction. When transistors Q2 and Q3 are turned on,
the motor will spin in the opposite direction. When all of the tran-
sistors are turned off, the motor is stopped. Table 6.3 is a truth
table showing the state of each transistor and the motor direction.
Note that if transistors Q1 and Q3 (or Q2 and Q4) were turned on
at the same time, there would be a short circuit across the battery.
For this reason, the L298 has internal logic that prevents this from
happening.
Motor direction Q1 Q2 Q3 Q4 TABLE 6.3
H-Bridge Truth Table
Stopped 0 0 0 0
Forward 1 0 0 1
Reverse 0 1 1 0
219