I2C cable between the Shield and the 1-Channel 4-20mA Current Loop Receiver
I2C Cable hooked to the “IN” port on the Current Loop Receiver.
I am using this example code.
Two things I found wrong with the above code is that it is written for Python2. The Rpi comes standard with Python3.
I swapped out the “import smbus” for “import smbus2 as smbus” which says its full Python implementation of smbus. So barring that is the problem.
The CONFIG_REG value was unassigned so I assigned it as “CONFIG_REG = list()” (after line 80)
Barring those two changing impacting anything…this is what is happening.
When I execute I get prompted for the channel.
For channel 0 I get numbers in the range of 198-205 when my sensor is hooked up, and 227-235 when there is nothing hooked up at all. Varying the sensor output doesn’t seem to change these number. For example, sensor will output 3.49mA when its in an “unknown” state. When it gets a good state it will output 3.98mA. When I increase the volume the sensor will go up to 4.9mA (based on a multi-meter reading it)
For channel 1-3 I get numbers in the range of 4200-4250.
I have validated with a multi-meter that my sensor is putting out 4ma (like 3.98mA) and then when I give it some load it will go up to like 4.9mA.
So my questions are:
If I hooked ground to ground on the 1-Channel 4-20 receiver roughly what values should I get?
Does the roughly 200 values give any indication What might be the problem?
Could my device be putting out the wrong voltage level on the 4-20mA? What should it be?
@Anil_Bhaskar sorry, I’m struggling to understand your statement here and the differences between “2 wire” vs “3 wire”.
The 4-20mA board you have also supplied power 4-20mA wires ( active devices, also known as two-wire).
In your case, the sensor has an external power supply and doesn’t need power over 4-20mA lines.
If I’m understanding you correctly…
The 1-Channel 4-20mA Current Loop Receiver 16-Bit ADS1115 I2C Mini Module will work with “2-wire” devices, correct? This device SUPPLIES power over the two wires (that’s also used for 4-20mA).
The “4-Channel I2C 4-20mA Current Receiver with I2C Interface” you mentioned would be used for a “3-wire” devices, correct?
Your statement seems to be backwards from my statement implying my device is a 2-wire?
“active devices, also known as two-wire”
I also noticed that the “4-Channel I2C 4-20mA Current Receiver with I2C Interface” wants a 12VDC input voltage to power it up but my sensor wants 24VDC won’t be a problem since they wouldn’t be using the same ground?
I called the sensor manufacturer and they stated that it is a 3 wire configuration.
So it seems that this new ADC is able to read our 4-20mA signal. But have a followup questions…
The issue I’m running into is that I’m having to rerun the configure register def config_command(self): function to get a different value even though the device should be in continuous mode. Should I not be able to just call the “read_adc()” function over and over to get a new value?