How does it work?
Power Monitor Click as its foundation uses the INA228, ultra-precise digital power monitor with a 20-bit delta-sigma ADC and I2C digital interface from Texas Instruments. It measures shunt voltage, bus voltage, and internal temperature while calculating the current, power, energy, and charge necessary for accurate decisions in precisely controlled systems. It can measure a full-scale differential input of ±163.84mV or ±40.96mV across a resistive shunt sense element connected on the onboard IN terminal alongside with common-mode voltage support up to +85V, which makes it well suited for both high-side and low-side current measurements.
The INA228 also measures the bus supply voltage through the VBUS terminal and temperature through the integrated ±1°C accurate temperature sensor, helpful in monitoring the ambient system temperature. Calculations for power, charge, and energy are performed in the background and do not add to the overall ADC conversion time. Also, the very low offset voltage and noise allow for use in mA to kA sensing applications and provide a wide dynamic range without significant power dissipation losses on the sensing shunt element.
Power Monitor Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting a Fast Mode operation up to 400kHz. The INA228 also allows the selection of its I2C slave address using the two SMD cross-shape jumpers labeled as A0 and A1. One cross-shape jumper has four positions for select address pin, which can be connected to GND, VS, SCL, or SDA pins. This way, the INA228 provides the opportunity of the 16 possible different I2C addresses by positioning the SMD jumper to an appropriate position.
Besides, the INA228 also includes the multipurpose alert(interrupt) pin, labeled as ALR and routed to the INT pin of the mikroBUS™ socket, used to report multiple diagnostics or as an indicator that the ADC conversion is complete when the device is operating in both triggered and continuous conversion mode. The diagnostics such as shunt over/under voltage limit, bus over/under voltage limit, or temperature or power over-limit are constantly monitored and reported through the ALR pin whenever the monitored output value crosses its associated out-of-range threshold.
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 |
Power Switch |
Applications |
Can be used for current-sensing applications in DC-DC converters, power inverters, telecom equipment, industrial measurements, and many more |
On-board modules |
INA228 - ultra-precise digital power monitor with a 20-bit delta-sigma ADC and I2C digital interface from Texas Instruments |
Key Features |
High resolution, current and power monitoring accuracy, energy and charge accuracy, fast alert response, wide common-mode voltage range, shunt full-scale differential range, integrated temperature sensor, and more |
Interface |
I2C |
Compatibility |
mikroBUS |
Click board size |
M (42.9 x 25.4 mm) |
Input Voltage |
3.3V or 5V,External |
Pinout diagram
This table shows how the pinout on Power Monitor Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes |
Pin |
|
Pin |
Notes |
---|
|
NC |
1 |
AN |
PWM |
16 |
NC |
|
|
NC |
2 |
RST |
INT |
15 |
ALR |
Alert (Interrupt) |
|
NC |
3 |
CS |
RX |
14 |
NC |
|
|
NC |
4 |
SCK |
TX |
13 |
NC |
|
|
NC |
5 |
MISO |
SCL |
12 |
SCL |
I2C Clock |
|
NC |
6 |
MOSI |
SDA |
11 |
SDA |
I2C Data |
Power Supply |
3.3V |
7 |
3.3V |
5V |
10 |
5V |
Power Supply |
Ground |
GND |
8 |
GND |
GND |
9 |
GND |
Ground |
Onboard settings and indicators
Label |
Name |
Default |
Description |
---|
LD1 |
PWR |
- |
Power LED Indicator |
JP1-JP2 |
ADDR SEL |
Down |
I2C Address Selection GND/SCL/VCC/SDA: Left position GND, Right position SCL, Upper position VCC, Lower position SDA |
JP3 |
VCC SEL |
Left |
Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Power Monitor Click electrical specifications
Description |
Min |
Typ |
Max |
Unit |
---|
Supply Voltage VCC |
3.3 |
- |
5 |
V |
Common-mode input Range VBUS |
0 |
- |
85 |
V |
Shunt Voltage Input Range IN |
-40.96mV
-163.84mV |
- |
+40.96mV
+163.84mV |
mV |
Output Current |
- |
- |
10 |
mA |
ADC Resolution |
- |
20 |
- |
bits |
Operating Temperature Range |
-40 |
+25 |
+125 |
°C |
Software Support
We provide a library for the Power Monitor 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 Power Monitor Click driver.
Key functions:
powermonitor_get_vshunt
- Power Monitor get shunt voltage function.
powermonitor_get_vbus
- Power Monitor get bus voltage function.
powermonitor_get_current
- Power Monitor get current function.
Examples description
This library contains API for Power Monitor Click driver. The library initializes and defines the I2C bus drivers to write and read data from registers. The library also includes a function for reading Shunt and Bus voltage ( mV ), Current ( mA ), Power ( W ), Energy ( J ),
void application_task ( void )
{
static float vshunt, vbus, current, power, energy, temperature;
powermonitor_get_vshunt( &powermonitor, &vshunt );
log_printf( &logger, " Shunt voltage : %.2f mVrn", vshunt );
Delay_ms( 100 );
powermonitor_get_vbus( &powermonitor, &vbus );
log_printf( &logger, " BUS voltage : %.2f mVrn", vbus );
Delay_ms( 100 );
powermonitor_get_current( &powermonitor, ¤t );
log_printf( &logger, " Current : %.2f mArn", current );
Delay_ms( 100 );
powermonitor_get_power( &powermonitor, &power );
log_printf( &logger, " Power : %.6f Wrn", power );
Delay_ms( 100 );
powermonitor_get_energy( &powermonitor, &energy );
log_printf( &logger, " Energy : %.6f Jrn", energy );
log_printf( &logger, "- - - - - - - - - - - - - - rn" );
Delay_ms( 100 );
powermonitor_get_temperature( &powermonitor, &temperature );
log_printf( &logger, " Temperature : %.2f Crn", temperature );
log_printf( &logger, "----------------------------rn" );
Delay_ms( 2000 );
}
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.PowerMonitor
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.
Resources
Downloads