# 4-20 mA Output

Hi all, I'am looking for a solution to convert the PWM output to a 4 to 20 mA signal Anyone done this before ?

Grz

A suitable low-pass filter would be simplest. The 4-to-20mA part can be implicit if you know the input impedance.

If you know the frequency of the PWM, then design a low-pass LC filter with a "3dB" corner frequency of 1/100th of that. This will give you 80 dB of rejection of the higher frequencies, which is enough for a 12 bit ADC input. For example, for 20 kHz PWM, a corner frequency of 200 Hz will give you 5 ms response time. If you want to use a smaller inductor, or faster response, raising the filter frequency is an option, but you'll get more ripple.

If the PWM is already low frequency, like the 490 Hz that comes out of the Arduino, then you're in more trouble. You'd probably want something that times the interval, and latches the output level until the next cycle.

Corner frequency of 200Hz is more like response time of 800us - there's a factor of 2 pi...

An RC filter at 1/100 the frequency is 40dB rejection, not 80dB

Agreed that an RC filter, with 6 dB/octave slope, is 40 dB at 1/100th the frequency. That's why I suggested an LC filter, which has higher slope :-)

Actually converting the PWM to a 0-5vdc analog voltage is probably the easy part. Converting the voltage to a 4-20ma is a little more complex. You will need to know something about the device that is to receive the signal, what impedenace it is providing and if it will provide the loop voltage or not. I think National Semi (or maybe it was Signetics?) use to make a DC voltage to 4-20ma converter IC back when sometime, not cheap as I recall. Otherwise get your op-amp application circuits manuals out and get to work.

Lefty

lefty,

I was think that direction, combining the two attach examples
will do the trick, and still tinking about mis use a 78xx in to a const current driver.

thx

teding:
lefty,

I was think that direction, combining the two attach examples
will do the trick, and still tinking about mis use a 78xx in to a const current driver.