Calculating PWM

gibby_z

Newly Enlightened
Joined
Feb 22, 2008
Messages
23
How difficult is it to control an LED using only pulse width modulation?
How would I calculate the duty cycle to achieve a 1000ma equivalent for a given voltage?
I want to try and use a micro-controller to detect battery pack voltage then have it modify the PWM duty cycle to regulate the LED as the battery voltage drops. I know there may be drivers that do similar things like this but I need a bit more freedom to tell the LED exactly what I want it to do when I want it to do it.

Thanks
 
Before things get too complicated...

Regulating LEDs with just PWM doesn't really work well, unless you use a single Li-ion cell or 3 NiMH/NiCD cells.

:cool:
 
If you want to do your own microcontroller based driver you could look at this thread. It's esentialy a linear driver with a microcontroller providing the controll. I have used variations of it in two prejects a single 18650 Mce light weight headlight and a 2 bright red led bike flasher using two Nmhi AA's.

Ifor
 
Top