Current 3 Click Board
Current 3 Click Board
Overview
The Current 3 Click Board™ is a compact add-on board for applications like current sense and temperature monitoring. This board features the EMC1702, a combination of the high-side current sensing device with a temperature measurement function from Microchip. The EMC1702 measures the voltage developed across a sense resistor to represent the high-side current of a battery or voltage regulator, contains bidirectional peak detection circuitry to flag current spikes with programmable time duration and magnitude threshold, and channel for external temperature measurement. This Click Board™ is suitable for embedded, industrial, and power management system applications.
The Current 3 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
How Does The Current 3 Click Board™ Work?
The Current 3 Click Board™ is based on the EMC1702, a combination of the high-side current sensing device with a precision voltage and temperature measurement capabilities from Microchip. It measures the voltage developed across an external sense resistor to represent the high-side current of a battery or voltage regulator, and also measures the source voltage and uses these measured values to present a proportional power calculation. The EMC1702 contains additional bi-directional peak detection circuitry to flag instantaneous current spikes with programmable time duration and magnitude threshold. Also, it possesses an external diode channel for temperature measurement as well as an internal diode for ambient temperature measurements.
The EMC1702 current-sense measurement converts differential input voltage measured across an external sense resistor to a proportional output voltage. This voltage is digitized using a variable resolution (13-bit to 15-bit) Sigma-Delta ADC and I2C protocol. The current range allows for large variations in measured current with high accuracy and a low voltage drop across the resistor.
The Current 3 Click Board™ communicates with MCU using the standard I2C 2-Wire interface with a maximum frequency of 400kHz. The EMC1702 slave address is determined by a resistor connected R6 (0Ω) between the ground and the ADDR_SEL pin. Various values of this resistor also provide different slave addresses (0Ω is equal to 1001_100(r/w)).
The EMC1702 has two levels of monitoring and contains user-programmable bipolar Full-Scale Sense Ranges (FSSR). Each VSENSE measurement is averaged over a user-programmable time. If VSENSE exceeds (or drops below) the respective limits, the ALERT pin, routed on the INT pin of the mikroBUS™ socket labelled as ALT, may be asserted. It also contains user-programmable current peak detection circuitry on DUR_SEL and TH_SEL pins that will assert the THERM pin, routed on the RST pin of the mikroBUS™ socket labelled as TRM, if a current spike is detected larger than the programmed threshold and of longer duration than the programmed time (threshold and duration selected by resistors R7 and R8).
The Current 3 Click Board™ is designed to be operated with both 3.3V and 5V logic voltage levels that can be selected via VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly.
SPECIFICATIONS
Type | Measurements |
Applications | Can be used for embedded, industrial, and power management systems applications. |
On-board modules | The Current 3 Click Board™ is based on the EMC1702, a combination of the high-side current sensing device with a precision voltage and temperature measurement capabilities from Microchip. |
Key Features | High-side current sensor, temperature monitoring, hardware set peak detector, accuracy, and more. |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout of the Current 3 Click Board™ 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 | ||
Current Peak Duration Detection | TRM | 2 | RST | INT | 15 | ALR | 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 | VCC SEL | Left | Logic Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
CURRENT 3 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | - | 26 | V |
Voltage on SENSE terminal | -0.3 | - | 26 | V |
Peak Detector Threshold Range | - | 80 | - | mV |
Peak Detector Duration Range | - | 3072 | - | ms |
Operating Temperature Range | -40 | - | +85 | °C |
Software Support
We provide a library for the Current 3 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the Current 3 Click Board™. A library performs the communication with the device via I2C interface.
Key Functions
float current3_get_temperature ( uint8_t temp_sel )
- Get temperature function.float current3_get_source_voltage ( void )
- Get source voltage function.float current3_get_current ( void )
- Get current measurement function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C and start to write log.
- Application Initialization - Initialization driver enables - I2C, check communication and set sense sampling configuration, also write log.
- Application Task - (code snippet) This is an example which demonstrates the use of the Current 3 Click Board™. The Current 3 Click Board™ can be used to measure current ranging up to 8000mA, and display temperature, voltage and current data. All data logs write on USB UART changes for every 2 sec.
void application_task ( ) { temperature = current3_get_temperature( CURRENT3_TEMP_INTERNAL_DIODE ); FloatToStr( temperature, log_text ); Ltrim( log_text ); mikrobus_logWrite( " Temperature = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); voltage = current3_get_source_voltage( ); FloatToStr( voltage, log_text ); Ltrim( log_text ); mikrobus_logWrite( " Voltage = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " V", _LOG_LINE ); current = current3_get_current( ); FloatToStr( current, log_text ); mikrobus_logWrite( " Current = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " mA", _LOG_LINE ); mikrobus_logWrite( "---------------------------", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Current 3 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.
Software Support
We provide a library for the Current 3 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the Current 3 Click Board™. A library performs the communication with the device via I2C interface.
Key Functions
float current3_get_temperature ( uint8_t temp_sel )
- Get temperature function.float current3_get_source_voltage ( void )
- Get source voltage function.float current3_get_current ( void )
- Get current measurement function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C and start to write log.
- Application Initialization - Initialization driver enables - I2C, check communication and set sense sampling configuration, also write log.
- Application Task - (code snippet) This is an example which demonstrates the use of the Current 3 Click Board™. The Current 3 Click Board™ can be used to measure current ranging up to 8000mA, and display temperature, voltage and current data. All data logs write on USB UART changes for every 2 sec.
void application_task ( ) { temperature = current3_get_temperature( CURRENT3_TEMP_INTERNAL_DIODE ); FloatToStr( temperature, log_text ); Ltrim( log_text ); mikrobus_logWrite( " Temperature = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); voltage = current3_get_source_voltage( ); FloatToStr( voltage, log_text ); Ltrim( log_text ); mikrobus_logWrite( " Voltage = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " V", _LOG_LINE ); current = current3_get_current( ); FloatToStr( current, log_text ); mikrobus_logWrite( " Current = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " mA", _LOG_LINE ); mikrobus_logWrite( "---------------------------", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Current 3 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.