Ensure the stability and performance of your embedded solutions
A
A
Hardware Overview
How does it work?
HW Monitor Click is based on the LM96080, a system hardware monitor from Texas Instruments that performs power supply, temperature, and fan monitoring for various embedded systems. The LM96080 provides seven analog inputs spread across the terminals on the top of the board labeled from IN0 to IN6, a temperature sensor, a delta-sigma ADC, two fan speed counters, watchdog registers, and a variety of inputs and outputs on a single chip. It continuously converts analog inputs to 10-bit resolution with a 2.5mV LSB, yielding input ranges of 0 to 2.56V. The analog inputs are intended to be connected to the several power supplies present in a typical communications infrastructure system. This Click board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings with a maximum frequency of 400kHz. The LM96080 includes an analog filter on the I2C lines that improves noise immunity and supports the timeout reset function on SDA and SCL pins, preventing I2C bus lockup. Also, the LM96080 allows choosing the least significant bits (LSB) of its I2C slave address using the SMD jumpers labeled ADDR SEL. The LM96080 is especially suited to interface with linear and digital temperature sensors such as LM73, LM75, LM56, LM57,
LM26, LM27, LM26LV, or other LM96080 via the BTI pin on one of the unpopulated headers. Temperature can be converted to a 9-bit or 12-bit two's complement word with resolutions of 0.5°C or 0.0625°C LSB, respectively. On the same header, in addition to the BTI pin, there is also a GPI pin, which, in addition to its function as a general-purpose input pin, can also serve as a chassis intrusion detection input. The chassis intrusion input is designed to accept an active high signal from an external circuit that latches, such as when the cover is removed from the computer. Next in this board's series of additional features are the fan inputs, labeled FAN1 and FAN2, that can be programmed to accept either fan failure indicator programmed to be active high or active low or tachometer signals. Fan inputs measure the period of tachometer pulses from the fans, providing a higher count for lower fan speeds. The full-scale fan counts are 255 (8-bit counter), representing a stopped or slow fan. Based on a count of 153, nominal speeds are programmable from 1100 to 8800 RPM. Signal conditioning circuitry is also included to accommodate the slow rise and fall times. The last header contains functions such as an external interrupt input INT IN, a master reset for external purposes RST OUT,
and a single power switch pin GPO. The INT IN active low interrupt provides a way to chain the interrupts from other devices through the LM96080 to the host, the RST_OUT is intended to provide a master reset to devices connected to this line, while the GPO pin is an active low NMOS open drain output intended to drive an external power PMOS for software power control or can be utilized to control power to a cooling fan. The LM96080 also possesses a general reset signal routed on the RST pin of the mikroBUS™ socket to reset the LM96080, and an additional interrupt signal, routed on the INT pin of the mikroBUS™ socket whenever some of the external interrupts like INT_OUT, interrupt from the temperature sensor, or when a chassis detection event occurs. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the 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.
Features overview
Development board
EasyAVR v7 is the seventh generation of AVR development boards specially designed for the needs of rapid development of embedded applications. It supports a wide range of 16-bit AVR microcontrollers from Microchip and has a broad set of unique functions, such as a powerful onboard mikroProg programmer and In-Circuit debugger over USB. The development board is well organized and designed so that the end-user has all the necessary elements in one place, such as switches, buttons, indicators, connectors, and others. With four different connectors for each port, EasyAVR v7 allows you to connect accessory boards, sensors, and custom electronics more
efficiently than ever. Each part of the EasyAVR v7 development board contains the components necessary for the most efficient operation of the same board. An integrated mikroProg, a fast USB 2.0 programmer with mikroICD hardware In-Circuit Debugger, offers many valuable programming/debugging options and seamless integration with the Mikroe software environment. Besides it also includes a clean and regulated power supply block for the development board. It can use a wide range of external power sources, including an external 12V power supply, 7-12V AC or 9-15V DC via DC connector/screw terminals, and a power source via the USB Type-B (USB-B)
connector. Communication options such as USB-UART and RS-232 are also included, alongside the well-established mikroBUS™ standard, three display options (7-segment, graphical, and character-based LCD), and several different DIP sockets which cover a wide range of 16-bit AVR MCUs. EasyAVR v7 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.
Microcontroller Overview
MCU Card / MCU
Architecture
AVR
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
40
RAM (Bytes)
16384
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic
Step by step
Project assembly
Track your results in real time
Application Output
This Click board can be interfaced and monitored in two ways:
Application Output
- Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
UART Terminal
- Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Software Support
Library Description
This library contains API for HW Monitor Click driver.
Key functions:
hwmonitor_get_analog_inputs
HW Monitor gets analog inputs voltage function.hwmonitor_get_temperature
HW Monitor gets temperature function.hwmonitor_set_config
HW Monitor set the configuration function.
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 main.c
* @brief HW Monitor Click example
*
* # Description
* This example demonstrates the use of the HW Monitor Click board™.
* The demo application monitors analog voltage inputs and local temperature data.
*
* The demo application is composed of two sections :
*
* ## Application Init
* The initialization of the I2C module, log UART and additional pins.
* After the driver init, the app executes a default configuration.
*
* ## Application Task
* This example displays the Analog Voltage Inputs (IN0-IN6) [mV]
* and Temperature [degree Celsius] data.
* Results are being sent to the UART Terminal, where you can track their changes.
*
* @author Nenad Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "hwmonitor.h"
static hwmonitor_t hwmonitor;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
hwmonitor_cfg_t hwmonitor_cfg; /**< Click config object. */
/**
* 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.
hwmonitor_cfg_setup( &hwmonitor_cfg );
HWMONITOR_MAP_MIKROBUS( hwmonitor_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == hwmonitor_init( &hwmonitor, &hwmonitor_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( HWMONITOR_ERROR == hwmonitor_default_cfg ( &hwmonitor ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 1000 );
}
void application_task ( void )
{
static float temperature, voltage;
for ( uint8_t in_pos = 0; in_pos < 7; in_pos++ )
{
if ( HWMONITOR_OK == hwmonitor_get_analog_inputs( &hwmonitor, in_pos, &voltage ) )
{
log_printf( &logger, "IN %d: %.1f mV\r\n", ( uint16_t ) in_pos, voltage );
Delay_ms( 100 );
}
}
log_printf( &logger, "- - - - - - - - - - - - - -\r\n" );
if ( HWMONITOR_OK == hwmonitor_get_temperature ( &hwmonitor, &temperature ) )
{
log_printf( &logger, " Temperature: %.3f [deg c]\r\n", temperature );
Delay_ms( 100 );
}
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 1000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END