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

0 Members and 1 Guest are viewing this topic.

Offline Hiemal

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: 4-20mA current loop
« Reply #25 on: May 08, 2019, 01:41:30 am »
Glad my suggestion worked dagobah!

I've made the same mistake before too, trying to use an op amp that isn't specified for single supply on just that. The LM358 is a really nice general purpose op amp, cheap and readily available. Biggest downsides are that it's a bit on the older side, and it's not fully rail to rail.

The TL072 is also a really good op amp, but it's primary usage is for audio applications I believe, since it has a really low noise spec that comes in handy for that purpose.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: es
Re: 4-20mA current loop
« Reply #26 on: May 08, 2019, 07:12:51 am »
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.
Yes, I am not clear on what he is trying to do. So he is trying to convert 0-5 V to 4-20 mA? Oh, OK then. I think I get it now.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19614
  • Country: gb
  • 0999
Re: 4-20mA current loop
« Reply #27 on: May 08, 2019, 10:04:42 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).
No, a current sink is not used to deliver power. A constant voltage is used to power the 4mA to 20mA device and the current drawn by it is used to transmit data.

Here's an example of a 4mA to 20mA sensor being monitored by an ADC. A 250Ohm resistor is used to give a range of 1V to 5V. In reality it will be better to use 240R to allow a bit of headroom for component tolerances.


In modern 4mA to 20mA systems, the constant voltage powers the op-amp and the transducer connected to it. The op-amp adjusts the current drawn by the entire circuit so it matches an input voltage.

I can see you're confused by the OP's circuit. Here's a more basic implementation. The current taken from V1 varies from 4mA to 20mA, as V2, the transducer's voltage, is swept between 1V and 5V.


The op-amp adjusts its output voltage, thus Q1's base voltage to ensure V(R1) = V(R3).

V(R1) = V2*R3/R2

Therefore:
I(V1) = (V2*R3/R2)/R1

Any current through the op-amp's negative rail is taken into account. The circuit will work, as long as the current taken from V1 and passed to R1 is below the minimum desired output current or 4mA, in this case.

In  reality, the voltage drop across R1 will probably need to be much lower and some additional amplification and level shifting will be required to scale the voltage given by the transducer, V, to something giving a sensible voltage drop across R1.
« Last Edit: May 08, 2019, 11:43:23 am by Zero999 »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19614
  • Country: gb
  • 0999
Re: 4-20mA current loop
« Reply #28 on: May 08, 2019, 11:55:49 am »
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.
Yes, I am not clear on what he is trying to do. So he is trying to convert 0-5 V to 4-20 mA? Oh, OK then. I think I get it now.
But his schematic says 0 to 4V.

In any case, this isn't that difficult to solve. The circuit I posted previously will do, with some modifications. The op-amp's non-inverting input can be thought of as a virtual ground. If another voltage is added, to another series resistor, the voltage across R1 will simply equal the sum of V3 and V2.

With a 1V reference, and another 100k resistor: R4. We now have 4mA to 25mA, when V2 is swept from 0V to 5V. Where R2 and R4 meet form a summing junction. If we want 0V to 4V input, then that's it: mission accomplished, it'll only go up to 20mA.


For 0V to 5V input, change the value of the R3.


Of course this isn't ideal. We might want to used a higher reference voltage and a lower voltage across R1, but that's just a matter of changing the resistor values. Here's one with standard precision resistor values and a 5V reference, which only drops 2.5V across R1. In real life V3 would be a voltage reference IC.
« Last Edit: May 08, 2019, 12:23:28 pm by Zero999 »
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: es
Re: 4-20mA current loop
« Reply #29 on: May 08, 2019, 12:30:06 pm »
In any case, this isn't that difficult to solve.

Yes, I agree, it is probably easy to solve once you know what it is we are trying to solve but, like in many other threads, I spend more time trying to figure out what is being asked than in solving it.

I have worked with plenty of 4-20 mA transducers and controllers so I am well familiar with them. If I am going to analyze anything I am looking for something that looks like the diagram on post #5 where you have the remote sensor and the controller separated by the two wire loop. If I see a diagram where both controller and transducer are not clearly separated and I have to start scratching my head and asking questions about what is what ... it gets frustrating for me.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19614
  • Country: gb
  • 0999
Re: 4-20mA current loop
« Reply #30 on: May 08, 2019, 09:44:42 pm »
Yes, it is confusing. I thought the OP was asking how to build a circuit which is powered by 24V and varies its current, as the input voltage is swept from 0 to 5V or 0 to 4V, which wasn't clear.

The schematics I posted just take 24V in and vary the current, depending on the input voltage: V2. Here's it showing a voltage regulator, which just used as a reference, but could to power external circuitry.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: es
Re: 4-20mA current loop
« Reply #31 on: May 08, 2019, 10:19:52 pm »
OK, I think I get it now. I cannot imagine a situation where this could be useful though. I guess with some sensor with separate power supply and the output is voltage.

I am curious about the behavior if the circuits I posted in #19 which convert resistance to 4-20 ma. The original circuit is for a three wire sensor but it could be converted to two wire as in the third circuit. I wonder how linear they are.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19614
  • Country: gb
  • 0999
Re: 4-20mA current loop
« Reply #32 on: May 09, 2019, 09:33:00 am »
OK, I think I get it now. I cannot imagine a situation where this could be useful though. I guess with some sensor with separate power supply and the output is voltage.
I'm not sure you get it, otherwise you'd immediately see the potential applications of this circuit. The whole point is no separate power supply is required. All the power is taken from the current loop. U2 provides the 5V to the circuit (including the sensor and any additional signal processing) from the 24V powering the current loop.

Suppose you have a sonar proximity sensor, which you want to output a 4mA to 20mA signal, depending on the distance.  This is a bit more complex than a simple resistive sensor. A chirp needs to be generated and the distance calculated from the return time. The circuitry for the sonar (transducer, pre-amplifier, MCU etc.) is all powered by U2. The MCU outputs a 0 to 5V signal using a DAC or filtered PWM signal, which is converted to 4mA to 20mA, using the op-amp circuit.


The challenge is power is scarce: the whole circuit needs to run from 4mA minus the power required by the op-amp and U2. The solution would be to use a low duty cycle for the chirp, so even if the traducer is driven with way more than 4mA, the average current consumption could be kept below that.

There are ICs available which are specifically designed to the purpose. Look up the XTR115 and XTR116.
https://www.ti.com/lit/ds/symlink/xtr115.pdf
« Last Edit: May 09, 2019, 09:42:30 am by Zero999 »
 
The following users thanked this post: rs20

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: es
Re: 4-20mA current loop
« Reply #33 on: May 09, 2019, 11:11:38 am »
Yeah, no, I understand that. I have worked with many two and three wire sensors and understand how they work.

I was referring to the circuit in the OP which seems to have its own voltage supply.

Although I guess that can be a sort of "general idea" and the voltage could be derived from the loop as you point out.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf