PWM Converter 0-5V to 0-20mA/4-20mA

Guys, does anyone have a circuit to get the Arduino PWM signal, apply a filter and convert the 0 to 5V and current signal, 0-20mA or 4-20mA?

What have you tried? The filter is widely known, a few minutes search would find those, "Arduino PWM low pass filter".

A variable current source always has voltage limits. What is your target spec for that? In lieu of telling us what you're using it for... :slight_smile:

The filter part, that's ok, I made a simple RC filter now I don't know how to convert the 0-5V signal to a 0-20mA or 4 to 20mA current signal to connect and control instrumentation equipment.

My electronics knowledge is limited.

Post it.

30 seconds with Google:
https://circuitdigest.com/electronic-circuits/voltage-controlled-current-source-circuit-using-op-amp

You didn't respond to the question about voltage range. If you can't do that, then please identify the actual hardware you're driving.

image

Current signal will be read by any PLC used in instrumentation

The selected N channel MOSFET determines the acceptable maximum voltage range. The voltage drop on the shunt determines the minimum voltage range.

The voltage range becomes more important with a P channel MOSFET, with load towards GND. That's when the maximum allowed load resistance enters the scene.

Yes. But somewhere in the circuit there must be a fixed supply voltage. It has to be sufficient to produce output voltages in the target device input voltage range.

That is because the driven device will often have a voltage differential across it, due to it's non zero impedance. Perhaps this is what you refer to, the "shunt"...

When I have time someday, I will go and find out what standards apply to that. However I don't use PLC's and most people here don't, so it would be good to explain.

Voltage supply yes, fixed no.

The target device includes a load resistor to convert the constant current into a voltage. The value of that resistor determines the resulting voltage and is limited by the voltage source. The supply voltage can be provided by the target circuit and the constant current source only works as a current limiter without a voltage source. See current limiting motor drivers with external power source.

Thanks for your thoughts. In fact a current driven circuit can include multiple load resistors or shunts, with IMO exchangable terms "load" and "shunt". Perhaps it depends on the circuit point of view, with internal shunt and external load resistors?

Interesting. Usually the supply is fixed, just because that's what's available. There is nothing preventing it from varying, sure you could include even an AC voltage supply in a current regulated circuit if it were designed to accommodate that.

True about the resistor load, but there is also the Hall device. Indeed the load resistance is a factor in the voltage requirement. It's what I hoped the OP would specify or point towards.

In terms of the concept of a current source, I think it's appropriate to use "load" when talking generally, and "shunt" when the load resistance is deliberately made small, in order to measure current without disturbing other component parameters in the circuit. That is usually crucial, but when current is only a signalling parameter, there are no additional circuits to worry about. It may also describe a certain kind of load more specifically, for example an LED.

I just noticed, the op amp circuit uses a "shunt" resistor, in character, it should be a small value. As you pointed out, it is in series with other devices. In the circuit, it makes sense to differentiate and label "shunt" and "load" but as a black box in a control system where A drives B, I imagine it as connecting to a load, but since it's really a device input, that load can be viewed somewhat as a shunt - in the sense that it converts current to a measured voltage.

So, you are trying to simulate different currents going through a circuit in order to measure it? Why are you limiting yourself to using PWM to achieve variable current? You could do the same thing with a rheostat a lot easier.

There are ICs for that :wink: 4-20ma ic - Google Search

Note
@WaWa posted a complete board while I was searching

And I think that the design of the circuit on that board is WELL beyond what you should expect to receive on this forum. I mean, the number of individual components is nuts.

Take a look at this application notes af Linear Technology, the proposed circuit is relative simple, and works well (I build up a couple of it).

Ciao, Ale.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.