Home Alternative Control of a single-phase brushless DC motor

Control of a single-phase brushless DC motor

How to use a low cost microcontroller to control a single winding single phase brushless DC motor

In a low-power motor application, where cost is more important than complexity and the need for torque is lower, a single-phase brushless DC (BLDC) motor is a good alternative to a three-phase motor. .

This type of motor has a low cost due to its simple construction, easy to carry out. Plus, you only need a single position sensor and a few switches to control and power the motor winding. Therefore, the combination between motor and control electronics can work properly.

To maintain profitability a low cost motor controller is needed. The control circuit described here can take advantage of two feedback loops. The first, the inner loop, is responsible for commutation control, while the second, the previous loop, is responsible for speed control. The motor speed is referenced by an external analog voltage and fault detection can be activated in case of overcurrent and overtemperature.

Fig. 1 shows the single-phase controller based on Microchip's PIC8F16 1613-bit microcontroller, chosen for its low pin count and built-in peripherals that can control switches, measure motor speed, predict rotor position, and implement fault detection.

This application uses the following peripherals: Complementary Waveform Generator (CWG); signal measurement timer (Signal Measurement Timer, SMT); A/D converter (ADC); D/A converter (DAC); capture compare PWM (capture compare PWM, CCP); Fixed Voltage Reference (FVR); timer; comparator; and temperature indicator. These peripherals are internally connected by firmware, which reduces the number of external pins required.

The full bridge circuit feeding the motor winding is controlled by the CWG output. A Hall sensor is used to determine the position of the rotor. The current through the motor winding is translated into a voltage across the sensing resistor Rshunt for protection against overcurrent.

The speed can be referenced by an external analog input. Fig. 2 offers the motor control diagram; For this application, the rated voltage of the motor is 5V and the rated speed is 2400rpm. The supply voltage of the motor controller is 9V.

The speed reference can be any analog input. The A/D converter module of the microcontroller has 10bit resolution and up to eight channels, so it is suitable for different types of analog inputs. It is used to control the speed reference and the initial duty cycle of the PWM, which is used to initialize the motor speed from the speed reference source.

The initial duty cycle can be increased or decreased by the proportional-integral (PI) controller and the new duty cycle value loaded into the CCP, the PWM output of which is used as the initial source of the CWG to control the modulation of the switches on the low potential side of the full bridge driver and thus the speed of the motor.

inner loop 

The internal feedback loop is responsible for switching control. The output of the CWG, which controls the excitation of the stator winding, depends on the state of the Hall sensor output, which is compared to an FVR by the comparator. The comparator hysteresis is activated to ignore the sensor output noise.

The comparator output oscillates between full bridge forward and reverse mode to produce clockwise or counterclockwise rotation.

The output of the CWG feeds the input of the full bridge circuit breakers.

To produce an electrical cycle, a forward-inverse combination must be executed. One mechanical revolution of the motor requires two electrical cycles, and therefore two forward-reverse combinations must be executed to complete a single clockwise rotation of the motor.

full bridge circuit 

The full-bridge circuit in Fig. 3 is mainly composed of two p-channel MOSFETs as high-side switches and two n-channel MOSFETs as low-side switches. ). The main advantage of the p-channel transistor is the simplicity of the gate driving technique in the switch position on the high potential side, thus reducing the cost of the gate driving circuit.

Although the switches on the high and low potential side can conduct at the same time – cross conduct – this type of switching should be avoided as it will otherwise generate a current trip that could damage controller components. To avoid this, a deadband can be implemented using the CWG count registers.

This provides non-overlapping output signals that simultaneously stop conduction on the high and low potential side.

Ideally, the n-channel and p-channel MOSFETs should have the same on-resistance (RDSon) and total charge (QG) for optimal switching performance.

So while it would be nice to choose a complementary pair of MOSFETs that match these parameters, this is actually impossible due to their different construction; the chip size of the p-channel device must be two to three times that of the n-channel device to accommodate RDSon. But the larger the chip size, the greater the effect of QG. Therefore, when selecting MOSFETs it is important to decide whether RDSon or QG will affect switching performance more and choose accordingly.

fault detection

Exceeding the maximum torque load that the motor allows can cause the motor to stall and the winding to draw maximum current. Therefore, to protect the motor, fault detection should be implemented in case of overcurrent and motor stall.

To implement overcurrent detection, Rshunt is added to the control circuitry, which provides a voltage corresponding to the current flowing through the motor winding. The voltage drop across the resistor varies linearly with respect to the motor current. This voltage feeds the inverting input of the comparator and is compared with the reference voltage based on the product of the Rshunt resistance and the maximum allowed motor stopping current.

The reference voltage can be supplied by the FVR and can be further constrained by the D/A converter. This allows a very low reference voltage to be used, which maintains a low resistance and therefore reduces the power dissipated in Rshunt. If the voltage in Rshunt exceeds the reference, the comparator output activates the automatic shutdown function of the CWG, the output of which will remain inactive while the fault is occurring.

Overtemperature can be detected by the device's built-in temperature indicator, which can measure temperatures from -40 to +85˚C. The internal circuit of the indicator generates a variable voltage relative to the temperature and its voltage is converted to digital by means of the A/D converter. To have a more accurate indicator of temperature, a one-point calibration can be implemented. 

outer loop

The outer loop shown in Fig. 2 controls the speed of the motor under different conditions such as load demand changes, disturbances and temperature drift. Speed ​​is measured by the SMT, which is a 24bit counter-timer with clock and gate logic that can be configured to measure various parameters of the digital signal, such as pulse width, frequency, duty cycle, and difference in time between the edges of two input signals.

The motor output frequency measurement can be performed throughout the SMT period and duty cycle acquisition mode. In this mode, the duty cycle or period of the GTS signal relative to the GTS clock can be acquired. The SMT counts the number of SMT clocks present in one period of motor rotation and stores the result in the captured period register. This register allows to obtain the real frequency of the motor. When the speed reference is compared to the actual speed, a positive or negative error is produced depending on whether the actual speed is higher or lower than the set reference.

This error input into the PI controller, which is a firmware algorithm that calculates a value that compensates for speed variation. This offset value will be added to or subtracted from the initial PWM duty cycle to generate a new value.

Conclusion 

The incorporation of an efficient and flexible micro-controller can have a very favorable effect on cost-sensitive motor control applications. Device efficiency can be measured against the level of integrated peripherals to optimize the control task along with number of chips and memory and package size.

Also, ease of use and time to market are important, especially if different versions of the design are needed.

This article has explained how a low-cost microcontroller can meet these requirements and allow the controller to set the desired speed reference, predict rotor position, implement a control algorithm, measure actual motor speed, and add sensing.



Tags
brush motor; dc engine