Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Embedded

Developing more efficient motor control designs

Posted: 11 Apr 2014 ?? ?Print Version ?Bookmark and Share

Keywords:DC? brushless DC? stepper motors. C8051F3xx? MCU? DSPs?

The software for this example builds on the code of the initial example. The main loop now includes an if statement that checks the state of the reverse switch SW1. When the reverse button is pressed, the PWM is disabled and all of the P0 outputs are disabled. When the button is released the motor will reverse directions.

The initialisation functions are similar to Example 1, except that additional pins are configured as push-pull outputs.

The reverse() function is called to reverse the direction of the motor. A flag bit Fwd is used to save the state of the motor. The Fwd bit is toggled and then used to determine which outputs to activate.

There is a potential problem reversing the motor. While the reverse switch SW1 is held down the motor may continue to spin for some time due to the inertia of the motor. While the motor is turning, it will generate a back-emf proportional to the speed of the motor. If the reverse button is released before the motor stops spinning, the motor back-emf will be shorted out by the upper transistors as described below.

Referring to figure 4, suppose Q4 is initially on and the motor is turning in the forward direction. Assume the motor is turning and the back-EMF is about 6 V. Now the switch is pressed and all four transistors are turned off. The right side of the motor will be 6 V higher than the left side of the motor. Then the switch is released and Q3 is turned on. The left side of the motor is pulled up to the supply voltage and the back-emf of the motor is shorted by the internal diode of Q4.

The end result is that the motor stops and all energy stored in the mechanical inertia of the motor is dumped into Q4. This could easily damage the upper transistors during reversal. In some applications with a large frictional load, a fixed delay may be adequate to ensure the motor has time to stop. In other applications, the motor may take several seconds to come to a complete stop. A universal solution to this problem is illustrated by figure 4.

Figure 4: DC motor reversing hazard.

Figure 5: DC motor drive with voltage sensing.

DC motor with soft reversing
This software example for a DC motor builds on the second example and provides soft reversing. To safely reverse a DC motor, it is necessary to determine if the motor is still in motion.

A simple and effective method to determine if the motor is still spinning is to measure the differential voltage across the motor terminals. The ADC can be configured to measure the differential voltage between any two inputs of the analogue multiplexer. The programmable window detector may also be used to determine if the differential voltage has fallen within preset limits. In this example, the motor will reverse after the differential motor voltage remains below 3% of full scale for 100 ms.

The hardware for a DC motor drive with voltage sensing is similar with the addition of two resistor dividers connected to the motor terminals, as shown in figure 5.

The main loop has been modified to detect motor stop. The detectStop() function first configures the ADC to measure the differential voltage. The ADC and window detector are both used in polled mode. If the ADC value is within the preset window a counter is incremented. A 10 ms delay using timer T0 sets the sample time. Any sample outside the window will reset the counter. It will take 10 consecutive samples within the window before exiting the while loop. The detectStop() function will re-configure the ADC to measure the speed potentiometer before returning to the main loop.

Brushless DC motor control
Brushless DC (BLDC) motors offer some advantages over conventional brush-commutated DC motors. The electronics and sensors effectively replace the role of the brushes, offering long life, reduced maintenance, and no brush noise. The torque-speed characteristics of a properly commutated BLDC motor are identical to the DC motor as shown in figure 1.

?First Page?Previous Page 1???2???3???4?Next Page?Last Page

Article Comments - Developing more efficient motor cont...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top