Reading a 4ma-20ma sensor with ADS1115 ADC - resistors and voltage range

Thread Starter

zirconx

Joined Mar 10, 2010
48
Hello. I'm working on a project to monitor the water level in my sump pit using a raspberry pi. I've ordered a submersible transducer sensor, which outputs 4-20ma of current to indicate 0 to 5 meters of water depth. I plan to convert this current into a voltage using a resistor, then read that voltage using an ADS1115 analog-to-digital converter. I have questions about what resistor to use and the resulting voltage range that will be measured.

My pit is only 1M deep. I think it would good to calibrate the resistor/voltage circuit so that I get more "range of motion" in the area I care about. I've read that it's common to use either a

100R resistor - resulting in a voltage range of .4v-2v
250R resistor - resulting in a voltage range of 1v-5v

Since my pit is only 1M deep, that means for a 100R resistor I'd probably only be reading a range of .4v - .7v. It seems like it would be harder to get an accurate measurement of water level when translating from such a small voltage range of (.7-.4)= .3 volts (considering about .3v per meter).

So I am thinking of using something like a 470R resistor, which gives a theoretical voltage range of 1.8 - 9.4v, but since my sensor will never be more than 1M deep, I would get voltages between 1.8 and 3.3. Which leaves me with a range of 1.5v to indicate the depth 0-1 meter.

Does this seem like a good idea? I would of course test the circuit with a voltmeter first to make sure even at full depth it does not exceed 3.3v. Reading the specs on the ADS1115, the absolute max voltage it can handle is vcc+.3. I will be powering it from a 3.3v pin on the raspberry pi.

Thanks for your help.
 

AlbertHall

Joined Jun 4, 2014
8,543
You might want to include some protection for over-voltage for the ADC. If the sensor ground wire is disconnected there would be up to 24V to the ADC.
 

dendad

Joined Feb 20, 2016
3,084
Firstly, you may find the sensor will run quite well on a lower supply voltage, so that will be a bit safer.
Usually, I add a 50mA Polyswitch (resettable fuse) in line with the 4-20mA input, a 10K series resistor between the termination resistor and ADC input to limit ADC input current, and clamp diodes on the ADC input to protect from over voltage. A Tranzorb is a good option too.
To work out the resistor, find the full scale input voltage of your ADC.
Then, drop the sensor in the well, or a similar water depth. Measure the current and calculate the resistor to give a little less voltage. Do not go to full volts under normal use as then you can read a fault condition if the current goes over the "full" reading.
But, as @AlbertHall notes, the input needs to be able to take the full supply volts being applied to it.

That link on Ebay for the ADC sounds like it is a interesting device! It has this in the description ;)

Features:
Maximum Voltage Output :300V
Maximum Current Output:1000A
Number of Channels/Outputs :1
Adjustable Power Supply Type:Linear Power Supply
 

dendad

Joined Feb 20, 2016
3,084
A Zener can be ok but they can introduce non linearity. I usually have a pair of reverse diodes, Cathode to +V, anode to ADC input. Cathode of second diode to ADC input, Anode to gnd.
 
Last edited:
Top