Configuring 4-20mA sensor readings on the Hawk
Table of Contents
The 4-20mA interface is common for industrial sensors. Such sensors output an amperage between 4mA and 20mA proportional to the signal (pressure, temperature, moisture, vibration) they are measuring.
Wiring
When using the Ag-Tech1 plug in card, the I/Os of interest are:
Hawk IO | Function |
2 | VBoost |
5 | 3.3V output |
9 | 4-20mA |
4-20mA sensors typically come with 3 wires, and the below connections should be made:
4-20mA Sensor Line | Connection |
VCC (Voltage Input - usually 3V3 or 5V) |
|
GND | Connect to Hawk GND |
4-20mA Signal Line | Connect to I/O 9 - 4-20mA input |
Configuration
We now need to configure the Hawk to
- Wake up on a schedule to take a reading - (Set up a Task)
- Power on the sensor at the correct voltage (via the Vboost or 3V3 rail)
- Sample the sensor after some time (warm up delay)
- Log the reading and optionally upload.
Configure Task
Configure a task at your chosen frequency - choosing 4-20mA Action 1 as an action.
Configure Ag-Tech1 parameters
3V3 Sensor
If we have a 3V3 Sensor, we configure the 3V3 rail to be powered when the 4-20mA Action is done.
5V or 12V Sensor
If we have a 5V/12V sensor, we set the Vboost rail to be activated when doing a 4-20mA action.
We can set the Vboost Output Voltage Level to 5V or 12V
4-20mA parameters
Set the power on delay and the Analogue which the reading should be mapped to.
Reading Conversion
The reading is reported in µA - divide by 1000 to get to mA
i.e. a reading of 4250 seen in the data = 4.250mA