Brightness / run-time trade-off

A project log for Decade Flashlight

Low-power, always-on flashlight good for 10 years

ted-yapoTed Yapo 07/07/2017 at 01:030 Comments

When you program the PIC on these boards, you can choose the number of current pulses the LED receives every 16ms:

;;; number of LED pulses per WDT timeout loop
  N_PULSES    equ   .7
LED_PULSE   macro
  variable  i
  i = 0
  while i < N_PULSES - 1
  movwf     LATA              ;start inductor ramp-up
  clrf      LATA              ;end inductor ramp-up
  nop                         ; 2 nops here - tuned for minimum current
  i += 1
  movwf     LATA              ;start inductor ramp-up
  clrf      LATA              ;end inductor ramp-up

This changes the brightness of the LED and the run-time for a given battery

I don't have a calibrated way to measure LED brightness, but I know the brightness is basically linear with the number of pulses. I routinely use one with 7 pulses (40 uA / 10 years on two lithium AA cells) for walking around in complete darkness.

I measured the current usage vs the number of LED pulses today:

N Pulses Current (uA) Lifetime (2AA LiFeS2 cells)
2 12.5 32 years (exceeds shelf life)
3 18.1 22 years
4 23.5 17 years
5 29.0 13.8 years
6 34.4 11.6 years
7 40.0 10 years

More interesting than these specific points is the line fit to them, equating the current to the number of pulses:

Using this, we can estimate the number of pulses to program for a desired current drain by solving for N:

for I in uA.

To get the desired drain, we can divide the battery capacity by the desired run time:

For example, if we want a 1-year run-time from 2 AA LiFeS2 lithium cells with a 3.5 Ah capacity, we get I = 3.5/(365.25*24*1) = 400 uA. Using this we calculate N = 73.

Interestingly, when I program a board for 73 pulses, I measure a drain of around 350 uA, so the line fit isn't perfect. There is something interesting going on with many pulses - I suspect the 10uF capacitor is too small to hold up the voltage for that many pulses in a row, so the voltage sags and causes reduced current for later pulses in the burst. At least the equation gives you a decent starting point.

Incidentally, at this 350 uA drain, the LED will run for 30 seconds from a 3300uF (nominal) capacitor charged to 3.5V.