close-circle
Close

Circuit Design / LED Driver Board

A project log for Decade Flashlight

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

Ted Yapo 12/25/2016 at 17:562 Comments

Here's the circuit used to drive the LED. A PIC12LF1571 periodically wakes to pulse the gate of an N-channel MOSFET. The MOSFET allows current to build through a 1 mH inductor; once the MOSFET shuts off, the inductor discharges through the LED to create the light pulse. There are more details about this circuit in #TritiLED.

A 100-ohm resistor is added in series with the battery for fault protection - if the PIC becomes stuck for some reason, the MOSFET shorting the inductor across the supply might drain the battery, but the 100-ohm resistor will hold the current and dissipation to a safe level. Likewise, the two resistors in the gate drive circuit (22 ohm each) keep the PIC outputs from "fighting" if the software is somehow corrupted and the two outputs assume different states.

Optimal Current Drive

I measured the relative efficiency of the Chanzon 3W (45x45 mil chip) cyan LED with the #Automated LED/Laser Diode Analysis and Modeling system. Here's the efficiency for DC drive conditions:

If you were driving this LED with DC, you would see peak efficiency at around 20 mA. For the flashlight design, the average battery drain is about 40 uA. At this DC current, the efficiency of the LED is abysmal, so it is much better to drive with higher-current pulses at a low duty cycle. Since the circuit shown above uses roughly triangular-shaped pulses, I wrote some code to analyze the efficiency based on the peak current in a sawtooth waveform:

You can see that driving this LED with a sawtooth waveform of anywhere between 10 and 35 mA will achieve at least 98% of the LEDs peak efficiency. Depending on the particular inductor (the part I'm using has a 30% tolerance), the actual current will vary, but should always be in this range. More details about this analysis can be found in #TritiLED.

The software is tuned to produce an average current drain of about 40 uA at 3.6V. Lightly loaded, the lithium AA batteries will maintain about 3.6 V for most of their life. Based on a 3500 mAh capacity, a 40 uA drain will deplete the batteries in a little over 10 years. Since the battery voltage will drop somewhat at the end, resulting in a reduced current drain, you might get a little longer than this (at reduced brightness). These lithium AA's have a shelf-life of 20 years, so self-discharge over the decade of use will not be an issue.

The code blinks the LED six times every 16 ms, so over a 10-year span, the LED will blink about 118 billion times. Your heart will beat about three billion times total - unless you can come up with the coolest hack ever :-)

Bill of Materials

A more detailed BOM is in the GitHub repo, but here are the electrical/optical components listed out

I didn't add it all up, but if you build more than one of them, it's obviously much cheaper. The 0805 resistors, for example, are $0.10 for one, but $0.19 for 10. Since you probably need to buy 10 of the LEDs and lenses anyway, you might as well build a bunch and save. I guess this is where kits or group buys bring the price down :-)

PCB Design

Here are the PCB's front and back. All the components except the LED mount on the back of the board - they can be reflow soldered, then the LED can be hand-soldered on the front.

The boards can be ordered from OSH Park. Cost is $3.05 for 3 boards. The gerber previewing software I use doesn't round the corners on these renderings, but as you can see below, the board fab will. The battery connections are intended to be soldered to the +V and GND pads. Vias are provided in the pads for strain relief, preventing the pads from lifting off the boards with the wires. Pads are also provided for ICSP programming of the PIC. Here's the key to my terse labeling:

I didn't make a pogo-pin jig for this board. You can temporarily solder wires to the programming pads if necessary - more details in the assembly log.

The board is held in place by the LED package. The lens for the LED is designed to press-fit onto the LED itself. This holds the board in place the flashlight:


Discussions

bulrush15 wrote 07/06/2017 at 11:04 point

Is the assembled board available for sale? I'm interested in trying out 2 of these.

  Are you sure? yes | no

Ted Yapo wrote 07/06/2017 at 18:58 point

No, I am not selling the boards assembled at this time.

  Are you sure? yes | no