The OP could drive a switch FET (2N7000, for example) from the AVR and powered from +10V or more. A couple of resistors and a cap will do it. And, you will get far better linearity than though any op-amp. Jim ----- Original Message ----- From: "Cat C" <catalin_cluj@hotmail.com> To: "AVR-Chat@yahoogroups.com" <avr-chat@yahoogroups.com> Sent: Monday, August 20, 2012 3:31:14 PM Subject: RE: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage Either way you'll likely still need an amplifier (neither AVRs nor DACs won't likely give you 10V output). So you could go with the PWM and a buffer/amplifier. Cat ---------------------------------------- > To: AVR-Chat@yahoogroups.com > CC: AVR-Chat@yahoogroups.com > From: phabib@well.com > Date: Mon, 20 Aug 2012 15:19:50 -0700 > Subject: Re: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage > > Thanks Don, > > In my case I'm supposed to drive a commercial LED driver's input 0-10VDC control voltage. Since the input impedance of the LED driver bricks will no doubt vary between manufacturers and probably even models from the same manufacturer it sounds like I'll be safer by using the DAC and spending the extra buck. > > ----- Original Message ----- > From: "Don Kinzer" < dkinzer@gmail.com > > To: AVR-Chat@yahoogroups.com > Sent: Monday, August 20, 2012 3:14:40 PM > Subject: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage > > --- In AVR-Chat@yahoogroups.com , Philippe Habib <phabib@...> wrote: > > Can someone provide some guidance about how to size the capacitor > > and what type of capacitor is best suited for this type of thing? > You need a resistor in addition to the capacitor. The values for the R and C to get good filtering will vary depending the chosen PWM frequency and the impedance of the load. (The PWM signal puts charge into the capacitor during the on time and draws it out during the off time; the load draws charge out of the capacitor.) > > In order to calculate acceptable values for R and C, one would need to know the PWM frequency, the load impedance, the desired responsiveness and the allowable error voltage. For a one-off project, it may be simpler to try some values and determine what works well enough. For example, for a 1KHz PWM signal you might start with 100 ohms and 10uF. An oscilloscope would be useful to be able to "see" the resulting signal. > > Don Kinzer > ZBasic Microcontrollers > > > > > > ------------------------------------ > > Yahoo! Groups Links > > > > > > ------------------------------------ > > Yahoo! Groups Links > > > [Non-text portions of this message have been removed]
Message
Re: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage
2012-08-20 by Jim Wagner
Attachments
- No local attachments were found for this message.