Keeping cool

Oct. 26, 2006
Embedded microcontrollers manage dc fans for better cooling while dissipating less energy.

Vincent Ko
System Engineer
Freescale Semiconductor
Austin, Tex.

The basic construction of a brushless-dc fan consists of a fan blade attached to a permanentmagnet rotor that surrounds the electromagnetic coils of the stator and associated control electronics.


A typical biphase brushless fan motor is made from a permanentmagnet rotor assembly that surrounds four electromagnetic coils. The coils work in pairs, with coils A and C forming one phase and coils B and D the other phase. A Halleffect sensor monitors rotor position, providing feedback to the embedded MCU for commutation, speed regulation, and fault detection.


Commutation between the two phase windings in the dc fan takes place electronically by alternately applying power to L1 and L2. Dead zones between the power pulses limit current for speed control and helps minimize a cogging effect when the rotor magnets align with the stator coils.


The term "dc fan" today normally refers to the type of fan that uses a biphase, brushlessdc (BLDC) motor. These fans are widely found in chip cooling or chassis ventilation. Yet cooling requirements have become more sophisticated as highperformance electronics grow more complex — and power hungry. Just count the number of cooling fans installed in a single personal computer today.

In the past, only a simple motor driver optimized for a constant fan speed controlled these fans. Those designs are only acceptable today for general cooling. More sophisticated products, such as microprocessors and high-performance electronics, need a controlled airflow as temperatures change with shifting demands. When cool, the fan should push only a minimal amount of air to save power. As the temperature of the device rises, airflow should rise so performance is unaffected.

Surprisingly, slower airflows may actually cool better. High airflow rates can create a vacuum between the device and the fan. This "forced-air" vacuum then acts more like a thermal insulator than a cooling airflow. Device temperatures buildup faster and to a higher degree.

Until recently, expense prohibited creating "smart" fan controls that adjust fan operation to meet varying demands. Low-cost microcontrollers (MCU) broke the price barrier to create economical variable-speed dc fans. The use of MCUs also includes several fringe benefits over more traditional designs.

MCUs normally contain flash memory that lets designers easily change control algorithms to make the same drive electronics fit different motor types. That translates into lower manufacturing costs through inventory reduction and volume purchasing.

Programmable memory also lets the designer match fan speed against the temperature curve to tailor fan operation. Temperature feedback comes directly from the ambient environment or from other electronics in the system. For example, many PC motherboards already contain several thermal monitors for critical devices. The MCU can tap these existing sources rather than create new ones at added cost.

Should faults occur, such as a malfunction or blockage that stops motor rotation, the MCU can take corrective action like shutting down the system to prevent further damage. Likewise, it can alert the system controller to the breakdown and even initiate its own repair order.

Most BLDC fan-motor designs consist of a permanent-magnet rotor surrounded by coil windings mounted on the stator poles. As its name implies, BLDC motors have neither brushes nor a commutator. Commutation takes place electronically when the rotor hits specific positions in its rotation. In most instances, Halleffect devices sense rotor position. The Hall-effect signal triggers electronic commutation at the proper time.

The typical biphase BLDC motor has one pole-pair per phase for a total of four poles mounted at right angles to each other. Each commutation step rotates the rotor 90°. Four commutation steps produce one complete 360° revolution.

Current flowing through the winding of one pole pair induces a magnetic field from pole to pole. The permanent magnet in the rotor aligns with the magnetic field between the poles. Once aligned, the energized coils are turned off and the other pair turned on. The process forms a commutation step. The permanent magnet in the rotor is both pushed and pulled by the new magnetic field, so that the rotor begins to turn.

As the permanent magnet moves into alignment again, the next commutation step turns off the second pole pair and again turns on the first pole pair. Only two commutation steps have spun the rotor 180°. Two more commutation steps will return the rotor to its original starting position making one complete revolution.

If power is maintained in the poles as the rotor comes into alignment, the pole magnetic field will try to capture the rotor, slowing its rotation. To minimize this action, power to the poles is turned off just before the pole and magnet align. The rotor then coasts past the dead pole before power is applied to the next pole pair to pull the rotor to it. The small period where no power flows in either pole pair is called the dead time.

A key concern for motor control is to prevent rotor lockup. The time that current switches between pole pairs is critical. Energizing a pair of coils for too long kills rotor inertia and the motor stops turning. Switching commutation too early loses control of rotor rotation and will eventually stall the motor. Rotor position is determined by a Halleffect sensor placed at a 45° angle between the stator coils.

Output from the Hall-sensor changes based on the magnetic polarity of the rotor. The MCU simply monitors the rising or falling edge to detect rotor motion and position.

One commutation step in a biphase motor corresponds to a shaft rotation of 90° — onequarter of a revolution. So changing the period of commutation controls the overall speed of the motor. The total commutation period includes when power is on to a pole pair and the dead time when all poles are off.

The on-and-off power of the commutation period resembles the output from a pulse-width modulator, or PWM. The MCU uses a PWM to control the period of the motor drivers and, thus, set fan speed. Feedback from the Hall sensor monitors actual fan rpm and indicates when commutation should take place.

The MCU continuously monitors motor speed by measuring the output period of the Hall-effect sensor. A period that runs shorter than the target length indicates motor speed is too fast. The MCU lengthens pole-pair dead time until the target period is reached. Conversely, the dead time is shortened if the motor turns slower than the target value.

Thermal sensors monitor temperature conditions in the equipment and send those values to the MCU in the fan. The MCU then updates the target fan speed based on preset values in its software.

Dramatic changes in dead time will stall the fan motor. To prevent this, the MCU software is programmed to make only gradual changes to the dead time.

A problem with biphase motors is that there's no guarantee they'll turn in the right direction when started. Obviously, fans must turn in only one direction for proper airflow. Commutation order won't help as its sequence is the same for both directions of rotation. The starting position of the rotor must be known to apply power to the proper coils for initial motion. Initial rotor alignment information comes from the Hall sensor.

When power is first applied to the motor, there is an equal chance the rotor will start turning in either direction. Some motor manufacturers design an asymmetry into the stator to force rotation more in one direction than another; but that does not always guarantee rotation in the right direction.

The Hall-effect sensor again comes into play to verify direction of rotation. The MCU uses an edge detection technique to verify the motor is turning in the proper direction. For example, correct rotation is indicated by a rising edge on the Hall-effect sensor when a specific stator coil energizes. If the MCU senses a falling edge, the motor is rotating backwards.

A jammed rotor or other problem that keeps the rotor from turning is a motor fault. The Hall sensor is again used to look out for a stalled rotor. As the fan turns, the Hall sensor sends a series of pulses into the MCU. If those pulses stop, the MCU can kill the PWM drive to the coils to prevent overheating. It can also sound a buzzer, alert the operator, and notify the system about the malfunction.

The most common temperature sensor used in these fans is a forward-biased diode. When connected to a constant-current source, its forward voltage drop changes with the ambient temperature. The diode voltage is measured using an on-chip analog-to-digital converter ( ADC) found in many MCUs. However there is another lower-cost alternative.

Assume the maximum target speed of the fan is 4,000 rpm. That implies 67 rps or 15 msec/rev. As mentioned above, the rotor requires four commutation steps to complete one mechanical revolution. In the other words, the PWM driving period is always longer than 3.75 msec. This value is a rather long time for a general 8-bit MCU. Even with an 8-bit MCU running at 4 MHz, 3.75 msec takes 15,000 CPU-bus cycles. That implies the MCU is mostly idle during the PWM period. Instead of using an MCU that has an embedded ADC, there is ample bandwidth to perform emulated ADC functions based on a lower cost MCU that includes only an analog comparator rather than a full ADC.

An emulated ADC function is created by connecting the temperature sensor to the inverting input terminal of the comparator. Then connect the junction of a simple resistor-capacitor (RC) network to the noninverting terminal. When the ADC is not measuring or is in the idle state, the capacitor C is fully discharged. When the measurement begins, voltage across C starts to ramp up. The MCU timer measures the time the capacitor takes to charge. When the voltage of the capacitor equals the voltage of the temperature sensor, the comparator output triggers and the timer count is recorded. Given that the value of R and C are known, the RC charge profile is also known. The voltage across the temperature sensor is read using a simple table lookup from the value of the timer.

There are literally thousands of motor designs in the market. Some are based on high-end processors such as a 32-bit DSP while others use low-end 8-bit processors. Motor designs are specific to the end applications. Obviously, a motor control designed for a washing machine is not usable for the power-steering unit of a car. The choice of MCU comes out of what the motor must produce for speed, torque, size, precision of motion, and so forth.

A simple 8-bit processor is all that is needed to create the dc cooling fan. Given the calculation shown above for the temperature monitor, a general-purpose 8-bit MCU running a 4-MHz bus will provide more than enough processing power to drive a 4,000-rpm fan. It will also need some internal modules, such as a simple timer for PWM timing, an internal clock source to eliminate space and cost for an external crystal, and an analog comparator for temperature measurement.

The designer should also consider the physical size of the MCU. Dc fan electronics are usually hidden under the motor shaft inside the fan. The printedcircuit-board area is limited. Small geometry packages would certainly be a big help. MCUs that do not need external crystals are a big plus in terms of reducing printed-circuit-board area and cost.

MAKE CONTACT
Freescale Semiconductor, (800) 521-6274,
freescale.com

Sponsored Recommendations

NEW Low Profile, Ultra Compact Power Supplies

March 13, 2024
Learn more HERE about Altech's Power supplies!

Altech's Liquid Tight Strain Relifs Catalog

March 13, 2024
With experienced Product Engineers and Customer Service personnel, Altech provides solutions to your most pressing application challenges. All with one thought in mind - to ensure...

Industrial Straight-Through Cable Gland

March 13, 2024
Learn more about Altech's cable glands and all they have to offer for your needs!

All-In-One DC-UPS Power Solutions

March 13, 2024
Introducing the All-In-One DC-UPS, a versatile solution combining multiple functionalities in a single device. Serving as a power supply, battery charger, battery care module,...

Voice your opinion!

To join the conversation, and become an exclusive member of Machine Design, create an account today!