V3.1: Configurable Brightness

A project log for TritiLED

Multi-year always-on LED replacements for gaseous tritium light sources

Ted YapoTed Yapo 01/18/2018 at 03:104 Comments

I think this is the last version I'm going to make.  I added a tiny (3x2mm) switch to the V3 board to allow you to select the brightness/run-time at startup.  You can see the switch in the upper right, just above the incorrect "V3.0" silkscreen text (I fixed this since these boards were made).  It basically fits in a 1206 footprint! The Cree XPE2 is on the left, with the OSLON Signal Verde LED on the right. I didn't make a V3.1 PCB for the Luxeon C LED.  The Eagle files and gerbers are in GitHub.

The switch was added to go with the new C-code.  The code allows you to tune the brightness when you first insert the battery.  Pressing the switch cycles between 1-10 year burn rates.  You get a preview of the brightness for 4 seconds, then the LED blinks out the run-time in years (e.g. four blinks = four years).  Once you let it cycle uninterrupted three times, the brightness gets locked in until the battery is removed.

The code also has some additional enhancements (some are enforced in the makefile).  Most importantly, the code fits into the lower half of flash memory, which is write-protected in the configuration bits.  This prevents accidental over-write of the code by an errant program.  The code has to write to program flash memory to store the brightness mode, since there is no EEPROM on this part.  To make things safer, the brightness mode is stored in the upper half of flash (read/write), with the code itself safely in the lower half.  Microchip probably could have provided a finer granularity on their write-protection (all/none/half), but the part is what it is.


The V3.1 is identical to the V3.0 except for the switch.  This particular switch is available in three different activation forces (100g, 160g, 240g).  I have samples of the 160g and 240g, and am not sure which I like best.  They both seem to work OK:

(160g) KXT 321 LHS switch, DigiKey part #CKN10778CT-ND, $0.25 each


(240g) KXT 331 LHS switch, DigiKey part #CKN10779CT-ND, $0.25 each

Next Up

I'm still tweaking the automatic brightness tuning script.  I'll be posting that soon.

I'm also going to run a head-to-head experiment to answer the question: "why don't you just use an LED and resistor".


Simon Merrett wrote 01/19/2018 at 11:18 point

Can you share any thoughts on your head to head experiment design? Power from capacitors for measurable discharge in a relatively short time period? 

  Are you sure? yes | no

Ted Yapo wrote 01/19/2018 at 13:14 point

To originally design these things, I ended up building #Automated LED/Laser Diode Analysis and Modeling in order to measure LED output vs voltage and current.  It turns out, you can use the same setup to characterize whole circuits instead of simply LEDs.  With it, you can measure the current drawn over a sweep of supply voltages, say from 3.3V down to 1.5V, representing the entire range of a CR2032 cell.  Combined with a model for the CR2032 cell, this lets you calculate the current profile as the cell discharges.

Unfortunately, the light detector in that project isn't fast enough to capture the brief pulses accurately so that the light output can also be recorded.  Instead, I'll use a DSLR camera set to a long exposure to integrate the light over a large number of pulses.  The DSLR has a raw mode, which can provide linear 12-bit outputs from the ADC.  So, I can literally sit a TritiLED next to a DC LED and compare the relative brightnesses using some image processing to average pixel counts over the LED surface (I'll use a macro lens arrangement to get a lot of pixels on the LED die).  The DSLR is controllable over USB, so I can script the entire data collection process.

Once it's all done, I'll have measurements of current and brightness vs supply voltage for both the TritiLED and just the raw LED driven at DC.  From these and a CR2032 model, I can generate plots of brightness vs time for a number of scenarios.  So far, I've thought of comparing these:

1. Setting initial brightness equal.  What do the respective brightness curves look like after that?

2. Setting the lifetime (to a given brightness cutoff) equal.  How does the initial and subsequent brightness compare?

There may be other analyses to run, but once I've collected the data, it will be easy to generate them.

  Are you sure? yes | no

Simon Merrett wrote 01/22/2018 at 20:28 point

@Ted Yapo , I continue to be amazed at your design and test ingenuity!

  Are you sure? yes | no

Ted Yapo wrote 01/22/2018 at 21:20 point

@Simon Merrett Ingenuity? More like masochism :-)

I got some of those common mode choke inductors you have been using, BTW.  Some quick tests with the spectrum analyzer didn't produce anything conclusive, except that they probably have a low Q.  I'll test them in a switching supply next.

  Are you sure? yes | no