How does it work?
Current 5 Click as its foundation uses the INA381, a zero-drift topology, a current-sensing amplifier with an integrated comparator that can be used in both low-side and high-side current-sensing and protection applications from Texas Instruments. This current-sensing amplifier accurately measures voltages developed across the current-sensing resistor (also known as current-shunt resistors) on common-mode voltages that far exceed the device supply voltage. Current is measured on IN load connection terminal withstanding the full common-mode voltages from –0.2V to +26V at the input pins when the supply voltage is removed without causing damage.
The INA381 also uses a reference input from an onboard REF potentiometer that simplifies setting the corresponding current threshold level to use for out-of-range comparison. Combining the precision measurement of the current-sense amplifier and the onboard comparator enables an all-in-one overcurrent detection device. This combination creates a highly-accurate design that quickly detects out-of-range conditions and allows the system to take corrective actions to prevent potential component or system-wide damage.
The amplified output voltage of the INA381 is developed across the onboard current-sensing resistor, which is the input voltage across the IN terminal (IN+ and IN– pins) multiplied by the gain of the amplifier (200V/V). The output voltage of the INA381 is then converted to a digital value using the ADC121S021, a low-power, single-channel 12-bit analog to digital converter (ADC), with a high-speed SPI interface also from Texas Instruments.
The INA381‘s integrated comparator is designed to quickly detect when the sense current is out-of-range, and provide an interrupt alert signal, routed to the INT pin of the mikroBUS™ socket, for quicker and faster responses. This alert output can be configured to operate in two modes, transparent or latched, selectable according to the logic state on the RST pin of the mikroBUS™ socket. In transparent mode, the output status follows the input state, while in the latched mode, the alert output is cleared only when the latch is reset.
The onboard comparator in the INA381 is designed to reduce the possibility of oscillations in the alert output when the measured signal level is near the over-limit threshold level due to noise, with a hysteresis 50mV. When the voltage on the comparator input exceeds the voltage developed at the comparator reference input, the alert signal sets to a low logic state. The output voltage then must drop to less than the reference input threshold voltage by the hysteresis level of 50mV so that the alert pin de-asserts and returns to the nominal high state. Also, this board allows the user to change the hysteresis from a preset value of 50mV via an onboard Hyst potentiometer. The user can also bring external signals such as REF and HYST on the eponymous onboard headers.
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 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 applications such as test and measurement, load and power supplies monitoring, low-side phase motor control, and many more
On-board modules
INA381 – high-speed current-sense amplifier with an integrated comparator from Texas Instruments
Key Features
Common-mode input range: –0.2 V to +26 V, high-accuracy amplifier, integrated comparator, 200V/V amplifier gain, alert threshold selection, supports transparent and latching modes, and more
Interface
SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Current 5 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 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | Hyst | Populated | External Comparator Signal Connection |
J2 | Ref | Populated | External Comparator Reference Connection |
VR1 | Ref | – | Comparator Reference Input Selection |
VR2 | Hyst | – | Comparator Signal Input Selection |
Current 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage VCC | 3.3 | – | 4 | V |
Common-Mode Input Voltage IN | -0.2 | – | 26 | V |
Gain | – | 200 | – | V/V |
Accuracy | – | – | ±1 | % |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the Current 5 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 5 Click driver.
Key functions
-
current5_get_current
Get current. -
current5_get_adc
Read raw adc value. -
current5_get_alert
Get alert pin state.
Example Description
This example application showcases ability of the device to read raw adc data and calculate the current from it.
void application_task ( void )
{
float current = 0;
current5_get_current( ¤t5, ¤t );
log_printf( &logger, " > Current[ A ]: %.2frn", current );
log_printf( &logger, "*************************************************rn" );
Delay_ms( 300 );
}
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.Current5
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.