Thu Feb 02, 2017 11:51 pm
It's been a while since I did this, but I used to build meteo stations that used 4–20 mA sensors.
The simplest way, as folks have said, is to put a resistor in the loop, and put the A to D across the resistor. It needs to be a fairly precise resistor: better than 1% tolerance. Something like a 165 Ω, 0.1% tolerance, ¼ W power rating. This will give you 0.66 to 3.3 volts for your 4 to 20 mA. This will effectively compress the output range of your sensor to 80% of the range of your A2D. I seem to remember a clever way of avoiding it, but it's been so long that the type of resistor I used to use (precision wirewound) are basically museum pieces. And a good thing too that they're mostly obsolete: they acted like little radio antennas sometimes.
The other really neat thing about current loop is that you can immediately tell if your circuit has failed. If you ever get 0 V across your resistor, you know something's broken. It's a hangover from the old 3-15 psi pneumatic control loops. I don't miss pneumatic control logic at all!
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him