Go Down

Topic: 4-20 mA Output (Read 2 times) previous topic - next topic

teding

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

jwatte

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.

MarkT

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
[ I won't respond to messages, use the forum please ]

jwatte

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 :-)

retrolefty

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


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.
Gone build up the breadboard.

thx

retrolefty

#6
Feb 24, 2012, 09:26 am Last Edit: Feb 24, 2012, 09:32 am by retrolefty Reason: 1

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.
Gone build up the breadboard.

thx


That should work out, however your specific 'load' my require a grounded 'load resistor', which that second design doesn't appear to support? Also I would suggest you consider adding a little 'fudge factor' of a little more gain then needed and an adjustable offset control. Industrial E-to-I converters almost always included two trimmer pots to fine tune the 'zero' (offset) and 'span' (gain), to allow for fine calibrating the whole system.

Lefty


Go Up