I am building a simulated rotating light using 16 white LED's in a circle. Here is a streaming flash clip if three LED's on the test bench.
I will be using three rechargable NiCD or NiMi batteries or perhaps a single SLA 4V (solar charged not finished experimenting with all of them yet.) to power the mega48 and driving the LED's using PWM duty cycle from 0 to 99% Each LED is driven from a different pin. (16 pins used) The device should run the batteries down as far as the minimum specs, perhaps down to 3V before turning off.
Measuring the current to the circuit without any LED's connected the mega48 is using about 7mA. A fully charged battery pack (3 batteries) with LED's connected is consuming 32mA. I know this is too high (I tested one led at a constant 99% duty cycle to measure this) If I use the 4V SLA it would be way too high at maximum charge.
So a current limit circuit is needed.
There are a few options well more than a few and I would like an opinion or three on what would be the best way of doing it using the least amount of prower waste.
One way is to measure the voltage using one of the ADC channels and drop the duty cycle to a known level for the voltage at the time, variances in the forward voltage of the LED's may lead to a problem though, measuring the current using a current sense chip would be another way.
Jfet's and bipolar transistors or an adjutable LDO regulator are others.
What would you suggest? (no teensy tiny smd's I have to solder these)