Hardware Grocery List
You are going to need a few items to complete this project, here’s a grocery list of the base necessities (we are assuming you already have some 4-20mA sensors):
1. Onion Omega 2 Single Board IoT Computer
2. Onion Omega 2 and Onion Omega 1 IoT Interface Adapter
3. MCP3428 4-Channel 4-20mA 16-Bit Current Receiver with IoT Interface
Setting up the Onion Omega
The 4-20mA receiver has an MCP3428 to convert analog values into digital values using the MCP3428. The MCP3428 will communicate with Onion Omega using I2C communications. To use I2C communications, we will need to install the Python I2C driver in the Onion Omega using the following commands:
opkg update
opkg install python-light pyOnionI2C
Our 4-20mA receiver is very easy to use since it’s based on a common Analog-to-Digital converter. This device has 4 input channels with on-board amplifier for signal conditioning. To read the 4-20mA signals, we will need to setup the following parameters:
a. Set the MCP3428 Gain to 2
b. Set the MCP3428 Bit Resolution to 12 (it supports up to 16 bits if you need better resolution)