How does it work?
Current 6 Click as its foundation uses the MAX40080, a high-precision, fast sample-rate digital current-sense amplifier from Analog Devices. The MAX40080 measures current and common-mode voltage ranging from -0.1V to 36V and converts the data into digital form through an I2C-compatible two-wire serial interface allowing access to conversion results. Also, setting the input voltage sense using the I2C register, ±50mV or ±10mV, will allow one to select two measuring ranges from 0A to 1A or from 0A to 5A.
This Click board™ communicates with MCU using the standard I2C 2-Wire interface for configuring and checking the device’s status. Standard I2C commands allow reading the data and configuring other operating characteristics. While reading the current/voltage registers, any measured current and voltage changes are ignored until the read is completed. The current/voltage register is updated for the new measurement upon completion of the read operation.
The MAX40080 has a unique I2C slave address selection method based on a single R4 resistor. By selecting the resistors of precisely defined resistances from Table 1, it is possible to choose 32 different slave addresses corresponding to 32 different resistor values in the attached datasheet. The default value of the R4 resistor is 100kΩ which corresponds to slave address of 0x01. In addition, it also features a wake-up current-threshold and auto-shutdown mode when the I2C interface is inactive, both designed to minimize power consumption.
Since the sensor for operation requires a 1.8V logic voltage level to work correctly, a small regulating LDO is used, the ADP151 from Analog Devices, providing a 1.8V out of mikroBUS™ rails. This LDO uses the Enable pin labeled as EN and routed to the CS pin of the mikroBUS™ socket to optimize power consumption, used for its power ON/OFF purposes. That’s why the LTC4301L voltage-level translator is also featured. The I2C interface bus lines are routed to the voltage-level translator, allowing this Click board™ to work with both 3.3V and 5V MCUs properly. It also possesses an additional interrupt signal, routed on the INT pin of the mikroBUS™ socket labeled as INT, indicating when a specific interrupt event occurs such as overcurrent/voltage, under voltage, FIFO full/overflow, wake-up current threshold reached, and more.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VIO SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to 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.
Specifications
Type
Current sensor,Measurements
Applications
Can be used for industrial control and automation applications, load and power supplies monitoring, telecom equipment, and many more
On-board modules
MAX40080 – high-precision, fast sample-rate digital current-sense amplifier from Analog Devices
Key Features
Wide input common-mode range up to 36V, I2C interface with smart modes, low power consumption, bi-directional current sensing, alert interrupt, and more
Interface
I2C
Feature
No ClickID
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 Current 6 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 | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
R4 | R4 | Populated | I2C Address Selection Resistor |
Current 6 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage (VIO) | 3.3 | – | 5 | V |
Common-Mode Input Voltage (VIN) | 0 | – | 36 | V |
Current Sense Range | 0 | – | 5 | A |
Resolution | – | 12 | – | bits |
Operating Temperature Range | -40 | +25 | +120 | °C |
Software Support
We provide a library for the Current 6 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 Current 6 Click driver.
Key functions
-
current6_get_alert_pin
This function returns the alert pin logic state. -
current6_read_data
This function reads the input voltage and current measurement values. -
current6_get_status
This function reads and clears the status register.
Example Description
This example demonstrates the use of Current 6 Click board™ by reading the input voltage and current measurements.
void application_task ( void )
{
if ( current6_get_alert_pin ( ¤t6 ) )
{
uint16_t status;
if ( CURRENT6_OK == current6_get_status ( ¤t6, &status ) )
{
if ( status & CURRENT6_FIFO_CFG_DATA_OVERFLOW_MASK )
{
float voltage, current;
if ( CURRENT6_OK == current6_read_data ( ¤t6, &voltage, ¤t ) )
{
log_printf( &logger, " Voltage: %.3f Vrn Current: %.3f Arnn", voltage, current );
}
}
}
}
}
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.Current6
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. UART terminal is available in all MikroElektronika compilers.
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.