原创 MicrocontrollersMakeTwo-phaseBrushlessDCFans

2006-11-24 10:27 5977 9 9 分类: 工业电子
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />



Microcontrollers Make Two-phase Brushless DC Fans Silent, Reliable and Autonomous – and Cut Costs.


By Jacob Lunn Lassen M.Sc. EE., R&D Manager, AVR Applications Group, Atmel.


 



 

 


This paper describes the typical features of fans today and highlight some of the desirable improvements. Preventing damage, reducing noise and consumption are some of the challenges  that designers face. Intelligent control of the two-phase BLDC motors used in fans involve fine resolution speed adjustment, stall detection for slow rotating or blocked fans, TWI/SMBus based communication for single and multi-fan systems and handling of sensorless type of motor. The paper introduces implementation of those techniques using microcontrollers, including a novel method (patent filed) for sensorless control of a two-phase BLDC fan. Complete descriptions are provided by three new application notes available from Atmel.


 


 


Introduction


We all know the sound – the sound of the spinning fans in our PC or laptop. The fans are present to ensure that the temperature of the CPU, GPU and the chip set is not exceeding a safe level. However, fans are widely used in many other applications also: game consoles, servers, telecom systems, power supplies, oscilloscopes, even battery chargers can be equipped with fans. The power dissipation of modern electronic equipment is highly depending on active cooling! It should therefore come as no surprise that hundreds of millions of these small fans are manufactures every year – and the number is increasing.


 


Considering the use of active cooling one must keep several important aspects in mind:


·      If the cooling is insufficient a cooling requiring system will fail and may even      become permanently damaged by the overheating.


·        The host system should be notified if a fans fail - or even better if it is about to fail - to be able counteract to the potential hazard of overheating.


·        A blocked fan should not be driven, as the fan itself may overheat.


 


And, the less critical, but equally important for a well-designed system:


·        The noise from the fan should be minimized to avoid annoyances to people located in close proximity to the system.


·        Finally, one must realise that the fans contribute to the overall power consumption of the system.


 


This gives one very obvious conclusion: keep the fans running, but as slowly as possible without introducing thermal overload to the system and notify the system host if failures occurs.


Small microcontrollers such as the Atmel AVR® tiny family are very suitable for implementation of intelligent semi-autonoumous fans that have the features mentioned above.


This article describes three solutions to control modern two-phase BLDC fans in an efficient, reliable and cost efficient way using Atmel’s AVR microcontrollers from the tiny family.


 


 


Typical cooling fans


The typical “PC-fan” is based on a two-phase BLDC motor. To some extent single-phase motors are also used, but the two-phase motor is dominating in this type of fans. The advantage of the BLDC motor is that it, as opposed to the universal DC motor, has no brushes, and therefore does not suffer from brush wearing, which ensures long lifetime and no need for maintenance.


点击看大图


 


                                                                               Figure 1 - Disassembled PC fan


 


A fan motor consists of stator and a rotor. The rotor has two sets of permanent magnets, that is, two north and two south-pole magnets. The stator is for fans located inside the rotor. It usually has four coils (two interconnected pairs) with ferro-core, which is used to generate the alternating magnetic field that drives the rotor by attracting/rejecting its permanent magnets. A magnetic field generated by a coil is produced when a current flows through the coil; the stronger the current the stronger the magnetic field will be.


 


点击看大图


          Figure 2 - Typical two-phase BLDC motor for fans, with exteriour rotor and Hall sensor.


 


Without brushes the commutation of the motor must be handled by electronics, as opposed to mechanical commutation when brushes are used. ’Commutation’ is when the supply voltage to the motor switches from one stator coil to another, or put in another way, when the current-flow through the coils is alternated.


A magnetic field sensor, called a Hall sensor, detects the polarity of the magnetic field generated by the permanent magnets on the rotor and provide information about the position of the rotor. This information is used by the electronics to trigger the commutation. The control electronics can be implemented by simple means: the digital output from the hall sensor controls a transistor pair, which are driving current through one of the rotor coils at a time depending on the state of the hall sensor output.


An implementation of a simple driving circuit can be seen from Figure 3.


 


点击看大图


 


      Figure 3 - A simple commutation circuit for  driving two-phase BLDC motors.


 


DC fans are usually rated for 5V, 12V, 24V or 48V. Most common is the 12V type. The rated operating voltage will make the fan spin at full speed. The most common way to adjust the speed of the fan is to adjust the supply voltage of the fan. Decreasing the supply voltage decreased the speed of the fan. Evidently a fan host needs an electrical circuitry to adjust the voltage to the fan to control its speed.


 

The maximum power is drawn during acceleration of the fan. The fans can draw from a few to 50 watts of power during acceleration. The power consumption decreases when a steady speed is reached.


As a security measure many fans are equipped with a tacho-output signal, which toggles every time the motor is commutated. This signal gives information to the host system that the fan is running and which speed it is running at.


Further, some fans are implemented more robustly than the simple drive circuit depicted in Figure 3: several IC manufactures offer integrated solutions that features e.g. stall detection.


 


 

Short comings of the traditional fan


 


To avoid overloading the drivers and the rotor coils it is possible to implement stall detection in the control logic of the fan. This will handle the situation where the fan for some reason is blocked, and draws a short circuit current only limited by the resistance in the rotor coils and the capabilities of the driving transistors. If this situation is persisting the drivers and/or coils will potentially overheat. The typical stall detection feature does however not cover the case where the fan is overloaded but is still rotating (e.g. due to broken bearings). Though current monitoring is a more reliable way to avoid this type of hazards, very few fans offers this feature. A few integrated solutions have thermal protection for the internal drivers, which is good, but usually not flexible enough to protect the coil as well.


 


In systems where powerful fans are used it may be necessary to make special considerations in relation to the start-up of the fans: fans draw the most power while accelerating, once reaching steady speed the power consumption drops. If multiple fans are accelerated at the same time these may draw excessive currents from the power supply. It is thus the task of the system host to either limit the acceleration or to not start all fans at the same time to reduce the current peak. It is not common that fans offer acceleration limitation to control and limit the peak current of the fan.


 


As mentioned, the speed of fans can be adjusted by varying their supply voltage. Each fan thus needs an external electrical circuit to adjust the supply voltage to the fan to control its speed. A system with more than one fan need to replicate this variable supply voltage circuit to individually control the speed of each fan. It could be stated that this circuit is simple, but it is nevertheless a cost added in a system, especially seen in the light that the fan already have a built-in circuit that can be facilitated for speed control: the driving transistors are very suitable for controlling the average voltage to the fan and thereby the speed of the fan. If the speed control is integrated in the fan itself it may be possible to reduce the overall cost of the system.


 


Some fans have a separate input signal that is used as a speed reference for the fan. This input is either an analog voltage reference or a Pulse Width Modulated signal that the fan logic can convert to a speed level. The advantage of this is that most hosts can generate e.g. a PWM output without any additional hardware circuitry. The disadvantage of this is however that multi-fan system has to generate multiple PWM outputs to control the speed of multiple fans. It is much more suitable with a common communication channel between the host and the fans. One could e.g. consider the SMBus in PCs.


 


On system level fan failures are today only handle through redundancy. Despite the fact that fans have a fairly well defined lifetime there is not mechanism for the fan to indicate that is has exceeded it guaranteed hour of operation. Except by getting noisier… A more advanced communication between the host and the fan would allow the fan to report back to the host that replacement is recommended. This could also be taken to a level where the fan can actually determine its own state of health and report back if early indications of a failure are present.


 


Very few fans are equipped to handle multiple speed references. Again, consider the multi fan system; the host may, for power and noise reasons, request the fan to run slowly. The fan could however be connected to a temperature sensor locally which informs the fans the local temperature need to be lowered. The fan could evaluate the right speed based on both these speed references. This semi- autonomous fan behaviour would also be able to determine that it should continue to run even if the host fails to generate a correct speed reference.


 


All two-phase BLDC fans today features a hall-sensor for rotor position feedback to be able to commutate the motor correctly. The hall-sensor is as all components a cost added, but especially because is need to mounted rather accurately to provide good feedback to commutate at the right moment. Three-phase BLDC motors have for a long time been controlled in sensorless mode. Eliminating the need for hall sensors. Though the principle is slightly different for two-phase motors, they too can be operated in sensorless mode. Atmel has filled a patent on sensorless control of two-phase BLDC motors and are offering the technique to customers using Atmel microcontrollers.


 


Microcontroller and development tools for fan controller design


 


The series of fan control application notes published by describes how to implement efficient and sophisticated fan control using the 8-bit RISC AVR tiny microcontrollers. The AVR tiny devices in focus are the ATtiny13, and the ATtiny25/45/85 family. These are all cost efficient 8 pin devices with 1kB to 8kB of Flash memory. The data memory ranges from 64 bytes to 256 bytes of SRAM. The devices all features hardware PWM with dual outputs, used to control the speed of the fans. The built-in analog modules include a 10-bit ADC and an analog comparator. The ATtiny25/45/85 family also feature a TWI/SMBus communication interface and complementary PWM outputs with programmable dead time.


 


The implementations described in the application notes are all written in C. The free kick-start version of the high-end IAR compiler can be used to generate both binary and debugging output files. The On-Chip Debugging (OCD) features of the AVR tiny family can be utilized by using AVR Studio in combination with the JTAG ICE mkII, supporting the Debug-Wire protocol. Debug-Wire offers In-Circuit debugging through no more than a single pin, providing efficient OCD features even for 8 pin devices.


 


State of the art solutions for modern fans


 


Common for all the solutions described below is that the speed control is implemented using 8-bit hardware PWM timers. The duty cycle of the PWM is used to control the average voltage seen by the motor and thereby to control the current flow. The benefit of using a hardware based PWM is that CPU resources can be spend on other parts of the application without introducing timing glitches in the PWM output signal. This makes the driving of the motor more efficient.


The 8-bit PWM ensure accurate fan speed: The speed of the fan can be adjusted in steps of less than 0.4%. These very small steps make it possible to adjust the fan to the exact speed desired.


 


Both CPU and PWM timers are clocked from an internal RC oscillator that has an accuracy of +/-2%.


 


Input from external speed references and other analog signals are measured using the built-in ADC, which can sample a close to 100kSPS with approximately 8 bit accuracy.


 


AVR442 - Fan controller with two speed references


 


The application note AVR442 describes how the features of the ATtiny13 AVR microcontroller can be utilised to implement control of a BLDC fan motor that accepts two different speed references. The fan controller receives a PWM signal, which is filtered to generate an analog voltage level, as the primary speed reference. Another input originates from a thermistor, which enables the fan controller to adjust the speed of the fan  according to the temperature input. The temperature input is used as a gain factor for the primary speed reference. The schematic drawing of the circuit is seen in Figure 4.


 


点击看大图


 

      Figure 4 - Circuit for implementing fan control with multiple input signals to control the speed of the fan.


 


To translate the analog input level on the primary speed reference, the PWM input, a look-up table is facilitated. This allows for easy costumisable relations between input and speed response of the fan. Implementation also includes stall/slow rotation detection, with programmable lower limit for the rotations per second.


The implementaiton can be modifed by simple means to replace one of the speed references, namely the temperature sensor, with e.g. a current monitoring input.


An alarm/tacho output are available communicate information about state or speed to a fan host.


 


AVR441 - Fan controller with TWI/SMBus interface


 


The application note AVR441 describes how a fan controller with TWI/SMBus communication interface can be implemented using the ATtiny25/45/85 AVR microcontroller family (see Figure 5).


The fan controller can communicate with a host over a TWI/SMBus – an AVR Butterfly kit is used as host in the example. This communication protocol supports up to 127 uniquely addressable units on the same bus and therefore provides unmatched scalability to allow fans to be added to a system.


点击看大图


 


     Figure 5 – Circuit for implementing fan control with TWI/SMBus communication interface.


 


Through the communication interface fans are individually instructed to adjust speed and report back what the actual speed is. As the ATtiny25/45/85 has a built-in temperature sensor the temperature of the fan control electronics can be measured and reported to the host.


The implementation features stall detection and restart after a programmable delay.


 


AVR440 - Sensorless control of two-phase BLDC fan


 


A novel method for sensorless control of BLDC fan motors is presented in AVR440. Sensorless control of motors is very suited for fan applications where the initial load of the fan is well-defined.


The implementation allows for a cost reduction of the fan control circuit by eliminating the need for a hall sensor. A diagram of the implementation can be seen in Figure 6.


 


点击看大图


 


     Figure 6 – Circuit for implementing sensorless control of two-phase BLDC fan.


 


The Electromotive Force (EMF) of the coil not driven at a given moment is used to determine when to commutate. This novel method resembles the technique used widely for three-phase BLDC motors.


The EMF of the passive coil is measured using the built-in ADC and commutation is made when a number of conditions are fulfilled. The EMF can be measured uncontaminated by PWM switching noise as the ATtiny13 PWM timer can trigger the ADC sampling when the PWM is guaranteed not to switch.


This implementation also features stall/slow rotation detection.


 


About the author


Jacob Lunn Lassen, M. Sc. EE.


R&D Manager, AVR Applications Group


AVR Standard Products, Atmel.


 


He has worked in AVR Applications Group since 2000. His responsibilities are EMC testing and support, Applications Notes and Reference Designs as well as feature specification for AVR IC design.


 


Ressources


www.atmel.com/products/avr/mc/


 

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
我要评论
0
9
关闭 站长推荐上一条 /4 下一条