Author Topic: 4-20mA current loop  (Read 8579 times)

0 Members and 1 Guest are viewing this topic.

Offline dagobah700Topic starter

  • Newbie
  • Posts: 5
  • Country: hu
4-20mA current loop
« on: May 06, 2019, 07:13:40 pm »
Dear Members!

I have desingned this simple 4-20mA current loop transmitter based on some ideas on the Web. I have simulated it in different programmes like Tina and EveryCircuit and it works without any problem.
Despite that when I built it on a breadboard the TL072 op amp just refused to work. I known this IC isn't a rail-to-rail one, but according tho simulations it should work. I had problems with this op amp before this project too.

I am really confused now. I hope somebody can help me to solve that.
Thank you all.

(PS: Schematic attached, I've verified the connections on the breadboard and included bypass caps too)
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #1 on: May 06, 2019, 07:19:03 pm »
this looks way more complicated than it needs to be  ??? please provide a "theory of operation" as I can't follow what each section is doing ( I think the second op amp is acting like a difference amplifier for the driving stage?

I can recommend replacing the op amp by the MCP6002, it has worked in almost all current loop designs that I created in the past. they're fairly cheap and available from any local supplier.
 

Offline Hiemal

  • Regular Contributor
  • *
  • Posts: 84
  • Country: us
Re: 4-20mA current loop
« Reply #2 on: May 06, 2019, 07:49:22 pm »
That and the TL072 isn't specced for single rail operation either.

An LM358 would work, or as OM222O suggested an MCP6002 works too. Just be sure not to exceed the MCP6002's max voltage allowed.
 
The following users thanked this post: dagobah700

Offline dagobah700Topic starter

  • Newbie
  • Posts: 5
  • Country: hu
Re: 4-20mA current loop
« Reply #3 on: May 06, 2019, 07:59:48 pm »
Thank you for your fast answer!

First of all the goal was to create a two wired current loop so the power and the signal can travel on the same loop. For this reason I should measure the transmitter circuit's current "consumption" too. When current is flowing through the R3 it drops a negative voltage on it (compared to GND). The IC1B part of the TL072 amplifies it by the gain of minus two. After that the IC1A part of the  TL072 compares this voltage with it's non-inveting input voltage and drives the IRF530 what acts like a voltage controlled current-source. V2 simulates the sensor's output voltage. R1 simulates the cable resistance and the detector circuit.

The problem is, when I turn my irl circuit on, the opamps output voltages immediately reach +23V. At first I thought it is a gain issue, but after I tested the op amps on symmetric supply voltage they actually amplified.

I will try the two suggested op amps tomorrow.
« Last Edit: May 06, 2019, 08:02:37 pm by dagobah700 »
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #4 on: May 06, 2019, 08:20:21 pm »
it's not the symmetry of the supply rails. op amps don't care about that at all, however if you're powering the op amp from ground and a positive voltage source (let's say 24v) and your inputs are going negative (below ground) there is a very good chance the op amp is damaged. I'm not sure what you mean by carrying "signal" and "power" on the same line. the current is what actually drives the actuator (you mentioned a sensor instead of actuator ... if it's a sensor, you shouldn't be trying to back drive it with a current loop! you should be converting that current into a voltage and reading it!). a lot of industrial appliances use the 4-20mA standard as their input / output.

A much more simplified version of this circuit would be this:


If your control voltage (Vset) is 0 to 4v, use a 180 ohm resistor for Rset, that will give you 0-22mA range (which gives you some head room, but you can drop the resistor to 150 ohm to gain back more headroom).

Also make sure you have sufficient V for the load to drive 20mA. Assuming 24v again, that's about 1.2k ohm, which about 200 of it, is used in Rset, so your load shouldn't exceed 1k ohm.
« Last Edit: May 06, 2019, 08:22:26 pm by OM222O »
 

Offline dagobah700Topic starter

  • Newbie
  • Posts: 5
  • Country: hu
Re: 4-20mA current loop
« Reply #5 on: May 06, 2019, 09:01:03 pm »
Sorry for the bad vocabulary, I'm trying my best.

What you are saying with the simplied version is true, but if I connect 100 meters of cable to it's output, the feedback measurement will be corrupted with the cable's resistance. For this reason a differential ampliflier is needed.

I meant with power and singal on the same line that I have 4 mA flowing in the circuit on it's "0%" output. This 4 mA could be used to power the op amps and the sensor (in the two-wire transmitter). In my design I've tried to count in the  op amps consumption too. This is why I placed the common between the two 100 ohms (this way all current can be measured on R3) .
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #6 on: May 06, 2019, 09:19:22 pm »
You cannot power op amps from a current source   :-// or any other IC for that matter   :palm:
to be honest I'm not sure what you're trying to do. the schematic you posted is just supplying the "sensor" with 24v, then measuring the returned current on the RTN pin. that current creates a voltage on the 250 ohm resistor which will vary from 1v (4mA x 250\$\Omega\$) up to 5v(20mA x 250\$\Omega\$). therefore you can read the sensor value across the resistor.

If you are trying to drive an actuator or a valve, it will be very different! you will supply the 24v to it, and then the circuit will create a current that drives that valve/actuator. in which case your driving circuit is mounted on the device itself, not with 100m cable in between.

So the main question is: are you trying to create the left part of the schematic ("Sensor transmitter") or the right part of the schematic ("Analog input module"). they do 2 very different things.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: 4-20mA current loop
« Reply #7 on: May 06, 2019, 10:03:55 pm »
lookup something like  XTR117
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #8 on: May 06, 2019, 10:24:53 pm »
lookup something like  XTR117
that chip will only supply 5v due to the internal regulator, not the 24v that the OP was asking about.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: 4-20mA current loop
« Reply #9 on: May 06, 2019, 10:41:09 pm »
lookup something like  XTR117
that chip will only supply 5v due to the internal regulator, not the 24v that the OP was asking about.

that's not how it works, the 5V is for the internal circuitry
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #10 on: May 06, 2019, 11:09:10 pm »
on the schematic that they show, the 5v output is directly connected to one of the output wires  :-// how can you back feed that with a higher voltage on the sensor side without causing issues?
Edit: I'm not an expert on this topic and have not used that chip before, so it's purely based on my speculation but it seems like common sense.
« Last Edit: May 06, 2019, 11:12:41 pm by OM222O »
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2322
  • Country: au
Re: 4-20mA current loop
« Reply #11 on: May 06, 2019, 11:20:19 pm »
Holy crap OM222O. You need to look up a primer on what 4-20mA is. The whole reason that it's 4-20mA and not 0-20mA is because that means at least 4mA is always flowing, and that 4mA can be used to power the circuitry. No separate power supplies needed. The 4-20mA sensor can be in a remote place with just a loop (pair) of wires running to it, and those wires carry both the power to the sensor and the signal coming back.

This is the whole point of 4-20mA, the whole reason it was created in the first place. If you can't understand that, please feel free to do some research and/or create your own thread (in the Beginners forum). But you're clearly at a level of understanding way below the OP's, and you're contributing absolutely nothing to this thread by sending him facepalm emojis while he's trying to explain the above to you.

You cannot power op amps from a current source   :-// or any other IC for that matter   :palm:

Yes you can, and yes you can. Isn't powering an opamp from a current source the basis of 4-20mA? Aren't voltage regulators ICs? Just because you haven't seen something yet doesn't mean it's impossible and stupid.
 
The following users thanked this post: Someone, AndyC_772, Dave

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: 4-20mA current loop
« Reply #12 on: May 06, 2019, 11:36:41 pm »
You can have two wire sensors which get the power supply from the loop current and three wire sensors which have a separate wire for power supply.

Typical implementation of a 4 - 20 mA two wire loop:
« Last Edit: May 07, 2019, 12:16:55 am by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12537
  • Country: us
Re: 4-20mA current loop
« Reply #13 on: May 07, 2019, 12:30:11 am »
What you are saying with the simplied version is true, but if I connect 100 meters of cable to it's output, the feedback measurement will be corrupted with the cable's resistance.

I don't think this is how it should be. With a 4-20 mA system the remote sensor determines how much current is in the loop. If the remote sensor sets the current to 10 mA, then the receiver will see 10 mA also since the current in a loop is everywhere equal. The loop resistance only comes into play when considering the source (compliance) voltage driving the current around the loop. There must be enough voltage to overcome the loop resistance and provide additional headroom for the sensor to regulate the current.
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #14 on: May 07, 2019, 02:19:38 am »
Holy crap OM222O. You need to look up a primer on what 4-20mA is. The whole reason that it's 4-20mA and not 0-20mA is because that means at least 4mA is always flowing, and that 4mA can be used to power the circuitry. No separate power supplies needed. The 4-20mA sensor can be in a remote place with just a loop (pair) of wires running to it, and those wires carry both the power to the sensor and the signal coming back.

This is the whole point of 4-20mA, the whole reason it was created in the first place. If you can't understand that, please feel free to do some research and/or create your own thread (in the Beginners forum). But you're clearly at a level of understanding way below the OP's, and you're contributing absolutely nothing to this thread by sending him facepalm emojis while he's trying to explain the above to you.

You cannot power op amps from a current source   :-// or any other IC for that matter   :palm:

Yes you can, and yes you can. Isn't powering an opamp from a current source the basis of 4-20mA? Aren't voltage regulators ICs? Just because you haven't seen something yet doesn't mean it's impossible and stupid.

regardless of how much you search, there is nothing about "Powering ICs (or op amps for that matter) from a current source" ... they require voltage sources! simple as that! op amps specifically have voltage rails!

You can have two wire sensors which get the power supply from the loop current and three wire sensors which have a separate wire for power supply.

Typical implementation of a 4 - 20 mA two wire loop:
also this is exactly what I said ... the 250 ohm creates a 1 to 5v voltage drop
« Last Edit: May 07, 2019, 02:33:10 am by OM222O »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: 4-20mA current loop
« Reply #15 on: May 07, 2019, 04:52:24 am »
You have the right idea but the dual supply TL072 is not suitable because an input common mode range down to the negative supply is required.  Your simulation must not have taken this into account.

IC1B in your circuit is not doing anything useful.  Both functions should be combined into the same operational amplifier.

Typically precision low power single supply operational amplifiers like the LT1006 or OP90 are used.

http://www.circuitdiagramworld.com/transmitter_circuit_diagram/OP90_4_mA_to_20_mA_Current_Loop_Transmitter_16249.html
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2322
  • Country: au
Re: 4-20mA current loop
« Reply #16 on: May 07, 2019, 05:28:37 am »
regardless of how much you search, there is nothing about "Powering ICs (or op amps for that matter) from a current source" ... they require voltage sources! simple as that! op amps specifically have voltage rails!

Wow, you are obsessed with word matching, and the supreme confidence with which you make completely false statements is remarkable. Even if you have a power supply named "a current source", it will still produce a voltage across its load while pushing current through it. If that resulting voltage is within the acceptable limits for the supply of an op-amp, then the op-amp will run just fine. At no point does the op-amp shout out "hey, wait, that thing that's powering me is CALLED a current source and my pins are CALLED voltage inputs! OMG i die now :-(". If your approach to deciding if a op-amp will be powered correctly is comparing words rather than calculating voltages, then you're just taking a completely flawed approach. I don't know what else to say. V=IR. They are intimately interrelated.

Also, if you have a real world current source, it will have a compliance voltage. If the current source has a compliance voltage of 24V, you can use it to power an op-amp just fine. Even ignoring the compliance voltage, send the current through a 24V zener and power your op-amp off the resulting voltage drop. These are just two of the things you would have found if googling was a viable strategy for designing circuits, let alone confidently asserting what's imposssible.

 
The following users thanked this post: AndyC_772, Dave

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: 4-20mA current loop
« Reply #17 on: May 07, 2019, 07:24:13 am »
you can't just use ohms law for a complex IC  :-DD they will not magically create their own "voltage drop" and just work. The "viable design" which you speak of, is making sure at least the basics are right  :-// even if once circuit works under specific conditions, it's still a terrible practice to just assume the exception is the rule.
Even dave showed in one of his videos that you can power an IC from it's IO pins using the protection diodes ... obviously it is not a good design, but it works under certain conditions  :-/O

Please prove me wrong by setting up a circuit that powers op amps or some other ICs using a current sink / source and is stable with all the operating conditions of the ICs (i.e: different temperatures and different input / output conditions).
« Last Edit: May 07, 2019, 07:26:29 am by OM222O »
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 39026
  • Country: au
    • EEVblog
Re: 4-20mA current loop
« Reply #18 on: May 07, 2019, 08:36:00 am »
regardless of how much you search, there is nothing about "Powering ICs (or op amps for that matter) from a current source" ... they require voltage sources! simple as that! op amps specifically have voltage rails!

Funny how there are chips powered from 4-20mA current sources
https://www.analog.com/media/en/technical-documentation/data-sheets/3255f.pdf


 
The following users thanked this post: AndyC_772, rs20

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: 4-20mA current loop
« Reply #19 on: May 07, 2019, 09:02:02 am »
I am not sure if the OP is trying to build the remote sensor (to sense what?) or the receiving part. The receiving part is extremely simple, as has already been shown. Basically a resistor will do.

The sensor can be relatively simple depending on what we want to measure. You are looking for a current source which sets a current regardless of voltage. Have a look at the attached circuits.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline dagobah700Topic starter

  • Newbie
  • Posts: 5
  • Country: hu
Re: 4-20mA current loop
« Reply #20 on: May 07, 2019, 12:14:45 pm »
Dear Members!

I'm reading your ideas now, but first I want to tell you that changing te op amp to an LM358 solved everything. The circuit is working without any problems now.

Thank you so much everyone.
 
The following users thanked this post: rs20

Offline dagobah700Topic starter

  • Newbie
  • Posts: 5
  • Country: hu
Re: 4-20mA current loop
« Reply #21 on: May 07, 2019, 12:27:19 pm »
This is what I'm trying to build.

« Last Edit: May 07, 2019, 01:11:41 pm by dagobah700 »
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: 4-20mA current loop
« Reply #22 on: May 07, 2019, 07:59:05 pm »
This is what I'm trying to build.
If the sensor is on the right then you do not understand the concept. The sensor is not a 0-5 V voltage source, it is a 4-20 mA current source. That is the basis of the whole idea.
« Last Edit: May 07, 2019, 08:14:19 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2322
  • Country: au
Re: 4-20mA current loop
« Reply #24 on: May 07, 2019, 10:45:50 pm »
This is what I'm trying to build.

I think this circuit would work fine, I think most of the reason you're getting bad feedback is that the circuit isn't drawn according to the normal conventions. In particular, the signal (or, the "information") should flow from left to right in a circuit. However, you've got your sensing element at the very right edge of the circuit, and the thing reading your circuit at the left edge. In short, just flipping the entire schematic left-to-right would make it much easier to read, as strange as that sounds (see langwadt's post as an example of the broad arrangment). Also, the box on the right should be drawn to have visually strong horizontal lines for the GND node and the power pin of the opamp, so that R3 dangles very conspicuously off the bottom, making it clear that this circuit is measuring the current it's consuming as a whole. Also:
  • You can see the confusion that has been generated by drawing a big box and labelling it with "X + my circuit". That box should be labelled "4-20mA sensor", and V2 should be labelled as "Any type of sensor that provides 1-5V as its output".
  • V2 should be labelled 1-5V (it's 1-5V if the big box on the right is going to be a 4-20mA sensor.)
  • I'm not sure why R4 needs to be there? Edit: to stop the MOSFET being on at power-up, I get it now!
  • As mentioned a couple of times before, you don't need two separate op-amps, this can be done with just one, but that's up to you I suppose (although are you doing some trick here where the inverting input of IC1B is held at zero due to virtual earth principle, and therefore R6 is effectively in parallel with R3, therefore this circuit can more precisely measure the current it is consuming as a whole? Because if so, that's a lovely bit of attention to detail!) (Edit: Although now that I think about it, even this little detail can be achieved with a single op-amp too.)

But everything I've said is just pedantic style nits. Looks like it should work just fine.

{Edit: Everything I say above assumes R7 is a 20k resistor (e.g. two 10k resistors in series). Because it's 22k, the actual voltage range of V2 should be 1.1 to 5.5V, which seems odd.}

This is what I'm trying to build.
If the sensor is on the right then you do not understand the concept. The sensor is not a 0-5 V voltage source, it is a 4-20 mA current source. That is the basis of the whole idea.

I think you've missed the point. He has some hypothetical sensor that outputs 0-5V, as represented by V2, and his circuit (everything else in the box to the right), turns that into a 4-20mA sensor (all passively powered by the 4-20mA current loop, although how V2 is powered is left as an open question). Aside from the fact that V2 should be 1-5V, the circuit does that correctly AFAICT.

« Last Edit: May 07, 2019, 11:11:00 pm by rs20 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf