Hardware Reference
In-Depth Information
The EnA and EnB connections have jumpers installed to enable both driver units
(tying the enable A and B inputs up to the +5 V supply). If you don't need to control the
enable inputs, leave the jumpers in. Otherwise, remove them and then use the edge pins
for inputs to enables A and B.
The pins In1 through In4 are the inputs to the bridge drivers (see In1 and In2 in
Figure 7-1 ).
The remaining connections are two blocks with paired connections:
OUT1 and OUT2, bridge connections for unit A
OUT3 and OUT4, bridge connections for unit B
You don't have to install any protective diodes, since they are already included on the
PCB. Price and convenience were the reasons I chose to buy the PCB. If you breadboard
the driver instead, be sure to wire in the fast-acting protection diodes, since these are not
included in the IC.
Driving from GPIO
Of course, before we attach the inputs of these drivers to the GPIO pins of the Raspberry
Pi, we need to be certain that the voltage levels are safe and that the interface logic
levels work.
The L298 IC has the following power requirements:
Symbol
Parameter
Min
Typ
Max
Unit
V S
Supply voltage (pin 4)
V IH + 2 . 5
46
Volts
V SS
Logic supply voltage (pin 9)
4.5
5
7
Volts
From this, we see that the motor side ( V S ) can operate up to 46 V. The logic side,
however, must have a minimum of 4.5 V. In other words, the L298 driver operates at
5V TTL levels.
Note
Be sure to remove the regulator jumper when using high voltages.
But we've seen this kind of problem before, in Chapter 6. There we were still able to
drive the ULN2003A safely from the GPIO outputs at 3 V levels. So let's check the signal
requirements of GPIO outputs vs. L298 inputs:
GPIO
L298
Signal
Volts
Volts
Signal
V OL
£ 0 . 8 V
£ 1 . 5 V
V IL
V OH
³ 1 . 3 V
³ 2 . 3 V
V IH
 
Search WWH ::




Custom Search