Hardware Reference
In-Depth Information
but the pin that controls the speed must be a PWM pin. The pin that receives the feedback must be
an input-capture pin.
Although some DC motors can operate at 5 V or less, the HCS12 cannot supply the neces-
sary current to drive a motor directly. The minimum current required by any practical DC mo-
tor is much higher than any microcontroller can supply. Depending on the size and rating of the
motor, a suitable driver must be selected to take control signals from the HCS12 and deliver the
necessary voltage and current to the motor.
8.11.1 Drivers
Standard motor drivers are available in many current and voltage ratings. Examples are the
L293 from ST microelectronics and SN754410 from TI. These two chips are pin compatible.
The SN754410 has four channels and can output up to 1 A of current per channel with a supply
of 36 V. It has a separate logic supply and takes a logic input (0 or 1) to enable or disable each
channel. The SN754410 also includes clamping diodes needed to protect the driver from the
back electromagnetic frequency (EMF) generated during the motor reversal. The pin assignment
and block diagram of the SN754410 are shown in Figure 8.53. There are two supply voltages:
V CC1 and V CC2 . V CC1 is the logic supply voltage, which can be from 4.5 to 36 V (normally 5.0 V).
V CC2 is the analog supply voltage and can be as high as 36 V.
V CC1
SN754410
1
1
2
16
15
1,2EN
1
16
V CC1
0
1
M
1A
2
15
4A
3
1
3
1Y
3
14
4Y
14
13
12
4
13
4
5
GND
M
GND
SN754410
5
12
11
2Y
6
11
3Y
6
7
8
4
2A
7
1
0
1
0
10
3A
2
10
9
0
M
9
3,4EN
V CC2
8
(a) Pin assignment
(b) Motor connection
V S
Figure 8.53 Motor driver SN754410 pin assignment and motor connection
8.11.2 Feedback
The DC motor controller needs information to adjust the voltage output to the motor
driver circuit. The most important information is the speed of the motor, which must be fed
back from the motor by a sensing device. The sensing device may be an optical encoder, in-
frared detector, Hall-effect sensor, and so on. Whatever the means of sensing is, the result is a
signal, which is fed back to the microcontroller. The microcontroller can use the feedback to
determine the speed and position of the motor. Then it can make adjustments to increase or
decrease the speed, reverse the direction, or stop the motor.
 
Search WWH ::




Custom Search