Hardware Reference
In-Depth Information
resist moving out of that position. The maximum amount of force the servo can exert is the
torque rating of the servo. Servos will not hold their position forever though; the position pulse
must be repeated to instruct the servo to stay in position.
As shown in Figure L8.3d, when a pulse is sent to a servo that is less than 1.5 ms, the servo
rotates to a position and holds its output shaft some number of degrees counterclockwise from
the neutral point. When the pulse is wider than 1.5 ms, the opposite occurs. The minimal width
and the maximum width of pulse that will command the servo to turn to a valid position are
functions of each servo. Different brands, and even different servos of the same brand, have dif-
ferent maximum and minimums. Generally the minimum pulse will be about 1 ms wide and
the maximum pulse will be 2 ms wide.
Another parameter that varies from servo to servo is the turn rate. This is the time it takes
for the servo to change from one position to another. The worst-case turning time is when the
servo is holding at the minimum rotation and it is commanded to go to maximum rotation.
This can take several seconds for very high torque servos.
Minimum pulse
Pulse width 1 ms
90°
Neutral position
Pulse width 1.5 ms
180°
Maximum pulse
Pulse width 2 ms
Figure L8.3d Servo control pulse width and motor position
The diagram of the HS-311 servomotor to be used in this lab is shown in Figure L8.3b.
There are three terminals connected to the control circuit (see its left).
Black wire: ground
Red wire: connected to V CC
Yellow wire: connected to signal (PWM output)
The HCS12 PWM cannot supply enough current to drive the DC motor or the servomotor directly.
A motor driver chip such as the SN754410 from TI is needed to supply the current needed by the
motor. The pin assignment of SN754410 is shown in Figure 8.53. The lab procedure is as follows:
Step 1
Connect the circuit properly. Connect the PWM0 and PWM1 pins to the 1A and 2A pins of
the SN754410, respectively. Connect the 1Y and 2Y pins to the DC motor and servomotor
control input, respectively. The servomotor needs the driving signal to be 50 Hz.
Step 2
Write a program that enables and configures the PWM function properly. The frequency
of the PWM output for this lab is fixed (at what frequency?), but the duty cycle will be
changed in response to the user input.
 
 
Search WWH ::




Custom Search