Continue
MCU Control signals Motor
(Output ports) ───────────────→ Driving ─────────→ Stepper
Clock/Drive Circuit Drive Motor
sequence sequence
——————————————————————
1a| |
•-|-switch-←Imax = 0.67A-|- Red ----
Signals from | | | ◯
the MCU to | |- Black---| ↙
turn off | | | |
switches | | | | Center tap
1b| | | |
•-|-switch-←Imax = 0.67A-|- Yellow-- |
| | ↓
| | ————————————
2a| | | | |
•-|-switch-←Imax = 0.67A-|-- Brown Black Orange
| | | | |
| | -- |
2b| | |
•-|-switch-←Imax = 0.67A-|——————————————————
| |
| Motor driving |
| circuit |
| (e.g. L298N) |
| |
——————————————————————
Figuare 5,6: Driver circuit for stepper motor.
As high current signals are required to drive the stepper motor, a separate power source is used to drive the motor. In addition to the driver circuit, as the energisation and de-energisation of magnetic coils will generate back emf (electro-motive force) that could potentially damaged the motor and dJiving circuit, 8 diodes are used for such protection.
Issues with stepper motor control
1. Non-overlap time
As part of output pattern switching, a through-current protection period n (non-overlap time) is inserted. The turn-off delay that occurs upon excitation phase switching can destroy a driver. To prevent this, a non-overlap time is inserted to allow for the time delay. This non-overlap time delay ensures that when switching between different phases, hence, not more than two coils are energized at the same time.
Observe using the oscilloscope for any possible overlap time in the output sequence of signals used to control the stepper. A possible solution is to use two separate
instructions to firstly de-engergise the coils prior to engerising the coils. This will ensure the non-overlap time (n) will take at least 1 instruction cycle.
2. Slew-up and slew-down operation
Slew-up/slew-down operation maintains the synchronization of the motor. Out-ofsynchronisation means that if a series of short-cycle pulses are suddenly output to
operate the motor, the motor may not be able to handle the load and will not rotate. Slew-up and slew-down operation is used to avoid this problem. The following
explains the principle of the operation.
• The pulse cycles are gradually shortened to output the specified number of pulses (slew-up operation).
• The specified number of pulses are output at a regular pulse cycle (constant-speed operation).
• The pulse cycle is gradually extended to output the specified number of pulses (slew-down operation).
The requirement for slew-up and down operations can be understood by studying the torque-speed characteristics of the stepper motor. Below a pulse rate of approximately 300 pps (pulse per second), the torque is consistent. As the pulse rate is increased beyond 300 pps, the torque starts to decrease linearly. The requirement for performing slew-up and down operation is the same concept of driving a manual car. You start off at gear 1 with high power but low speed. As the vehicle accelerate and gain momentum, you can change to a higher gear to increase the speed (with a reduction in torque). A pulse rate of 300 pps corresponding to 90 rpm (1 pulse = 1. 8°, therefore, 300 pulses = 540° per second or 1.5 revolution per second = 90 rpm). The speed of the stepper motor is directly related to the pulse rate. To perform slew-up (acceleration) and slew-down (deceleration), you have to inilially provide a low pulse rate and slower increase the pulse rate when the motor starts to rotate. The rate of increase has to correspond to the torque-speed ratio given in the specification of the motor. Once you have reached the desired speed, you will maintain at that speed. Prior to stopping, you have to slow down to a speed slow enough to stop.
5. EXPERIMENT
1. In this session, you can test your interface and driving circuit for the stepper motor. You should have completed the design and connection to the stepper motor before you start this lab session. Develop a simple software routine to generate a four-phase waveform with a recommended frequency of approximately
150 Hz. Connect the four-phase signals to the oscilloscope to verify the phase assertion sequence and frequency. Connect the four-phase signals to four LEDs to ensure you can light up each LED in sequence prior to any direct connection to the stepper motor. You will have to modify the frequency (e.g. 0.25 Hz to light up each LED for 1 s) to enable visuaJ inspection.
2. Power-up the driver circuit and verify if you are able to rotate the stepper motor.
3. Modify your program to
(i) Reverse the direction of rotation,
(ii) Vary the speed of rotation.
4. Modify your program to accelerate the stepper motor from a low speed to a higher speed, maintain the constant higher speed rotation for a predefined duration and finally decelerate the motor to the initial speed before stopping the motor and hold it in poshion (i.e. lock). You are required to record your observation in the log book with a sketch of the output signal as measured on the oscilloscope. The acceleration or the rate of change of velocity permitted will depend on the characteristic of the stepper motor and the load the motor is driving. You have to derive a suitable acceleration and explain how did you arrive at this value.
6. REFERENCES
[1] Minebea Stepper motor (17PM-M012V) application data sheet.
[2] Douglas W. Jones, Control of stepper motors: A tutorial, University of Iowa, Department of Computer Science, July 2003 (
http://www.cs.uiowa.edu/~jones/step).
[3] Renesas H8/300L series MCU application note, Stepper motor using two-phase excitation, REJ06B0368-0100Z/Rev. 1.00, July 2004 (
http://documentation.renesas.com/eng/products/mpumcu/apn/rej06b0368_h8_300l_slp.pdf).