I have a PLC which offers analog inputs of either 0-5 VDC (6 VDC max) or 4-20 mA (sink). The source will be 24 VDC and I want the input to be manually adjustable (assuming with a potentiometer). The input impedance for the 0-5 VDC input is 150 kohms and the input impedance for the 4-20 mA input is 200 ohms.

I'm not sure what the best way of going about doing this is or which input would suit my needs better. I'm assuming there are certain pros and cons for each one. Possibly one being more steady than the other? If either can be done and results would be fairly similar then I would probably choose which ever is easier/less expensive.

I was originally trying to figure it out using 2 resistors as a voltage divider to get down to 5 VDC and then a potentiometer to vary the voltage on that 5V leg. Or possibly using 1 resistor in series and 1 in parallel with a potentiometer to vary the current? I'm a bit lost on exactly how to do it as well as which way is best. If you need anymore info just let me know.

  • \$\begingroup\$ Well written question will all the required information. +1. \$\endgroup\$
    – Transistor
    Commented Jul 8, 2016 at 20:26

2 Answers 2


4 - 20 mA is common in industrial systems and has a few advantages over 0 - 10 V or 0 - 5 V control.

  • It is less sensitive to induced noise.
  • Voltage drop along the wires is accommodated. The transmitter adjusts the voltage to maintain the signal current. Long cable runs are possible.
  • Since signal "zero" is 4 mA we can tell the difference between "zero" (4 mA) and a cable break (0 mA).
  • A fault condition can be signalled by sending, for example, 2.5 mA.
  • The remote sensor can be powered by the loop provided it can work at a minimum of 4 mA. Only two wires are needed.

Since you want to experiment the voltage control is a much simpler option.

The source will be 24 VDC and I want the input to be manually adjustable (assuming with a potentiometer). The input impedance for the 0-5 VDC input is 150 kohms.


simulate this circuit – Schematic created using CircuitLab

Figure 1. Deriving 0 - 5 V from 24 V supply.

We don't want the input impedance to load the pot significantly or the response will not be linear. If the PLC input is 150 kΩ we should go for 1/10 of that for the pot. 15k pots aren't common so we'll go for 10k - even better. The maths is easy too: 2 kΩ per volt of output.

Now we just need to calculate the value of R1 to drop 19 V across it. Using 2k/volt again we get 38 kΩ. 39 kΩ is the nearest standard value.

One more check: the power dissipated in the resistor will be given by $$ P = \frac {V^2}{R} = \frac {29^2}{39k} = 21~mW $$

A 1/4 W resistor will last forever.

... or the input impedance for the 4-20 mA input is 200 ohms.

Almost certainly 250 Ω (not 200) because you would be jumpering in the resistor across the 0 - 5 V input so that 20 mA gives 5 V. \$ R = \frac {V}{I} = \frac {5}{20m} = 250~\Omega \$. The 4 - 20 mA will be read as 1 - 5 V by the analog input.


Both those input types have in common that they depend on an internal (to the PLC reference)- they are not 'ratiometric' or proportional to the input voltage. To get a high degree of accuracy and stability you need an external reference so that your pot rotation results in a known and stable (in absolute terms) voltage or current.

Once you have the signal, current is more suitable than voltage for transmission over long distances in an electrically noisy environment. If the pot is in the same cabinet as the PLC it doesn't much matter for most purposes.

The easiest and perhaps best solution is to buy a pot-to-current (or voltage) transmitter which will convert the pot rotation to voltage or current.

Rather than use resistors, a DIY solution I could suggest would be to use a TO-220 voltage regulator such as an LM7805 to produce a 5V voltage (best to add a couple of capacitors- a couple 10uF/50V electrolytics will work well). You can then use a pot of reasonable value (such as 1K-10K) and connect the wiper directly to the PLC input- if your PLC provides such an output (5V), that would be even better. You can make a pot to current converter as well, but it's a bit more involved- there are so-called 2-wire transmitter chips available that do much of the work for you, check out Texas Instruments' (nee Burr-Brown) offerings in their XMTR (transmitter) series. Either way will get you to within a few percent accuracy, avoiding influence from the large variability of the pot element resistance (often +/-20%).

Do you need a heat sink with the 7805? Well, if the power is less than about 600mW you generally will not, so the pot element can be as low as 200 ohms (the regulator draws 5mA or so itself) before you need consider heat sinking for reasonable environments. If the user short-circuits the output the 7805 will current and temperature limit, which is sort of a life-threatening situation for the regulator but usually they will survive. Add a PTC self-resetting fuse if you want more protection. A resistor can also be used, but increase the input capacitor and calculate the resistor so that there is 7-10V input for the minimum allowable pot element resistance (eg. 24V-10V/(5mA + 5V/Rpot) = 1.4K so you could use 1.3K 1/2-W resistor if you limit the pot element resistance to 1K or greater.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.