Designing a MCU-driven permanent magnet BLDC motor controller: Part 2

David Swanson and Kurt Perski, STMicroelectronics

July 15, 2008

David Swanson and Kurt Perski, STMicroelectronics

Having reviewed the basics of BLDC motor control in Part 1, the design effort can begin.. The first quest is to select a microcontroller. Looking in the marketplace there are several microcontrollers that might be able to do the job.

One comes to mind that has the brushless motor peripheral set built in for just such a task we have before us, the ST7MC family of micros. As a result the following design of a simple brushless motor control will be based on the ST7MC motor control microcontroller and some additional supporting hardware.

Using a different microcontroller will mean some changes in how BEMF is sensed and how different timers are used. In general the same tasks discussed here using the ST7MC can be ported over to other, less adapted to this application, micros.

Even the most basic of control modules have four basic components, brains (a micro), muscles (outputs), senses (inputs), and some sort of voltage regulation (for the micro).

Figure 10. Basic Three Phase Motor Control Block Diagram.

This circuit will drive each phase winding bi-directionally, sense zero crossings, discern when to commutate, and then perform the commutation. Other options include taking input commands and translating them into speed or current control information.

To drive the phases bi-directionally, a 3 phase inverter is implemented using FET pre-drivers and 6 MOSFETS. The inverter is the muscles of the system. For the brains, the ST7MC motor control micro was selected.

This micro has a built-in 3 phase brushless controller cell making this job fairly simple to implement. The software passes the cell a few parameters and the cell does most of the work.

Figure 11.The schematic

The Brains
The schematics shown have several things that probably need some explanation. Other stuff such as the reset circuit or the oscillator needs little or no explanation. Each function will be explained as to why it is there and how it will be used to drive a brushless motor.

The ICP Interface provides a method of flashing (programming) the micro while in the application circuit. The Speed command input circuit just buffers the input commanded voltage to protect the micro from adverse or damaging voltages.

This input is designed to interpret a PWM duty cycle so it is connected to an input capture timer pin. There is an op-amp built into the micro for the purpose of sensing over-current (these are realized in pins OAP, OAN, and OAZ). R30 is a current sensing resistor. It is attached to the Inverter low-side MOSFETs .

The inverter is driven by ports MC00 through MC05. These pins are connected to the three FET pre-driver ICs. The motor BEMF voltages are sensed by the ports MCIA, MCIB, and MCIC.

Also included is an external reference voltage set up on MCCREF. Resistors R17-R19 connect the micro directly to the phase outputs for the purpose of sensing the zero crossing events. Resistors R10, 11, and 13 are used switch the type of BEMF sensing - low-side or high-side of the PWM.

The Brawn
The inverter consists of three bootstrap MOSFET pre-drivers, the MOSFETs, and the relevant supporting circuitry. The bootstrap is preferred to a charge pump because a charge pump can inject EMI into a system.

The limitation a bootstrap system has is keeping the upper MOSFET gate charged in DC conditions. For a brushless system, there will always be commutation, and thus, a charging source for the high-side gates.

The Voltage regulator is a simple 5V regulator with a power on reset function. Some extra resistors are placed to provide a battery voltage input to one of the micro's A to D converter pins.

A 15V zener diode (D6) is needed to protect the L6387 from voltage exceeding 17V. The L6387 supply must not exceed its absolute maximum voltage of 17V. This added protection may not be necessary if a different FET pre-driver is chosen.

The Software
The software is broken down into functional blocks depending on what state in the cycle the motor is in. First there is the alignment phase. During alignment, the rotor is forced to a known position. Then, in switched mode, the rotor is stepped blindly like a stepper motor causing the rotor to the ramp-up in speed while BEMF is monitored.

Finally, there is the auto-switched mode when there is enough BEMF to reliably detect a zero crossing. The auto-switched mode is broken down into different speed ranges to accommodate the differing timing needs for optimum commutation.

< Previous
Page 1 of 2
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER