# 4-20 mA output from Arduino for VFD

I'm a beginner with electronics, so everything has to be explained in simple terms to me.

I have an Arduino with a program which provides a value via the Analog output, so that is anything from 0-5 V.

On the other side, I have a VFD with an IO card which allows it to connect to a 4-20 mA current loop, to vary the speed of the motor accordingly.

How do I convert from, let's say, 0-5 V output (PWM) from Arduino, to the 4-20 mA in a somewhat cheap and safe way (I don't want to destroy the VFD [and possibly the Arduino])?

Currently, I am using the circuit below:

The problem is that the simulation on "Multisim" is giving accurate results. However practically, the circuit did not give the accurate results.

For example:

• When V = 5 V output (from Arduino analog), I = 20 mA (V=IR) --> which is correct
• But, when V = 3.3 V output (from Arduino analog), I = 16 mA (V=IR)--> which is incorrect, as it should be 13 mA

Will this circuit work practically

• If V = 3.3 volts then Iout should be 14.56 mA. I don't know how you got 13 mA. OK you assumed that 1 volts = 4 mA rather than 0 volts is 4 mA. You need to decide this. May 25, 2020 at 11:29
• How it is 14.56mA? Plz Explain May 25, 2020 at 12:26
• 0 volts maps to 4 mA and 5 volts maps to 20 mA plus a straight-line graph. May 25, 2020 at 12:29
• Oh! I got it.Thanks May 25, 2020 at 12:34
• FOR 1-5V to 0-20mA: I am very confused! When I use 3.3V ouput from Arduino Nano Power Pin--> Iout=13mA (which is ok). But,When I use 3.3V ouput from Arduino Nano Analog pin(PWM)--> Iout=16mA (I can't understand this value). At 2.5V output from Arduino Nano Analog Pin--> Iout=13.7mA. Is seems their is a problem using Analog pins of arduino nano.?? May 25, 2020 at 13:19