Hardware Reference
In-Depth Information
The motor in the figure is driven when Q 1 and Q 4 are turned on. Q 2 and Q 3 are kept off
when the other transistors are on. If Q 1 and Q 2 were allowed to be on at the same time, a
short circuit would exist from V SS to ground. The and logic gates driving these transistors
prevent this.
Returning to Figure 7-1 , with Q 1 and Q 4 on, the current flows through the motor
from left to right. Turning all transistors off results in no current flow. Turning Q 3 and Q 2
on causes the current to flow from V SS to ground, passing this time through the motor
from right to left. By controlling pairs of transistors, current can be made to flow in one
direction or the other.
Sensing Resistor
When used, the sensing resistor R S is a low-resistance resistor for sensing how much
current flows through the motor (the datasheet suggests a non-wire-wound resistance
of R S = 0 . 5 W). As current flow increases, the voltage V RS across the resistor increases.
When the motor stalls, for example, V RS will exceed a certain threshold voltage, allowing
protective circuitry to turn the drivers (and thus the motor) off. In this chapter, we will
simply wire the sense pins to ground and omit the protective circuitry for simplicity.
Enable A and B
The L298 is a dual-bridge driver, with units A and B. Figure 7-1 shows only unit A. The
enable inputs EnA and EnB enable or disable the drive to units A and B, respectively.
Without a high signal on the enable input, no current will flow through the bridge, no
matter what the other input signals are. The enable input can be used by the protective
circuitry to disable the motor outputs, should the V RS voltage rise too high. Otherwise, the
enable inputs can be tied to the logic high or controlled by the microprocessor.
Inputs In1 and In2
Each half of the dual-bridge driver has a pair of logic inputs. They are In1 and In2 for
bridge A, and In3 and In4 for bridge B. We'll focus on bridge A.
When the enable EnA pin is enabled, the In1 and In2 inputs have the following
results for the motor drive:
In1
In2
Q1
Q2
Q3
Q4
Motor Current
0
0
On
On
No current flow
0
1
On
On
Right to left
1
0
On
On
Left to right
1
1
On
On
No current flow
A simple way to think about this is that one input must be high, while the other is low
for the motor drive. The direction is selected by the input that is high.
 
 
Search WWH ::




Custom Search