This article discusses about how to control BLDC motor using an 8-bit 8051-based microcontroller. It is suggested to read other sections within this website about BLDC motor control and startup under Project menu in order to have better understanding throughout this article.
There are two microcontroller used for this project. First prototype is using CC2430 by Texas Instrument which has 8051 microcontroller, of course, some peripherals and a Zigbee compliant 802.15.4 radio hardware. The second prototype is based-on Silabs C8051F311 which also based on 8051 microcontroller. Both microcontrollers require external driving components, i.e. P and N channel MOSFET or standard dual H-bridge motor driver. The implementation explained under C language in this article can be ported to different MCS51 C compiler with a slight modification of the code. The CC2430 is selected since it is wireless capable and could fulfill the requirement of author's PhD Study in biomedical engineering, developing wireless surgical microrobots for gastrointestinal tract inspection and therapy implementing pseudokernel approach for multiple BLDC motor control.
Brushless DC Motor Overview
BLDC motor is widely used in many sectors nowadays from the very critical implementations in a small capsular form factor i.e. surgical microrobots to a large scale industrial and automotive applications. It is preferable to use BLDC motor over the conventional DC motor with brushes because of its lifespan, high efficiency, and low maintenance . However it has some drawbacks over the advantages. A controller must present with BLDC motor and it is rather complex to drive BLDC motor compared to the conventional one.
In a BLDC motor, the electromagnets do not move; instead, the permanent magnets rotate and the armature remains static. This gets around the problem of how to transfer current to a moving armature. In order to do this, the brush-system/commutator assembly is replaced by an electronic controller. The controller performs the same power distribution found in a brushed DC motor, but using a solid-state circuit rather than a commutator/brush system .
Three phase BLDC motor is commonly found in the market. The standard connections for three phase BLDC motor can be found in the application note . Figure below is taken from that application note, AN857A, to show both electrical and mechanical diagram of a three phase BLDC motor.
Figure 1. BLDC motor internal diagram
The wiring consists of four connections, namely A, B, C and Neutral/Common and every phase is divided into two equaly separated windings. Six electrical commutations written in the schematic diagram allows one full rotation of BLDC motor driven in stepping mode. The driving method resembles method of driving a stepper motor. Mechanically, the respective six commutations in the schematic diagram above can be illustrated below.
Figure 2. Stepping mode of BLDC motor
Unfortunately, driving BLDC motor in stepping mode does not deliver maximum torque to the motor shaft. At a certain point, the speed can no longer be increased. Consequently, the rotor is left behind and is not able to catch the electrical commutation anymore. The author takes an example of driving Namiki BLDC motor SBL04-08 in stepping mode would give only 17% of the maximum speed than it is driven using Back Electromotive Force Feedback (BEMF). The BEMF refers to using the voltage generated by a spinning rotor to conclude its position.
The maximum torque and acceleration occur when the electrical commutation happens at about 60-90 degrees in advance to the rotor position. However, this absolutely does not happen when the BLDC motor is driven in stepping mode. Because during stepping mode the rotor position is always aligned to the respective electrical commutation (between 0-15 degrees). Therefore, stepping commutation tends to decelarate the motor instead of accelerate it.
Back Electromotive Force Feedback Sensing (BEMF Feedback Sensing)
In order to know the rotor position, we could study the mathematical equation and interpret rotor position from the floating winding. The mathematical equation says that a zero crossing occurs when the rotor position is aligned to the floating winding. We could try to spin the BDLC motor shaft, as if a generator, but this would not help much to precisely locate where the rotor position is. A better approach to study the rotor position is by combining stepping mode and PWM control. The zero crossing happens exactly at the commutated winding. Therefore, the alternating signal captured by an asciloscope from the active winding represents both driving and BEMF feedback at the same time.
Figure 3 and 4 depict stepping commutations on winding A (orange) measured to ground reference and stepping commutation on the same winding but measured to the neutral/common of BLDC motor (blue).
Figure 3. Stepping mode measured on winding A using different references without PWM
Figure 4. Stepping mode measured on winding A using different references with PWM
Figure 3 shows no zero crossing, but figure 4 clearly shows the alternating feedback when the winding is floating (see the inner envelope generated by alternating BEMF around "zero"). The BEMF signal is very low in this stage but can be distinguished by the zero crossing detector shown in figure 5 (in green). Please note that the BEMF is yet not being used to determine the next commutation in this stage. All of those commutations (yellow=A, purple=B, and blue=C) are in stepping mode and is used to study the zero crossing only.
Figure 5. Zero crossing detection during stepping mode on winding A only
Back Electromotive Force Feedback Commutations (BEMF Feedback Commutations)
Since it is known and proven above that the zero crossing happens exactly when the rotor is aligned to the winding, illustration below showing us to which winding it should be detected while the rotor is rotating. For now, let us forget about where the electrical commutation is and consider that the rotor is commutated perfectly by BEMF commutation. Please notice every blinking yellow as the moment when the zero crossing happens and it is time to change to the next electrical commutation.
Figure 6. Zero crossing moments
Having the maximum torque always be delivered to the shaft of the BLDC motor is equal to maintain the electrical commutation as always be at 90 degrees in advance. Therefore, it would give a commutation timing as shown in the illustration below changes from one pair of winding to another. This timing ensures that the torque delivered is much higher than the timing on stepping mode.
Figure 7. Commutation at 90 degrees in advance
Please notice that those two illustrations occur at a high speed commutation. The illustrations are shown as if they are in slow motion. When we superimpose both illustrations, we find out how to commutate the BLDC motor correctly using Back Electromotive Force Feedback. When the zero crossing is detected (the flashing yellow), the commutation changes to the next step in advance. Therefore, the electrical commutation always maintains at least 90 degrees difference to the current rotor position. The given illustration only shows clockwise commutations, however the same rule applied to counter clockwise commutations. See figure below.
Figure 8. BEMF Commutation
to be continued…
- Sensorless BLDC Motor Reference Design and Development Kit, https://www.silabs.com/products/mcu/Pages/SensorlessBLDCMotorRD.aspx
- SPEEDY_BL Brushless Controller, http://www.torcman.de/peterslrk/SPEEDY-BL_eng.html