Intermediate
30 min

Elevate your equipment's comfort with EMC2103 and TM4C129ENCPDT

Quietly efficient, delightfully cool

Fan 6 Click with Fusion for Tiva v8

Published Jul 26, 2023

Click board™

Fan 6 Click

Dev. board

Fusion for Tiva v8

Compiler

NECTO Studio

MCU

TM4C129ENCPDT

Take charge of your comfort with our fan speed management system, allowing you to adjust fan speeds for a personalized cooling experience easily

A

A

Hardware Overview

How does it work?

Fan 6 Click is based on the EMC2103, an SMBus-compliant fan controller with up to 3 external and one internal temperature channel from Microchip. It allows the user to program temperatures generated from external sources to control the fan speed. This functionality also supports DTS data from the CPU. By pushing DTS or standard temperature values into dedicated registers, the external temperature readings can be used with the external diode(s) and internal diode to control the fan speed. The EMC2103 from Microchip also includes a hardware programmable temperature limit and dedicated system shutdown output for thermal protection of critical circuitry. The EMC2103 supports a high or low-frequency PWM driver. The output can be configured as either push-pull or open drain, and the frequency ranges from 9.5Hz to 26kHz in four programmable frequency bands. The EMC2103 includes an RPM-based Fan Speed Control Algorithm. This fan control algorithm uses Proportional, Integral, and Derivative terms to automatically approach and

maintain the system's desired fan speed to an accuracy directly proportional to the accuracy of the clock source. The EMC2103 supports DTS (Intel's Digital Temperature Sensor) data in the Fan Control Look-Up Table. Intel's DTS data is a positive number representing the processor's relative temperature below a fixed value called TCONTROL, which generally equals 100°C for Intel Mobile processors. For example, a DTS value of 10°C means the actual processor temperature is 10°C below TCONTROL or equal to 90°C. The EMC2103's RPM-based Fan Speed Control Algorithm has programmable configuration settings for parameters such as ramp-rate control and spin-up conditions. The fan driver automatically detects and attempts to alleviate a stalled/stuck fan condition while also asserting the ALR pin. The tachometer measurement circuitry is used in conjunction with the RPM-based Fan Speed Control Algorithm to update the fan driver output. Additionally, it can be used in Direct Setting mode as a diagnostic for host-based fan

control. This method monitors the TACH signal in real-time. It constantly updates the tachometer measurement by reporting the number of clocks between a user's programmed number of edges on the TACH signal. The External Diode 1 channel can support a diode-connected transistor (such as a 2N3904) or a substrate transistor requiring the BJT or transistor model (such as those found in a CPU or GPU). The External Diode 2 channel supports any diode connection or can be configured to operate in an anti-parallel diode (APD) mode. The MIC2253 is a constant frequency, pulse-width modulated (PWM) peak current-mode step-up regulator. A reference voltage is fed into the PWM engine, where the duty cycle output of the constant frequency PWM engine is computed from the error, or difference, between the REF and FB voltages. The PWM engine encompasses the circuit blocks to implement a current-mode boost switching power supply, allowing Fan 6 click to drive a 12V fan.

Fan 6 Click hardware overview image

Features overview

Development board

Fusion for TIVA v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different 32-bit ARM® Cortex®-M based MCUs from Texas Instruments, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over a WiFi network. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for TIVA v8 provides a fluid and immersive working experience, allowing access

anywhere and under any circumstances at any time. Each part of the Fusion for TIVA v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.

Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for TIVA v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

Fusion for Tiva v8 horizontal image

Microcontroller Overview

MCU Card / MCU

default

Type

8th Generation

Architecture

ARM Cortex-M4

MCU Memory (KB)

1024

Silicon Vendor

Texas Instruments

Pin count

128

RAM (Bytes)

262144

Used MCU Pins

mikroBUS™ mapper

General-Purpose I/O
PD0
AN
Shutdown
PK3
RST
Enable
PH0
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
General-Purpose I/O
PL4
PWM
Alert Interrupt
PQ4
INT
NC
NC
TX
NC
NC
RX
I2C Clock
PD2
SCL
I2C Data
PD3
SDA
Power Supply
5V
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

Fan 6 Click Schematic schematic

Step by step

Project assembly

Fusion for PIC v8 front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Fusion for Tiva v8 as your development board.

Fusion for PIC v8 front image hardware assembly
GNSS2 Click front image hardware assembly
SiBRAIN for PIC32MZ1024EFK144 front image hardware assembly
GNSS2 Click complete accessories setup image hardware assembly
Board mapper by product7 hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
NECTO Compiler Selection Step Image hardware assembly
NECTO Output Selection Step Image hardware assembly
Necto image step 6 hardware assembly
Necto image step 7 hardware assembly
Necto image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto PreFlash Image hardware assembly

Track your results in real time

Application Output

1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support

Library Description

This library contains API for Fan 6 Click driver.

Key functions:

  • fan6_read_eeprom - This function reads 256 bytes from EEPROM

  • fan6_set_pwm_mode - This function sets Fan on PWM mode and determines Fan speed (PWM duty)

  • fan6_read_tachometer - This function reads current tachometer value and calculates that value in rpm

Open Source

Code example

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.

/*!
 * \file 
 * \brief Fan6 Click example
 * 
 * # Description
 * This demo application reads tachometer value which is calculated as rpm value, and reads
 * temperature of external diode in celsius value.
 *
 * The demo application is composed of two sections :
 * 
 * ## Application Init 
 * Initializes device configuration.
 * 
 * ## Application Task  
 * Reads tachometer value which is calculated as rpm value, and reads
 * temperature of external diode in celsius value. All this results logs on USB UART. Repeats operation
 * every 500 ms.
 * 
 * \author MikroE Team
 *
 */
// ------------------------------------------------------------------- INCLUDES

#include "board.h"
#include "log.h"
#include "fan6.h"

// ------------------------------------------------------------------ VARIABLES

static fan6_t fan6;
static log_t logger;

static uint32_t tachometer;
static uint8_t duty_cycle = 0;

// ------------------------------------------------------ APPLICATION FUNCTIONS

void application_init ( void )
{
    log_cfg_t log_cfg;
    fan6_cfg_t cfg;

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, "---- Application Init ----" );

    //  Click initialization.

    fan6_cfg_setup( &cfg );
    FAN6_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    fan6_init( &fan6, &cfg );
    
    fan6_enable_device( &fan6, 1 );
    Delay_ms ( 500 );
    
    fan6_default_cfg( &fan6 );
    tachometer = 0;
}

void application_task ( void )
{
    float temp_diode;

    temp_diode = fan6_get_temperature( &fan6, FAN6_INTERNAL_TEMP_READ_REG );
    log_printf( &logger, "Temperature of DIODE is: %f - Cels \r\n", temp_diode );
    
    fan6_set_pwm_mode( &fan6, duty_cycle );
    
    duty_cycle += 5;
    
    tachometer = fan6_read_tachometer( &fan6 );
    log_printf( &logger, "Tachometer value is: %lu rpm \r\n", tachometer );
    log_printf( &logger, "---------------------------------------- \r\n", tachometer );
    
    Delay_ms ( 500 );
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.