View Single Post
Old 12-29-2012, 11:57 PM   #30
TechniSol
GranPohbah-Fezzes r cool!
TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.TechniSol ought to be getting tired of karma fortunes by now.
 
TechniSol's Avatar
 
Posts: 998
Karma: 3088870
Join Date: Jul 2010
Device: Nook STRs, Kobo Touch, Kobo Glo
sysKin,

The biggest problems I see with your reasoning is the idea that the cap can charge instantaneously -it can't, or how you'd get enough current to power 4 or 5 LEDs in parallel from one pin when most micros only source a few ma, or sink up to 20ma...

I would expect the PWM output would drive a MOSFET likely through a resistor to the gate. The MOSFET, maybe a 2N7000(200-300ma depending on manufacturer last time I used one), would probably go directly to the rail. The LED gets driven through a resistor that sets maximum current in case the FET is left on. Positioning the cap on the gate side would probably be best. Tiny cap by the way, just to smooth out spikes on either end of the PWM cycle waveform -maybe not required, but a little buffering never hurts unless you need really fast response time.

Pulse width modulation can be power saving, especially in high current applications or when supply voltage is much higher than the device's operating voltage because it's more power efficient than throwing away power on resistors, but in general it's also the easiest way to provide multiple output power levels or speeds from one microcontroller pin. It sounds great to leave the resistors out, but when the micro goes splat then the LEDs get burnt out if your PWM output gets locked on and your LEDs get excessive current because the MOSFET is continuously passing full rail voltage to your LEDs. Could be kind of embarrassing. Not sure it's worth a little power savings. OTOH, if the supply voltage is very near the LED drop, you might get away with it... maybe... for a while.
TechniSol is offline   Reply With Quote