Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage

2012-10-02 by Philippe Habib

Actually, what I needed was a 0-10V analog signal to drive a commercial dimmable LED driver module.  The requirement was to drive 4 of these with up to 50ma.  I was leaning toward a quad SPI DAC and then a simple amplifier using a FET, but the project was put on hold for a few months so I never followed up.

Thank you for all of the help and advice.

----- Original Message -----
From: "Jim Wagner" <wagnejam99@comcast.net>
To: AVR-Chat@yahoogroups.com
Sent: Tuesday, October 2, 2012 8:21:13 AM
Subject: Re: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage

The original poster does not require either a filter or an amplifier. A simple NMOS FET switch will do it. SImply PWM drive the switch in the ground lead of the LED., Run the PWM frequency (the PWM repetition frequency, not the counter clock frequency) anything greater than 100Hz or so (set by the vision time constant of the human eye). Done. 


Jim Wagner 
Oregon Research Electronics 

----- Original Message -----
From: "raoul.palma" <raoul.palma@yahoo.com> 
To: AVR-Chat@yahoogroups.com 
Sent: Monday, October 1, 2012 1:43:49 PM 
Subject: [AVR-Chat] Re: Using a capacitor to convert PWM to a voltage 







--- In AVR-Chat@yahoogroups.com , Philippe Habib <phabib@...> wrote: 
> 
> I need to generate a 0-10V signal to control some dimmable LED 
drivers. I know I could do it with a DAC, but I think I might be able 
to save a part by generating a PWM signal and smoothing it out with a 
capacitor to make a voltage out of it. My problem is, I don't know how 
to properly size the capacitor to get a reasonably smooth signal. The 
output would change slowly. A full 0-100 or 100-0 transition would take 
at least a minute and usually many minutes. 
> 
> Can someone provide some guidance about how to size the capacitor and 
what type of capacitor is best suited for this type of thing? 
> 
> Thank you. 
> 

All the previous suggestions will like drive you crazy if you try get 
them working ! You can not "save a component" and have a decently 
working circuit. 

-) First off, the nature of an LED is that it is a current-driven 
device, not a voltage driven one. Trying to drive it with voltages is 
harder than driving it with currents. 

-) A nice and simple single IC DAC is very easy to design into a circuit 
and even simpler to program with an MCU. It's best that you toss the 
PWM-driving idea. This is why Atmel includes a ADC on some of there 
MCUs, but never a D/A. it's very easy to implement externally. 

-) You're going to need a signal amplifier. That can be a nice simple 
CMOS opamp. Trying to use a single transistor as a signal amplifier will 
likely to drive you crazy, too. Transistors are very nonlinear devices, 
but you need a linear amplifier. Even the cheapest, simplest, lowest 
bandwidth, low-power opamp circuit excels at this. An opamp I've used 
with great success is the National Semiconductor LMC6482AIM dual CMOS 
opamp. 

-) The opamp signal amplifier circuit can take the voltage output from 
the DAC and, with just a few resistors, output a linear current 
amplifier. Since your LEDs are driven by a "high" voltage, a suitable 
low power "drive transistor" should be part of the opamp 
voltage-to-current signal amplifier. 
[277] 
The DAC drives the current amplifier and the current amplifier drives 
the LEDs. 
[389] 

[Non-text portions of this message have been removed] 




[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.