How does it work?
Fan 8 Click as its foundation uses the MAX6615, a compliant fan controller, and accurately two temperature-channels monitors from Analog Devices. The MAX6615 monitors either the internal die temperature and the temperature of external thermistors connected on the onboard headers labeled as TH and reports temperature values in digital form using a 2-wire serial interface. To adjust the speed of the cooling fans, the temperature data controls the duty cycle of a PWM output signal, which minimizes noise when the system is running cool but provides maximum cooling when power dissipation increases.
Fan 8 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings with a maximum frequency of 400kHz. Besides, it also allows the choice of the least significant bit of its I2C slave address by positioning the SMD jumpers labeled as ADDR SEL to an appropriate position marked as 0 and 1. This way, the MAX6616 provides the opportunity of the nine possible different I2C addresses by positioning the SMD jumper to an appropriate position.
The MAX6615 monitors the fans’ tachometer signals to detect fan failure. When the fan tachometer count is larger than the fan tachometer limit, the fan is considered failing. If that happens, the FAN_FAIL output represented by the FF pin, routed on the PWM pin of the mikroBUS™ socket, is asserted. Also, the MAX6615 features an over-temperature indicator routed on the AN pin of the mikroBUS™ socket, which sets high when a thermal fault occurs and can be used as a warning flag to initiate the system shutdown or to throttle clock frequency. In the event of any of these irregularities, the MCU will also receive information from an FLT pin (fault indicator), routed on the INT pin of the mikroBUS™ socket, in case of further necessary configurations necessary for proper operation.
The Fan 8 Click supports an external fan power supply, connected to the input terminal labeled as VFAN with the value of 5V or 12V, while the fan connection wires can be connected to the onboard headers labeled as FAN1 and FAN2.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Brushless
Applications
Can be used for networking equipment, servers, or other applications requiring cooling and temperature control
On-board modules
MAX6615 – compliant fan controller, and accurately two temperature-channels monitors from Maxim Integrated, now part of Analog Devices
Key Features
Two fan-speed controller, dual-channel temperature monitor, external thermistors, fail-safe system protection, shutdown in case of overtemperature, programmable I2C addresses, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V,External
Pinout diagram
This table shows how the pinout on Fan 8 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1-JP2 | ADDR SEL | Right | I2C Address Selection 0/1: Left position 0, Right position 1 |
JP3 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
TH1-TH2 | TH1-TH2 | Populated | External Thermistor Connection Headers |
J1-J2 | FAN1-FAN2 | Populated | Fan Connection Headers |
Fan 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 5 | V |
Fan Supply Voltage VFAN | – | 5 (12) | – | V |
Accuracy | – | – | ±4 | °C |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the FAN 8 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for FAN 8 Click driver.
Key functions:
fan8_set_duty_cycle
– This function sets the duty cycle of the selected fan channel and waits until the duty cycle is set at the PWM output.fan8_measure_rpm
– This function measures the RPM of the selected fan channel.fan8_read_temperature
– This function reads the temperature from the thermistor attached to the selected temperature channel.
Examples description
This example demonstrates the use of FAN 8 click board.
void application_task ( void ) { static uint8_t duty_cnt = FAN8_MIN_DUTY_CYCLE; static int8_t duty_inc = FAN8_DUTY_CYCLE_STEP_10; uint16_t fan_rpm = 0; float temperature = 0; if ( duty_cnt == FAN8_MAX_DUTY_CYCLE ) { duty_inc = -FAN8_DUTY_CYCLE_STEP_10; } else if ( duty_cnt == ( FAN8_MIN_DUTY_CYCLE + FAN8_DUTY_CYCLE_STEP_10 ) ) { duty_inc = FAN8_DUTY_CYCLE_STEP_10; } duty_cnt += duty_inc; log_printf( &logger, " - Channel 1 values -rn" ); fan8_set_duty_cycle ( &fan8, FAN8_FAN_CHANNEL_1, duty_cnt ); log_printf( &logger, " PWM Duty Cycle : %drn", ( uint16_t ) duty_cnt ); fan8_measure_rpm ( &fan8, FAN8_FAN_CHANNEL_1, FAN8_2_PULSES_PER_REVOLUTION, &fan_rpm ); log_printf( &logger, " Last measured fan RPM : %urn", fan_rpm ); fan8_read_temperature ( &fan8, FAN8_TEMP_CHANNEL_1, &temperature ); log_printf( &logger, " Temperature : %.2f Crnrn", temperature ); log_printf( &logger, " - Channel 2 values -rn" ); fan8_set_duty_cycle ( &fan8, FAN8_FAN_CHANNEL_2, duty_cnt ); log_printf( &logger, " PWM Duty Cycle : %drn", ( uint16_t ) duty_cnt ); fan8_measure_rpm ( &fan8, FAN8_FAN_CHANNEL_2, FAN8_2_PULSES_PER_REVOLUTION, &fan_rpm ); log_printf( &logger, " Last measured fan RPM : %urn", fan_rpm ); fan8_read_temperature ( &fan8, FAN8_TEMP_CHANNEL_2, &temperature ); log_printf( &logger, " Temperature : %.2f Crnrn", temperature ); if ( !fan8_check_fault_indicator ( &fan8 ) ) { log_printf( &logger, " Fault detected!rnrn", temperature ); } Delay_ms( 500 ); }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.FAN8
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.