Jay Taylor's notes
back to listing indexV2.2 Release | Post | Hackaday.io
[web search]V2.2 Release
A project log for TritiLED
Multi-year always-on LED replacements for gaseous tritium light sources
UPDATE 20170716: fixed library and PCB to produce correct solder stencil
UPDATE 20170713: added more info about the battery holder and inductor substitutions, with links to the original parts, and info about the case screws.
UPDATE 20170712: added assembly instructions
UPDATE 20170712: added the 3D printed case design
I should have done this months ago - V2.2 fixed the reversed MOSFET of V2.1, and is basically a complete design, so here it is.
I was going to re-do this in KiCAD, but I got frustrated with it again (third or fourth time), and just paid the $100 for a years worth of Eagle. The hardware and software design is in the GitHub repo.
You can order TritiLED V2.2 boards and V2.x programmer boards from OSH Park. If you have an SOIC-8 programming socket, an SOIC-8 test clip, or don't mind temporarily soldering wires to the ICSP pads on the boards for programming, you don't need the programmer boards - they just let you connect the ICSP lines with pogo pins.
The V2.2 circuit adds a 100-ohm resistor in the battery supply before the reverse-protection MOSFET as discussed in a previous log:
I need to add a BOM in the GitHub repo, but here are the components listed out
- (1) PIC12LF1571 8-SOIC DigiKey part # PIC12LF1571-I/SN-ND $0.57 each
- (1) Wurth 744062102 1mH inductor. DigiKey part # 732-3676-1-ND $1.57 each
- (1) 10uF 25V 1206 X7R MLCC capacitor. DigiKey part # 1276-1804-1-ND $0.26 each
- (1) 0.1uF 25V 0805 X7R MLCC capacitor. DigiKey part #311-1141-1-ND $0.10 each
- (1) 100 ohm 1206 resistor. DigiKey part # 311-100FRCT-ND $0.10 each
- (1) ZXMN3B01FTA N-channel SOT23 MOSFET. DigiKey part # ZXMN3B01FCT-ND $0.60 each
- (1) DMG2305UX P-channel SOT23 MOSFET. DigiKey part # DMG2305UX-13DICT-ND $0.44 each
- (1) CR2032 Battery retainer. Digikey part # BK-912-G-TR $0.63 each
- (1) Switch E-Switch #TL3305BF260QG. Digikey part # EG5354CT-ND $0.21 each
- (1) CHANZON 3W LED (cyan is best). Find them on Amazon : $9.52/10, AliExpress : $7.90/10, or Ebay (various sellers/prices)
- (1) PCB. Order from OSH Park. $6.15 for 3.
The inductor and battery retainer are substitutions from the original parts I used. The battery retainer is a slight upgrade, being gold instead of nickel. The original nickel part is also available:
(1) Linx BAT-HLD-001-TR CR2032 battery holder. DigKey part # BAT-HLD-001-TRCT-ND $0.73 each.
I have not received any of the gold battery holders yet; from the datasheets they appear to be exactly the same except for finish material.
The inductor is simply more expensive, but with the same size and specs: the old one is not stocked at DigiKey anymore. They are in-stock at Mouser:
(1) Bourns SRR6028-102Y 1mH inductor Mouser part #652-SRR6028-102Y $0.68 each
Again, I haven't tried the Wurth inductor on boards yet, but they appear to be identical parts from the datasheets.
This adds up to $8.35 in materials for single-unit quantities (battery not included: add $0.29 for that). If you build 100 of them, you can get it down to around $6.27 (batteries included :) The older inductor was only $0.68, but DigiKey has 0 in stock with a 22-week lead time - that would save almost $1. The MOSFETs could probably be substituted with cheaper parts, too.
You could save some money by removing the P-channel MOSFET. Reversing the battery might harm the PIC then, but wouldn't cause anything to overheat because of the 100R resistor. You could substitute a shunt diode as a reverse-battery protector, too. After the resistor, it would conduct with a reversed battery to spare the rest of the circuit. You just need a diode with low reverse leakage - even the 1N4148 has a 50uA maximum leakage! The B-E junction of BJTs is supposed to make a better diode for this kind of thing. Still, maybe you shave 10% off the parts costs, not that impressive.
Assembly Instructions
Here's where all the parts go on the board. There are only a few you can screw up: the two MOSFETs, and the 1206 R and C, so watch out for those.
Programming
You can check out this other log for ways to program the PIC. You need a programmer (PICkit3's are available cheap on ebay), and some way to attach to the IC or board.
Experimental Case
I put together an experimental case design in OpenSCAD. A case is important to protect users and the environment from the battery. Without a case, the battery might become loose and be a hazard to children or pets, or the contacts could short on nearby conductors. You must not leave these devices anywhere as markers if the battery is not secured in an inaccessible manner. The case uses screws to keep the battery where it belongs.
Here is what it looks like in OpenSCAD. You can see the details better in the rendering, because I usually print them in black, which doesn't photograph well:
Moving Forward
The V2.2 design works well, and I think 5 years on a CR2032 is probably "good enough." What I'd like to see is smaller and/or cheaper designs. I can imagine forking the design to move in both directions: a cost-is-no-object tiny version, and a cost-reduced, but maybe bulkier one.
Moving back to a chip-on-board LED would help with the size, although the Luxeons I like (Z and C) are $2.74 each in single quantities.
Using a smaller inductor would reduce size and cost and increase efficiency. The problem is that the PIC, in its lower-power 500 kHz oscillator mode, isn't fast enough to produce the short current pulses required of low-value inductors.
New Architecture
What I'd like to try next is using the PIC running at 31kHz, which is the lowest-power clock it can do, still waking from sleep periodically using the WDT. This should dramatically reduce the PIC overhead current drain. To shape the short pulses for the MOSFET drive, I'll try using the 74AUP1G14/differentiator trick from the previous log. That part of the circuit had negligible current drain even with a 3V supply. Moving to an external pulse shaper will allow shorter current pulses than the PIC can do at low clock speeds. Shorter current pulses will, in turn, allow lower valued inductors which are cheaper, more efficient, and physically smaller. In this way, you still retain the flexibility of a programmable part but may be able to reduce the current overhead.
I think I feel a V3.0 coming.
Discussions
Importantly, singles are under a buck at digikey.
EDIT: I realize the 100 ms minimum time is an issue with the flicker fusion rate. I'm wondering if at 35na one could run either two or a signal delay with another FET to the inductor.
Yup. What I'm hoping is that it's designed for enough speed to get short-width pulses out of it. The power usage can be mitigated quite a bit by disabling the comparator for almost all the time.
The PIC12LF1571 datasheet spec's 4.2uA typical @ 3V for the comparator in its low-power mode, and 21 in normal (faster) mode. If you enable it for (say) 100us every 16ms, that's only an additional ~26 or ~131 nA current draw for the peripheral (depending on mode).
> Reducing frequency will reduce its power consumption
While awake. But most of the time is spent asleep, with the osc stopped, waiting for the WDT to wake the PIC. When awake, we only run for a few (dozens?) clock cycles anyway. The issue I raised is that it takes 100x as long to awaken using the LF osc compared to the MF osc, which might offset the ~20x power reduction.