SMPS/buck converter driven by AVR

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm working on a RGB fading LED project.
The LED has 3 dies in series for each color. So Vf would be in the range of 7-8V for red and 10-11V for Blue and Green. I want to drive them with a variable constant current source (max 350mA per color). That sounds like an oxymoron, but I want my AVR (Tiny84) to be able to continuously vary (fading) the current to the LED, but not have the LED draw more current than the AVR tells it to. I thought I could use 3 PWM outputs of the Tiny84 to drive a P-FET for each color (via FET drivers) that switched the supply going into a standard Schottkey/inductor/capacitor SMPS output stage. Using 8-bits I can get ~32KHz. Each color would have a current sense resistor in the ground leg of the LED read by an ADC channel. The input voltage is going to vary from ~17 to 12V. So just using a resistor to limit max current to 350mA and using straight PWM control of the LED would over drive the LED when battery voltage is at it's maximum.
As far as I can tell, this SHOULD work.
But I thought I'd run it by the folks here to see if anyone has done this or something like it before and/or has any tips.
Thanks, guys.

Jim M., Rank amateur AVR guy.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not done anything quite like that, but might be tempted to in the future.

This microchip app note seems pretty close to what you want to do. Perhaps some useful info can be gleaned from it.

http://ww1.microchip.com/downloa...

-carl

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

H. Carl Ott wrote:
Not done anything quite like that, but might be tempted to in the future.

This microchip app note seems pretty close to what you want to do. Perhaps some useful info can be gleaned from it.

http://ww1.microchip.com/downloa...
-carl


Great app note. I'll read it more thoroughly later. But, very interesting.

Jim M., Rank amateur AVR guy.