Author Topic: Analog Output  (Read 16813 times)

paterianus

  • Guest
Analog Output
« on: March 22, 2012, 04:51:27 PM »
I need a 0-5VDC analog output.  It appears that the only way to do this is to put a load resistor accross a PWM output.  Has anyone done this and how did you configure it?  Do I need a filtering capacitor?

Offline 240glt

  • PLUS+1 Developer
  • ***
  • Posts: 35
  • Karma: +1/-0
Re: Analog Output
« Reply #1 on: March 23, 2012, 12:58:14 PM »
Hi. I did this on a MC090-010, with a PWM output (c1p29).
PinConfig: 3
DitherAmp: 0
ReqFreq:1000

A made a low-pass filter, with two zener diodes (for safety).
I controlled a charger, with a 0-5V input to control the charging current. In my case, I didn't need to change the signal fast. I was more interested in having a smooth voltage. I made a small PCB with three connectors (there are two chargers to control).

The first resistor and zener diode limits the PWM signal to 5,6V peak. Then we have a lowpass filter, with a cutoff frequency of 16Hz. After that a zener diode again, to limit the maximum voltage to 5,1V. I did this for a few years ago, so I don't remember if the output are linear. If you want to try it, you have to do some tests to see if it is smooth enough, if the response to a changing voltage are quick enough, and to see how a certain PWM dutycycle corresponds to a certain voltage.
« Last Edit: March 23, 2012, 01:21:47 PM by 240glt »

paterianus

  • Guest
Re: Analog Output
« Reply #2 on: March 23, 2012, 07:36:51 PM »
Thanks, I'll give this a try.  It looks exactly like what I'm looking for.

jsaluk

  • Guest
Re: Analog Output
« Reply #3 on: March 24, 2012, 05:57:43 PM »
I have used a simple PWM output.  I compared 5 vdc to the supply power to establish the max PWM % and then the command was a percentage of that maximum.  I used an MFOut with 4000 Hz frequency.  The valve being controlled seemed quite happy with this command. 

jhorn22

  • Guest
Re: Analog Output
« Reply #4 on: March 12, 2014, 02:13:01 AM »
I need a much quicker response so I just tweaked the RC time constant, but I have another question.  In the IOX012-010 short data sheet it says under the PWM output section "Analog voltage: open loop PWM at 4000 Hz."  Is that just saying that I should set my PWM to 4k and use an RC filter or is there another way to filter this better?


Offline oiltronic

  • PLUS+1 Guru
  • *****
  • Posts: 170
  • Karma: +15/-0
Re: Analog Output
« Reply #5 on: April 05, 2014, 08:35:23 PM »
It's just saying that the PWM output is open-loop, meaning it doesn't adjust the duty cycle based on any feedback, and that it can go up to 4000Hz if you like.  How you filter it all depends on the current and max ripple voltage you need.