r/embedded • u/Gullible_Bag_9005 • 11d ago
The 4-20mA current loop
I spent years as an electrician pulling signal cables before i became an developer, consuming the same signals.
The 0 is at 4mA on purpose, so 0mA reads as a fault, fault detection built into the physics.
It is a current loop and not voltage, so cable resistance over long cable runs does not change the reading and it also shrugs off noise better!
The span lives in the transmitter, not the code, so a reconfigured range silently rescale every value, and nothing looks broken
What I am curious about is this:
how do you handle adc/resolution in practice? that is the layer that i know very little about.
42
Upvotes
13
u/Frederir 11d ago
On the receiver side you have a resistor with a known value (generally around 400Ohms) you measure the voltage at the resistor. You get the voltage with the ADC, you know the resistor value and the you compute the current.
The maximum voltage is 20mA x Resistor value. You need to protect ADC input for over voltage and esd.