Go Down

Topic: 4-20 mA Output (Read 3930 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 will NOT respond to personal messages, I WILL delete them, 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


nigeltech

Has anyone tried these?
http://www.aliexpress.com/item/Voltage-To-Current-Module-0-2-5V-Turn-4-20MA-Linear-Conversion-Sensor-Module/32413983534.html
0-5V input, 24V supply, 4-20mA output, galvanic isolation. Looks the business to me, I'm buying a couple to see how they go.
I think the original poster has the same issue as I, wanting to operate an industrial device which uses 4-20mA control on a 24VDC loop power, and only an Arduino to do it with.
Now I will have to convert the PWM signal to 0-5V, Hmmm

Dewie

How did you ever make out with this? I am simply trying to feed a 4-20 mA signal in to a device which reads signals (I am trying to emulate sensors) @ 24VDC and am having a bit of a time determining what is going to be my best course of action.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy