How does it work?
4-20mA T Click is based on the XTR116, a two-wire current transmitter from Texas Instruments. The XTR116 can provide accurate current scaling and output current limit functions with precision current output converters. It is designed to transmit analog 4 to 20mA signals over an industry-standard current loop. On this board, the output loop current from the XTR116 goes through the bridge rectifier to a VLOOP screw terminal. The diode bridge causes a 1.4V loss in loop supply voltage. Wide loop supply range can be between 7.5V and 36V with low span and nonlinearity error.
As input offset voltages on the XTR116 are small, this board uses MCP4921, a 12-bit DAC from Microchip with optional 2x buffer output and an SPI interface. Thanks to the XTR116’s integrated power regulator and reference voltage block, the MCP4921 receives its power supply and the reference voltage necessary for correct data conversion. It communicates with the host MCU via three mikroBUS™ SPI lines over an isolator ADuM1411 from Analog Devices, a quad-channel 10Mbps data rate digital isolator, to make sure higher voltages cannot harm the target microcontroller.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via an onboard 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
Applications
Can be used for industrial process control and test systems serving as the interface between sensors or instruments connected to MCU
On-board modules
XTR116 – current loop transmitter from Texas Instruments
MCP4921 – 12-bit DAC from Microchip
ADuM1411 – quad-channel digital isolator from Analog Devices
Key Features
High precision, industry-standard current loop, low span and nonlinearity error, wide loop supply range, low power consumption, and more
Interface
SPI
Feature
No ClickID
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 on 4-20 mA T 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 | – | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
4-20 mA T Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 5 | – | V |
Output Current | – | – | 20 | mA |
Loop Supply Voltage | 7.5 | 24 | 36 | V |
Software Support
We provide a library for the 4-20 mA T Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for 4-20 mA T Click driver.
Key functions
-
This function sets the output of DAC.
-
This function sets the output current to selected value.
Example Description
This aplication changes the value of the output current.
void application_task ( void )
{
c420mat_set_i_out( &c420mat, 56 ); // sets Iout to 5.6mA
Delay_ms( 3000 );
c420mat_set_i_out( &c420mat, 158 ); // sets Iout to 15.8mA
Delay_ms( 3000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.C420mat
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 Mikroe compilers.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe 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.