电源电路图
Getting Started with the MAX6651 Fan Controller(MAX6651风扇控制器电路)
Abstract: The MAX6651 fan controller is configured for closed-loop operation in this application note. The stand-alone MAXQ2000-based firmware is loaded into a MINIQUSB board connected to a MAX6651 EV (evaluation) kit, and the target fan speed is selected by momentarily connecting a pin to ground.
Note that up to three additional 12V DC fans can be connected, however, the system only regulates the speed of the first fan. All fans should be of the same type.
This example assumes a nominal fan speed of 6000RPM. If the fan's maximum speed is less than the target, the fan will not reach the target speed and a fault will be detected. If using a slower fan, load the KSCALE=2 or KSCALE=1 firmware in step 2 below. If using a faster fan, load the KSCALE=8 or KSCALE=16 firmware in step 2.
Optionally, up to three additional 12V DC fans can be connected, however, the system only regulates the speed of the first fan. All fans should be of the same type.
Connect the second, third, and fourth fans as follows:
Optional: fan 2 (feed-forward regulation based on fan 1)
Fan +12V = MAX6651EVKIT FAN1+
Fan GND = MAX6651EVKIT FAN1- (ground return)
Fan Tach = MAX6651EVKIT FAN1T (MAX6651 TACH1)
Optional: fan 3 (feed-forward regulation based on fan 1)
Fan +12V = MAX6651EVKIT FAN2+
Fan GND = MAX6651EVKIT FAN2- (ground return)
Fan Tach = MAX6651EVKIT FAN2T (MAX6651 TACH2)
Optional: fan 4 (feed-forward regulation based on fan 1)
Fan +12V = MAX6651EVKIT FAN3+
Fan GND = MAX6651EVKIT FAN3- (ground return)
Fan Tach = MAX6651EVKIT FAN3T (MAX6651 TACH3)
These extra fans can be connected in any order. All fans are driven with the same voltage. Only the fan connected to MAX6651 TACH0 will be regulated; any fan connected to TACH1, TACH2, or TACH3 can be monitored but not regulated.
If using the MAXQ2000 EV kit instead of MINIQUSB+, follow the normal setup, except in step 1 connect as follows:
MAXQ2000 P6.0 = MAX6651 SCL
MAXQ2000 P6.1 = MAX6651 SDA
MAXQ2000 VDDIO = MAX6651 VCC
MAXQ2000 GND = MAX6651 GND
The MAXQ2000 EV kit does not use USB to load firmware. Instead, use the MAXQ2000 JTAG 001 loader board that comes with the MAXQ2000 EV kit.
The stand-alone firmware was compiled using the IAR Embedded Workbench®, version 3.2 for MAXQ® (available as part of the MAXQ2000 EV kit).
Source file main.c contains the main loop and the MAX6651's specific functions. For convenience, there are five prebuilt versions of the demo project, one for each of the prescaler values KSCALE=1, 2, 4, 8, and 16. Each of these projects has its own customized version of main.c, for example, main_Kscale_4.c. These files all have the same structure. Function debug_puts() is defined as a placeholder, to handle optional diagnostic messages. Source file max6651.h contains symbolic definitions for the MAX6651 registers. These symbolic definitions can be combined using the C/C++ bitwise Boolean OR operator|as demonstrated by this statement:
MAX6651_R02_Config = 0 | MAX6651_Config_ClosedLoop | MAX6651_Config_12VTach | MAX6651_Config_ClosedLoop_PreScale_4 ;
Placing each bit field's symbolic constant on its own line makes the source code more readable and easier to maintain.
Function MAX6651_Init() initializes the MAX6651 device by copying the initial register values from global variables: MAX6651_R00_Speed, MAX6651_R02_Config, MAX6651_R04_GPIOdefinition, MAX6651_R08_AlarmMask, and MAX6651_R16_Count. (Global variables are used instead of C function arguments, because stack memory is more limited than data memory.) If the device address is not specified, then all four of the possible device addresses are searched prior to writing the register data. This simplified example code does not check for errors.
The closed-loop fan speed is determined by the value in register 0. This register value is calculated by function MAX6651_calculate_R00_Speed_from_RPM(). This value depends on the prescaler setting of global variable MAX6651_R02_Config.
The default fan speed and the four software preset speeds are defined by the preprocessor constants: FAN_SPEED_INITIAL_RPM, FAN_SPEED_PRESET_GPIO_K1_IN_RPM, FAN_SPEED_PRESET_GPIO_K2_IN_RPM, FAN_SPEED_PRESET_GPIO_K3_IN_RPM, and FAN_SPEED_PRESET_GPIO_K4_IN_RPM.
When an alarm condition happens (such as the output reaching its minimum or maximum value without achieving fan-speed regulation), the ALERT output is asserted and the EV kit LED1 lights. Once asserted, this alarm condition remains in effect until the status register is read. The main loop calls MAX6651_Status_Read() to read the alarm status register, thereby clearing any prior fault condition. This function also contains optional code to read the MAX6651's GPIO pins and the tachometer count of up to four fans.
Source files CmodComm.c and CmodComm.h provide the register read/write functions CmodSMBusWriteByte() and CmodSMBusReadByte(). These functions are implemented using the maxqi2c.c library.
This example has briefly shown the MAX6651 regulating fan speed in closed-loop mode, automatically responding to power-supply fluctuation and fan-hardware faults. Complete source code for a project compiled with IAR Embedded Workbench has been given and discussed. Consult the MAX6651 data sheet for further details about device operation.
IAR Embedded Workbench is a registered trademark of IAR Systems AB.
MAXQ is a registered trademark of Maxim Integrated Products, Inc.
Windows is a registered trademark of Microsoft Corp.
Windows Vista is a registered trademark of Microsoft Corp.
全部0条评论
快来发表一下你的评论吧 !