Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

0-10V, 4-20mA conversion to 0-5V

Status
Not open for further replies.
Hello! Sebi!
I'm working with the circuit you attached...but I have A problem.. Would you mind if I ask you something?.. I need 0-5 output.
My zero is 1.22V (turning pot 100 ohm to the minimun)..when I fix 5K pot to 5V. What can I do to get zero when de input is 4mA and 5 when 20mA?

Thanks in advance!

Diego

hi,
That circuit was not designed for a 4mA to 20mA input, the OP wanted to modify the circuit to convert 1.25V to 6.25V to 0v to 5V.

Do you requirea circuit to convert 4 to 20mA to 0v to 5v.?? Which type of OPA are you using.??
 
I think an optical isolator with three current limiting resistors calculated for each input will solve the problem
 
Hi Ericgibbs,

Yes I need a circuit to convert 4-20mA to 0-5V..Im using LM358N. I found the schematic that SEBI attached in this forum.
Thanks

Diego
 
Hi Ericgibbs,

Yes I need a circuit to convert 4-20mA to 0-5V..Im using LM358N. I found the schematic that SEBI attached in this forum.
Thanks

Diego

hi,
This simple circuit will convert 4 to 20mA to 0V to 5V
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    27.4 KB · Views: 2,354
Hi Ericgibbs,

I tried with your 4to20mA to 0to5Volts circuit and got 0.076 volts for 4mA and 5.010volts for 20mA.
how reduce to zero volt for 4mA. ple help....


Regards,
Dhanash
 
hi dhanash,
In Post # 24 circuit diagram, the resistor R5 [ 1.25K ] should be a 2k5 potentiometer, so that the LM358 output can be adjusted to give ~0V for a 4mA input current.
Try that and let me know the result.

Also add a 4k7 resistor from the LM358 output to 0v.
E
 
Hello Ericgibbs!

I added a 4k7 resistor from the LM358 output to 0v and then instead of 2.5k (R5) used 2 no of 0.5k resistors and 1 no of 1k pot...
now 0.059 for 4mA and 5.010V for 20mA... is really need 2.5k pot to make zero volt for 4mA because while i adjust 1k pot value reduced to 0.059V after that it will increase. what can i do?

thanks

Dhanash
 
hi,
Re-run some tests.
The lowest you can get for Vout using a LM358 is approx 40mV, ref image A03.

If you need to get lower than 40mV you could use a MCP6001 or MCP6002 OPA, ref image A04 for the circuit and A05 shows approx 7mV above zero.

Or you could use the LM358 circuit with a OPA negative supply voltage in place of the 0V.

Are you going to digitise the OPA output voltage.?

E
 

Attachments

  • A03.gif
    A03.gif
    29.4 KB · Views: 748
  • A04.gif
    A04.gif
    27.8 KB · Views: 641
  • A05.gif
    A05.gif
    4.1 KB · Views: 503
Hi Ericgibbs!

Problem solved....I got better output 0v for 4mA and 5v for 20mA while giving -12v to opamp instead of 0v.
Now i want to connect this output voltage to microcontroller for measure. Is there any isolation is possible Instead of direct connection.

Thankyou
 
I think since you want to isolate the output, there isn't really any need to go exactly to 0v and 5v since the signal has to go through another stage of processing. Even with a direct connection you only need it to be within a volt of the actual logic levels. But it's an interesting exercise, had to get my calculator out...

Anyway, you can use an opto-isolator, as mentioned above.

Since 4-20mA is logic levels, I'm assuming you are connecting to a digital input on the microcontroller.

You should be able to connect this current source directly to the input of an opto-isolator, and connect your micro to it's output transistor with a simple pull-up or pull-down resistor (depending on whether you connect to c or e). There are probably opto's designed for this specific task.
 
Last edited:
Since 4-20mA is logic levels, I'm assuming you are connecting to a digital input on the microcontroller.
No.

4 to 20mA is a very commonly used standard for analogue process measurements.
Usually 4 mA represents the bottom end of the measurement range, and 20mA represents to top end of the measurement range.
for example
4mA = 0 Bar
20mA = 200 Bar

JimB
 
Hi Ericgibbs!

Problem solved....I got better output 0v for 4mA and 5v for 20mA while giving -12v to opamp instead of 0v.
Now i want to connect this output voltage to microcontroller for measure. Is there any isolation is possible Instead of direct connection.

Thankyou

hi dhanash,
As you require a linear 0 to 5V for a 4 to 20mA you could use a HCNR200 linear opto coupler.

I would just use a 470R resistor on the output of the LM358 and connect a 5.2V Zener diode to 0V
This will clamp the input to the PIC's ADC to approx +5.2v and -0.7v, which will protect the PIC.

E

EDIT:
Note: I have deliberately set the 4 t0 20mA input over range in order to show the clamping action
 

Attachments

  • A01.gif
    A01.gif
    36.2 KB · Views: 529
Last edited:
No.

4 to 20mA is a very commonly used standard for analogue process measurements.
Usually 4 mA represents the bottom end of the measurement range, and 20mA represents to top end of the measurement range.
for example
4mA = 0 Bar
20mA = 200 Bar

JimB
Once again proving my ignorance! Whoops. I knew it was a standard for control systems etc, but I really thought the current levels represented logic states.
 
Throbs, we don't all know everything.

Just to add confusion, there was in common use a "20mA Current Loop" communication standard for computer peripherals such as printers and video terminals.
It was used where RS232 was not suitable for the distance involved.
I don't think that I have worked on anything which used it for 25 years or so.

JimB
 
Just to add confusion, there was in common use a "20mA Current Loop" communication standard for computer peripherals such as printers and video terminals.
It was used where RS232 was not suitable for the distance involved.
I don't think that I have worked on anything which used it for 25 years or so.

JimB

Not sure but old TTY machines IIRC.
 
One of the reasons that the 4-20mA standard uses 4mA as the bottom end of the scale, instead of 0mA, is that it differentiates between no signal, and a signal who's value means zero.

0mA = No report, wire/sensor is broken.
4mA = System is OK. Information reported has a value of zero.
-
-
20mA = System OK. Information reported has a value at full scale.

If knowing if your sensor system is OK, you might want to re scale your current to voltage conversion to straight linear where 4mA is 1V, 20mA is 5V and anything much less than 1V means there is a problem.

As for isolation. If in the end, the analog voltage gets turned into a digital value, my preferred way is to do that conversion in front of the isolation.

Use a small uC on the sensor side to sample and convert the voltage, then send the digital result as a transmit only serial bitstream through a cheap optocoupler to the main processor.
 
Last edited:
Not sure but old TTY machines IIRC.
Yes those as well.
That is where it started, and as newer devices replaced mechanical teletypes as I/O devices on computers, the new printers and "glass teletype" VDUs had the 20mA interface.

JimB
 
It's great if you know what your doing, Outputs become isolated 4-20 mA and inputs become voltage. 249 ohm resistors come in handy. Lots of problems go away,
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top