# Industrial 4-20mA

Discussion in 'General Electronics Chat' started by David_R, Apr 28, 2014.

1. ### David_R Thread Starter New Member

Apr 28, 2014
5
0
Hi All. First post and all that jazz.

Nice to find this forum.. I have a feeling that what I am looking to achieve will be easy for someone on here. And and all advise is VERY welcome! My electronics knowledge is probably best described as limited, although I have done some stuff in the past (made my own PCB and various other odds 'n' sods)

Here's what I'm trying to do: I need to simulate an industrial 4-20 mA analogue signal into a PLC, and have that signal change over time from one level to another. The basic parameters I have are these:

PSU is 24v. PLC is a Mitsubishi FX1N, with a FX2n 8AD expansion block. This doesn't really matter, the only thing that it does is not really read mA, it drops the signal over a resistor and measures voltage. I'll have to measure a unit to see if I can identify what the internal resistance is.

What I need to happen is have a circuit that produces a steady (variable) current, which, when it receives another +24v feed will then at a (variable) speed, increase that current up to another (variable) current. When that additional +24V feed is removed, the current then drops slowly back to it's initial level.

I'm envisioning a circuit with 3 VR's in it. One for the "idle" current. One for the rate of rise, and a third for the "actuated" current. The rate of drop and rate of rise don't need to be different, and the rise to the higher level can be non-linear (rate slows as it approaches the level)

So, in service it might do this:

Idle current 5.2mA.
+24V feed goes live. Current rises by 0.5mA/second initially.
Current passes ~ 10mA, rate of rise starts to slow
Current passes ~ 14mA, rate of rise slowing a fair bit now.
Current achieves 15.6mA and holds steady.
+24V feed drops. Current starts to drop at 0.5mA/second.
Current eventually stabilises at 5.2mA again.

Thanks in advance for whatever anyone comes up with. Any ideas welcome!

2. ### wayneh Expert

Sep 9, 2010
15,872
5,953
Just thinking out loud here. What if you just used a voltmeter that produces a 4-20mA output? You could put a variable resistor and capacitor on the input leads to slow the rate of voltage increase when the leads are applied to a new voltage.

The output of the voltmeter would give you control over zero and span by way of its normal calibration settings.

3. ### David_R Thread Starter New Member

Apr 28, 2014
5
0
I could, and I had thought of that, but ideally I want this to be a permanent installed circuit in a test box, and there's 8 of these inputs I need to simulate, and I want them to react with no intervention, so would prefer to go down the cheap-electronics-on-a-veroboard rather than a bought in expensive 4-20mA generator.

4. ### wayneh Expert

Sep 9, 2010
15,872
5,953
Well, I had some 4-20mA displays on hand so I built my own voltmeter and current meter using one. You could likewise make yourself an op-amp based circuit that watches both the test voltage, and the voltage across a low-ohms shunt resistor that is in series with the 4-20mA circuit. The op-amps allow an adjustable offset and gain.

I think I posted my circuit in this forum already once before. I'll look around if you're interested.

5. ### David_R Thread Starter New Member

Apr 28, 2014
5
0
If you've already designed a circuit that will do what I'm looking for, then if you are able to find it I would be most appreciative.

I had a sketch out last night to see if I could do it with basic RC timer circuits, but I've not looked at this sort of electronics since School, some 25+ years ago. (!)

6. ### David_R Thread Starter New Member

Apr 28, 2014
5
0
Had another look at the RC timer based circuit, with two VR's, one for the Idle current, one for the "additional" current. Also, the PLC input block appears to drop the signal over a 250Ω resistor, hence it's translating 4-20mA into 1-5V, which makes sense.

On the back of that, here's a circuit. It's probably rubbish, but I'd appreciate any comments.

One thing I wasn't sure of was whether to put the RC leg of the circuit before or after the VR for the Additional Current. I *think* it needs to be before, but I'm sure you'll notice that I drew it afterwards first and then rubbed it out...

File size:
113.8 KB
Views:
65
7. ### Alec_t AAC Fanatic!

Sep 17, 2013
9,444
2,289
Over what time period do you want to ramp the current up/down? Milliseconds, seconds, ..... ?

Edit: Ah, I see you said '0.5mA/sec'

Last edited: Apr 29, 2014
8. ### Alec_t AAC Fanatic!

Sep 17, 2013
9,444
2,289
Something like this?

File size:
25.2 KB
Views:
52
File size:
1.9 KB
Views:
23
9. ### wayneh Expert

Sep 9, 2010
15,872
5,953
Here's the circuit I used to drive my 4-20mA LCD meter. (I didn't design it, just modded it to my purposes.) Here's the thread where I posted it, which might also interest you.

10. ### David_R Thread Starter New Member

Apr 28, 2014
5
0
Alec_t... that is pretty much exactly what I am looking for, the only bit I'm looking for is the ability to change the upper and lower voltages to suit.

Also, this does need an IC and a transistor. Will the extremely basic circuit I put up achieve what I'm looking for? The fewer components I need the better.

11. ### wayneh Expert

Sep 9, 2010
15,872
5,953
That circuit has no time-dependent behavior - flipping the switch will produce an immediate change at the output.

12. ### Alec_t AAC Fanatic!

Sep 17, 2013
9,444
2,289
Your simple circuit alas, even with modification to get time-dependent behaviour, has problems. For a 24V supply to drive 15mA the load resistance needs to be ~1k5. To get 0.5mA/sec rise from 5mA to 15mA takes 20 secs. To get a time constant of that order with 1k5 implies a capacitor with a value ~15000uF.