# How to reduce the current of a signal by an exact amount?

Hello all,

The root problem is that I can't put all my analogue inputs onto one input card (each card has 4 inputs) on the project I'm working on.

We have four sensors, they should all output 4-20mA.
Two are source type outputs, supply voltage goes in, sensor current comes out, current is measured between sensor output and ground.
The other two are sink type outputs. I believe they're outputting 4-20mA, but with reference to the power supply rather than with reference to ground. They appear to work when you put the supply power into the input and use the sensor output as the ground.

On to the next problem.

These cards have four inputs, but use a common ground. This means that I can have the two source type sensors on one card, but I'll need a separate card for each of the two sink type sensors.
We only have 2 cards, and the client doesn't want to buy more. They're also not keen on hiring an Electrical Engineer to do it properly. Things are quiet in the office at the moment so I'm spending my spare time hypothesising.

Possible solutions:
The cards only sense current flowing one way. If I could reverse the current, I could put the supply on the ground terminal and the sensor output into the card input. I think this will be difficult/impossible/potentially damaging to equipment.

I believe the sink type sensor is outputting the supply current - (4-20mA). For example, if the supply current is 600mA, then the sensor is outputting 580-596mA (20-4mA). If I could take off 576mA from the sensor current I would be left with 4-20mA with respect to ground. 20mA would be detected as 4mA and vice versa, but I can deal with that in the programming.

I thought about putting a resistor in parallel, but found that I would need different resistances depending on the output of the sensor to take off 576mA each time. And a controllable variable resistor would just add more complexity.

I should mention that, while I did Robotics Engineering at Uni, my strong suit is in software. So if it sounds like you're reading a bunch of nonsense, you probably are.

The input card is a "Crevis ST-3234", here's a link to the pdf:

The sensor output looks like this:

The power supply is 24v, I don't know the current or the internal resistance of the supply.
As you can see from the picture, the +24v is going to the input of the card and the output of the sensor (4: Black) is going to the ground of the card.

Thanks for any light you can shed on the subject.

Dan

Related Electrical Engineering News on Phys.org
berkeman
Mentor
Use two current mirrors? (two transistors each)

Use two current mirrors? (two transistors each)
Ah okay, I haven't done much work with transistors. I've just looked it up and it seems like it could work.

Would I be able to reverse the current with a current mirror? I assume I would just take the output of the current mirror and switch the wires the other way round. But I'll investigate. (Or wait until someone tells me that's completely wrong!)

If I can't reverse the current, I'll need to find a way to turn 596mA into 20mA and 580mA into 4mA with the same circuit. It's unfortunate that gain is multiplicative.

Unless I have a current source of 576mA and use that as the ground for the input to the card. Then 580mA would be 4mA and 596mA would be 20mA.

I fear I've raised more questions than answered. Oh well, progress is progress!

berkeman
Mentor
Would I be able to reverse the current with a current mirror?
With the example circuit below, you drive your reference current into the left transistor, and the right transistor sinks the same amount of current...

http://i.stack.imgur.com/fIfaO.gif

It is not clear to me what the voltage and current levels are.

It is not clear to me what the voltage and current levels are.
Okay, so here's the sensors they usually use:
www.rshydro.co.uk/PDFs/Druck/PTX7533.pdf

But they were trying to be clever and got these air regulator valves with sensors inside them:
http://www.smcworld.com/upfiles/manual/e/E-ITV-STD-RF-A.pdf

Now, the one's they usually use seem to do this (example, 100mA supply 24v DC):

But the ones in the valves seem to use the supply current as the reference, rather than ground.

We're using a 24v power supply. Don't know what the current is though.

So I went and bought a multimeter because the fuse has gone on the one in the office.

I did some measuring and found something quite curious. The current I measured between the +ve and the return signal was indeed 4mA (as I had expected).
But the current between the return signal and ground was actually less than I had anticipated, it was about 1.5mA.
So I'm fairly certain I can't just use this current and adjust it by a factor (I'd need to take some measurements from site to find out for sure).
However I may still be able to reverse the current to fit both valves on one input card.

With the example circuit below, you drive your reference current into the left transistor, and the right transistor sinks the same amount of current...

http://i.stack.imgur.com/fIfaO.gif
So my problem here is that it's actually the ground reference that is changing to alter the current. The input to both PLC inputs is a constant (+24v), but the ground is not identical between the sensors.
How would I take the current between the +24v and the sensor output, and reverse it so that the ground input to the PLC is the constant (doesn't have to be 0v, just has to be constant and output the correct mA value) and it is the input that is changing (as it should always be, forevermore, amen)?

I do believe that current mirrors will prove to be one of the key elements of the solution I am looking for, so don't feel I'm ignoring your input. You've been very helpful, thank you.

I'm still unclear what's going on. Sometimes I think this is an analog output. Other times it seems to be a I2C bus. I can't tell what you are measuring, or what your test set up is for current or why this is a current device not a voltage one. The manual is clearly intended for installation and basic operation, not modifications. Finally there is a hint that dangerous pressures are involved.

Your boss needs to pay the money to hire a knowledgeable engineer who doesn't risk killing people rather than rely on some random guy on the internet.

Purple_Dan and berkeman
I'm still unclear what's going on. Sometimes I think this is an analog output. Other times it seems to be a I2C bus. I can't tell what you are measuring, or what your test set up is for current or why this is a current device not a voltage one. The manual is clearly intended for installation and basic operation, not modifications. Finally there is a hint that dangerous pressures are involved.

Your boss needs to pay the money to hire a knowledgeable engineer who doesn't risk killing people rather than rely on some random guy on the internet.
I completely agree!

I haven't been asked to do this by anyone, I'm just incredibly bored of twiddling my thumbs so I thought I'd try to get a better understanding of things, so no pressure (on yourselves) and no death!

Unfortunately it's not up to me, it's up to the client. And as the fuel prices dropped not so long ago, the oil and gas industry decided to cut lots of budgets. Meaning my client doesn't have as much to spend.

I'm a PLC programmer, my company does HMI/SCADA stuff and as such, the electrics and plumbing should be done before I arrive. This was not the case and I wasted a week in Aberdeen. So I'm trying to figure out what's wrong with the electrical connections in case they waste my time again.
We're still in the proof of concept phase at the moment, and anything I suggest will either be ignored or tested rigorously before being deployed.

Now, regarding the problem I may have bombarded you with information. The operation manual for the valve that I sent includes a plethora of different valves. The valve that we have is 4-20mA input and output.
I'm just focussing on the output of the valve here (there are also problems with the input, but I'm still waiting on some test data to analyse).
It's 4-20mA because that is industry standard and is less noisy and doesn't suffer from communication distance as voltage does.
The way the current is read by the PLC is actually by putting it across a known resistance and measuring the voltage, but this is peripheral knowledge.
It is not I2C, SPI, USB, Profibus, DeviceNet, NPN, PNP or voltage type, just a simple 4-20mA output.

So with all that in mind, do you have any ideas?

Again, the main problem is this, and I'll try to be as clear as possible:
The input card has a common ground, just the 1 ground.
The valve is changing the current with respect to the +ve input supply of the valve (not with respect to ground, which I'd have expected).
That means I have to put the output of the valve (black wire) in the ground of the input card, and +24v in the input terminal of the card (to get the correct magnitude of current flowing the correct way round).

I have two of these valves, working independently, putting them in the same input card results in them both reading the same value (this was alarm #1 in my head).
If I'm changing the ground, and there's only one ground, I can only use one card per valve (3 inputs wasted).
These cards are expensive. I don't care, the customer does.
How would I flip the current so that it's the same magnitude, but the constant is the ground and the variable is the input (thus giving me the same ground between the valves)?
It's not a simple thing to describe to someone with no prior knowledge of the system. I've been working on this system for over a year now and I fear I'm too far gone!

Thanks for any assistance you can provide, sorry for my obscurity,
Dan

Current is not measured "with respect to" anything. Current is measured passing a point (usually on a wire). My question is, what is that wire attached to?

Voltage is between two points (i.e. with respect to); current is passing through a point (wire, or possibly a closed ring).

My guess at a solution is to run the current across a voltage divider. Then use a comparator (op-amp) to give a yes/no signal with a 4 or 20 mA output. (A diode and some resistors might be needed here.) The comparator should have something called a schmitt trigger. Given that you already have DC power, that and a linear regulator should set up a good solution. Boards are about $50 mail order. (Someone needs to do the layout; plenty of software for it.) But as I pointed out, I can't be certain. It seems to be a digital output, but ... And this should not be done by the software guy. Professionals get paid the big bucks for their knowledge. I wouldn't attempt to code something where lives were at stake even though I've written code in my time. meBigGuy Gold Member You are talking 4-20ma current loop, which I get and understand, but I'm totally missing your particular problem. Maybe a diagram will help. Is the current loop sending "uart" style data? you can feed the current loop into an optical isolator to totally eliminate any ground issues. Read this and ask away! http://www.vishay.com/docs/83710/appn54.pdf Current is not measured "with respect to" anything. Current is measured passing a point (usually on a wire). My question is, what is that wire attached to? You definitely can have different amounts of current flowing through different parts of a circuit. I've managed to find the right point at which to measure the circuit, but my input device isn't ideal. I can't change the input device, so I was wondering if I could change the signal. I'll draw a diagram. Prepare yourselves, this might be painful: So this is how it's working so far. And the measurements are 4-20mA, but the valve is changing that black output wire. There are 4 inputs on that card, 3 of them can't be used because the common ground input to the card is being changed by the valve. This is how I'd like it to work, but it doesn't work this way. Bear in mind that the black wire from the valve is the signal wire, not ground (I don't know why they chose black). I suppose I could use the current between the + and the valve output, and put it into some sort of device that would read the current and output a corresponding 4-20mA signal. I could technically do that now, but I would still need 1 card per valve for the input, and I'd be using another analogue output card, so there's no point. I hope this clears something up, but in my experience, fag packet drawings such as these only increase confusion. Oh and don't worry, anything mentioned here is mainly for my own sanity and education. If I do come across anything, I'll mention it to the customer, but I'm not about to tell them how to wire anything up! And I'm certainly not about to wire anything up myself! We're not legally allowed to and I'm a 7 hour drive away from Aberdeen. I'll ponder on your idea now... Thanks, Dan So if there's a magical machine that can do this for less than £250, then I think we're good. You still don't get measuring current. You need to disconnect the wire and attach it to the meter. You should not be measuring it between two points. If you are sitting around not doing anything, you could probably wire a circuit to fix your problem for under £250. (If you have a problem. I don't trust your current measurements.) But if your time is valuable, I doubt it. It will take many hours of work. I will say that anything labeled "ground" should be connected to ground. To do otherwise is dangerous. You still don't get measuring current. You need to disconnect the wire and attach it to the meter. You should not be measuring it between two points. Give me some credit! I know I'm only doing software now, but my degree is in Robotics Engineering! If you take a look at this http://www.smcworld.com/upfiles/manual/e/E-ITV-STD-RF-A.pdf On page 6, you'll find a diagram, top right. The positive of the "monitor output current" is attached to the positive of the power supply, that's where I put my red multimeter stick. The negative of the "monitor output current" is the black wire from the valve. This is where I put my black multimeter stick. The valve is disconnected from the I/O card at this point, else I'd be trying to measure current in parallel! I apologize for underestimating your electronics skills. I've never done this before, so maybe someone else can comment here. I think you can use a 1:1 transformer. It should match the current nicely. meBigGuy Gold Member Did you even read the link (#11) I posted regarding the vishay opto? Do you see how that concept will solve your issue (like fig 2)? You use the sensor to power the transmission opto, and build your own 4-20ma loop using the receive opto as a switch (with,say, a 1.2K resistor to 24V) There are commercial devices that will do that. For example http://www.acromag.com/catalog/563/...tors/2-wire-loop-powered-isolators/600-series rbelli1 Gold Member that's where I put my red multimeter stick. This is where I put my black multimeter stick I think you will find that the burden resistor in the multimeter is very small. If you do this again I would suggest adding a resistor in series with the meter. BoB Did you even read the link (#11) I posted regarding the vishay opto? Do you see how that concept will solve your issue (like fig 2)? You use the sensor to power the transmission opto, and build your own 4-20ma loop using the receive opto as a switch (with,say, a 1.2K resistor to 24V) There are commercial devices that will do that. For example http://www.acromag.com/catalog/563/...tors/2-wire-loop-powered-isolators/600-series There are lots of circuit configurations that will work here. The current mirror will work. An OTA will work. Your opto-isolator will work. I was hoping for 1) Buy transformer. 2) Install. I don't think it needs other parts. I don't think it needs a board or power. Just solder some wires and maybe some sort of plugs. It does have some down sides. I doubt the current will match exactly. I would expect ≈ 3% losses for example. But I haven't done much work with transformers and could be mistaken about -- well lots of things. meBigGuy Gold Member Could you supply links to your sensors and input card? Sometimes there are configuration options to determine whether you want to source or sink current. Your input card and sensor seem to both be set up to sink current. For those that don't understand current loops: https://www.acromag.com/sites/defau...ire_Transmitters_4_20mA_Current_Loop_904A.pdf I was hoping for 1) Buy transformer. 2) Install. How can a transformer possibly work? The 4-20ma current loops have long periods of steady current. Or, some indicate something like pressure with a dc current. As a similar problem, how would you (in a simple way) send sporadic UART data through a transformer? Your current mirror would work, but not in the configuration you drew (just need to turn it over). Sinking 4-20ma on one leg needs to be translated into sourcing 4-20ma on the other. Like the left hand side of this image Remember, we are talking an industrial environment. Sensors don't resort to 4-20ma current loops for no reason. A surge protected, transient protected, ground fault protected industrial module (such as the acromag) is probably the best answer. People never get fired for solutions that just work. Acromag will either have a good solution, or point you in the right direction. (the acromag pictures show a transformer, but if they use one it a transition based implementation, not a simple transformer) Last edited: Long, steady currents? Well no transformer then. this has to be the most confusing thread I've ever seen in my life, to start with your confusing sink with source and I don't know if your trying to attenuate the signal, match an impendence or shift (?don't know the word for it?) the signal level to fall within a specified range? meBigGuy Gold Member The thread was confused by some not understanding what 4-20ma current loop is about, and me not reading the link in the original post. The installation designer's issue was how to connect two 4-20 current loop sinks, and it was solved by playing with ground. That made it difficult to connect multiple sensors since there is only 1 ground. The proper solution is probably to replace the receiver(or sensor) with a current sourcing receiver (or sensor), or reading the manuals on both devices to see if one can be reconfigured as a current source. Another solution is to use a current mirror to convert the sink output sensor into a current source. Another solution is to call Industrial control suppliers to get the proper isolation devices. The following is the only sink-sink interface I found API APD-4300 PLC DC to DC Transmitter Module Last edited: Could you supply links to your sensors and input card? Sometimes there are configuration options to determine whether you want to source or sink current. Your input card and sensor seem to both be set up to sink current. For those that don't understand current loops: https://www.acromag.com/sites/defau...ire_Transmitters_4_20mA_Current_Loop_904A.pdf How can a transformer possibly work? The 4-20ma current loops have long periods of steady current. Or, some indicate something like pressure with a dc current. As a similar problem, how would you (in a simple way) send sporadic UART data through a transformer? Your current mirror would work, but not in the configuration you drew (just need to turn it over). Sinking 4-20ma on one leg needs to be translated into sourcing 4-20ma on the other. Like the left hand side of this image Remember, we are talking an industrial environment. Sensors don't resort to 4-20ma current loops for no reason. A surge protected, transient protected, ground fault protected industrial module (such as the acromag) is probably the best answer. People never get fired for solutions that just work. Acromag will either have a good solution, or point you in the right direction. (the acromag pictures show a transformer, but if they use one it a transition based implementation, not a simple transformer) Congratulations! You won! Your answer is exactly what I'm looking for. It's also the exact same solution that the client has decided to go with! Yes, my client finally asked an actual Electronics Engineer (without telling us he was going to do so) and they pointed him towards this solution. Just yesterday! Here's what they went with: http://datexelusa.3dcartstores.com/DAT5030-Current-loop-Repeater-with-HART-option_p_139.html It appears to be dual channel and it's$50 cheaper than the Acromag one! So I think smiles all round.

There is probably a way to do it considerably cheaper, marginally less accurately and with no warranty and no guarantee. But if something does kill someone, at least we have someone else to blame now because I didn't suggest it! Hooray!

And Jeff, I'm sorry I flew off the handle. Feel like an arse now...

Thanks everyone for all your suggestions, I feel like we've all learned a little bit more about electronics. Well I have, you probably already knew this stuff...

meBigGuy
Gold Member
Cool. Turns out the words I needed to use were simply "current loop repeater". I kept struggling, looking for "sink-sink interface" and the like. Never dawned on me that the current loop repeaters would have all the source/sink options. I knew there had to be tons of these things, but couldn't find the key.

Learn things every day.