4-20mA output options

Hi there,

I have very little experience with the Arduino and would appreciate a couple of pointers, if possible. I am considering using an Arduino to control a variable-speed PSC controller from varidigm, specifically VSM-CA2, which can be controlled with a remote potentiometer, 4-20mA signal, or 0-10VDC signal.

For simplicities' sake, I'd like to control the varidigm board using the 4-20mA option. Based on reading I have done, I gather I should use a capacitor to smooth out any ripple (0.1uF?) from the PWM signal. Other than that, is it as simple as putting a 220Ohm resistor in series with the output pin from the arduino (I don't want to fry anything)?

The other option is to go the 0-10VDC route, either with something like the XTR110 mentioned elsewhere, or the much less expensive solution of using a transistor, a 12VDC power supply and a similar smoothing cap to create a 0-10VDC signal.

So, is 4-20mA straight from the analog pin kosher? If so, what external smoothign capacitor should I use? Many thanks in advance for any advice, pointers. Cheers and happy Easter. And since I don't know if posting links here is allowed or not, I won't post a link straight to the Varidigm data sheet. But if someome would like a link and it is allowed, please let me know. Many thanks, Constantin

So, is 4-20mA straight from the analog pin kosher?

No. Even if you filter a Arduino PWM analog output you will have obtained a programmable analog output voltage, not a programmable constant current output. 4-20ma current outputs require external components. You are probably better off with the 0-10vdc option for your controller. That will still require external components like an op-amp to amplify the 0-5vdc of the filtered PWM output to a 0-10vdc analog output.

Lefty

Hey Lefty, thanks!

The varidigm board also has the option of being controlled with an external potentiometer. Do you suppose that a digital pot might work? The only reason I'd go this way is to keep the number of power supplies to a minimum.

IIRC, it was Grumpy Mike that posted a similar solution to the one you mentioned, i.e. using the arduino to pulse a transistor attached to a 12VDC power supply and smoothing the output.

Seeing that I spent $66 on the variable-speed drive, I want to use something as intrinsically safe as possible so I don't blow it out... So, while I could even feed the output back into the Arduino to ensure that it never exceeds 10VDC on the output side, the digital potentiometer approach seems to have merit also. Have you ever tried this?

Do you suppose that a digital pot might work? The only reason I'd go this way is to keep the number of power supplies to a minimum.

I haven't played with digital pots yet. My impression is that they probably won't work for your application. I think most are designed for lower voltage signals, like line level adudio which is just a AC voltage of less then 0-2vac.

Lefty

Well, in what I know a "digital pot" is an rotary encoder, with or without limited rotation, so it won't work without reading it and doing some processing of its output to then control something.

Hi Lefty and Senso,

I guess I'll have to decide which approach I like better, op-amp with a gain of two or the transistor approach. I suppose the op-amp might be a bit safer since the gain can be fixed to not allow voltage above 10VDC. I'm still amazed at the cost of the XTR110-type solution, those constant current sources/voltage converters sure are expensive!

Senso, a digital potentiometer is not a rotary encoder. Rather, you'd be looking at a chip with usually 8 pins - 3 for the "wipers", another 2 for the up/down and increment (or SPI interface), the remainder for power, etc. What's nifty about the chip solutions is how easily you can use them to vary resistance in known increments. Unlike mechanical solutions, you can talk to them directly from an arduino and there are no wipers to oxidize with time. On the downside, the current-handling is rather limited.

Anyhow, many thanks for both replies, I'll try to update once I have finished the project (smart variable speed solution for a heat recovery ventilator).

So, is 4-20mA straight from the analog pin kosher?

No. Even if you filter a Arduino PWM analog output you will have obtained a programmable analog output voltage, not a programmable constant current output. 4-20ma current outputs require external components.

That's a little pessimistic - given you filter the output with a smoothing capacitor you can then pass this through a resistor to turn it into a current. However you will need to know the input voltage that the controller uses for its current-sensing input - I couldn't seem to find the full specs.

Another issue is that the PWM frequency of the Arduino by default is quite low (1kHz or 500Hz depending on which pins), you might have to increase this to get jitter-free response.

Either way you'll need to figure out low-pass filter parameters.

The opamp route will require a supply from at least 0V to 12V, perhaps more, in order to cover the output range, note, which is a complication.

That's a little pessimistic - given you filter the output with a smoothing capacitor you can then pass this through a resistor to turn it into a current. However you will need to know the input voltage that the controller uses for its current-sensing input - I couldn't seem to find the full specs.

Have you ever worked with loop powered 4-20ma current loops? I ask because it is industrial standard interfacing method, but is more complex then may first seem, especially for simple interfacing with a Arduino. One requirement is to deal with the 4ma 'live zero' concept. This allows a current loop measurement system to differentiate from a 0% measurement or command value and a broken or open loop connection. So one can't use a PWM output of 0% duty cycle to represent a 0% command to the controller that needs to see 4ma for a valid 0% command. Again 4-20ma current loops are a little more complex then just filtering and driving via a fixed resistor.

Then there is the issue of which side of the current loop is providing the loop current, if it's the motor controller then the Arduino interface needs to simulate a passive dynamic adjustable resistance to the loop. If the controller is expecting the Arduino to power the loop then it needs to supply the loop compliance voltage source, typically a 24vdc potential.

All in all, using the 0-10vdc interface to the controller will be a much simpler interface.

Lefty