4-20mA Analog sensor to 0-3.3V Digital conversion

Thread Starter

sk1ppy

Joined Nov 18, 2019
4
I have a question about signal conversion since I am pretty new to this.
I want to translate a 4-20mA signal into a 0-3.3V digital signal.
I have done a lot of research and came up with a circuit, but i am unsure if this is possible / correct.
My idea was to use a Transimpedance amplifier to transform the 4-20mA to 0.82-4.1V.
Then use a voltage offset of -0.8 to shift the voltage to 0.02-3.3V.
Untitled Diagram-Page-16 (1).png
Is it possible to connect the negative input of the Opamp to ground to limit the output voltage of the Opamp to positive voltages only?
Is there anything wrong with this circuit?
 

crutschow

Joined Mar 14, 2008
34,408
Some people use this:
That uses the opposite polarity for the current input.

This brings up the question of, what is the source of the current?
Typically that's provided by a positive voltage power source at the receiver end, which then also monitors the sensor current.
A positive voltage could then be generated by having the shunt resistor in the return leg, as your R1 would be.

It would appear that the TS doesn't understand this.
 
Last edited:

BobaMosfet

Joined Jul 1, 2009
2,113
I have a question about signal conversion since I am pretty new to this.
I want to translate a 4-20mA signal into a 0-3.3V digital signal.
I have done a lot of research and came up with a circuit, but i am unsure if this is possible / correct.
My idea was to use a Transimpedance amplifier to transform the 4-20mA to 0.82-4.1V.
Then use a voltage offset of -0.8 to shift the voltage to 0.02-3.3V.
View attachment 191812
Is it possible to connect the negative input of the Opamp to ground to limit the output voltage of the Opamp to positive voltages only?
Is there anything wrong with this circuit?
I redact this.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,408
I don't think you understand OpAmps. OPA are _high_ impedance on the inputs which nullifies your current into.
I don't think you understand the TS's circuit.
It is a typical transimpedance configuration that converts an input current to an output voltage (below).
The (-) input is a virtual ground point, since the op amp will adjust the output voltage to maintain that point at essentially 0V.
Thus Vout = -In/Rf

1574109553183.png
 
Last edited:

dendad

Joined Feb 20, 2016
4,471
If you already have a 4-20mA sensor, just reading the voltage across the termination resistor is the way to go. No amp needed.
It is best practice not to scale the 4-20mA to 0-3.3V.
If you do that, you loose the ability to read a fault condition in the sensor.
This is more or less what I have used in my industrial control systems for years..

4-20mA.jpg
A 50mA Polyswitch is protection for all those times 24V is connected to the input, or the sensor shorts.
The series resistor to the ADC input limits the current to a safe value so the clamp diodes can protect the ADC.
 

BobaMosfet

Joined Jul 1, 2009
2,113
I don't think you understand the TS's circuit.
It is a typical transimpedance configuration that converts an input current to an output voltage (below).
The (-) input is a virtual ground point, since the op amp will adjust the output voltage to maintain that point at essentially 0V.
Thus Vout = -In/Rf

View attachment 191853
It doesn't actually convert. It regulates per Ohm's Law. I'm being nitpicky for no reason but to be obstinate - This is an interesting way to do this.
 

Thread Starter

sk1ppy

Joined Nov 18, 2019
4
If you already have a 4-20mA sensor, just reading the voltage across the termination resistor is the way to go. No amp needed.
It is best practice not to scale the 4-20mA to 0-3.3V.
If you do that, you loose the ability to read a fault condition in the sensor.
This is more or less what I have used in my industrial control systems for years..

View attachment 191854
A 50mA Polyswitch is protection for all those times 24V is connected to the input, or the sensor shorts.
The series resistor to the ADC input limits the current to a safe value so the clamp diodes can protect the ADC.
What would safe resistor values for this circuit be? im having a little trouble understanding
 

ericgibbs

Joined Jan 29, 2010
18,840
hi sk1
By using a 175R termination resistor a loop current of 20mA will give a voltage across the resistor of 3.5V.
Is this what you are asking.??
E
 

Thread Starter

sk1ppy

Joined Nov 18, 2019
4
1574153332019.png
I ment this circuit from dendad, since the ADC can only handle currents up to 1mA. But when you add the current limiting resistor doesn't it create a voltage divider?
 

dendad

Joined Feb 20, 2016
4,471
Oops.
The termination resistor should be 150R, not 175R. That will give you 22mA full scale.
The series resistor between the 150R and the ADC input may be 10K if your ADC is high impedance in. See what works for you.
Also, the higher resistance along with the cap will greatly limit the frequency response, but many 4-20mA sensors are on slow signals.
 

swr999

Joined Mar 30, 2011
41
As per @dendad, here's my take on a 'bare-bones' simplified view:
1574456783673.png

4-20 mA would give you 0.6 - 3.0 Vout at the ADC. Of course the power source has to be able to source enough current to power the sensor. As per @dendad, the live zero (0.6V at 4 mA) is nice to have for detecting a sensor fault.
 
Top