Introduction: Rechargeable Helmet Light (electronics)
I was tired of having clip-on bike lights stolen and decided to build a set of head and tail lights into my helmet. The final helmet has bright white LED headlights, flashing LED taillights and runs off a rechargeable Li-Po battery. For an extra challenge I decided to do the switching and flashing entirely with analog components and use SMD electronics where possible for a smaller form factor.
I'll describe the process by which I designed and built the electronics. The plastic enclosure I built wasn't anything special and I would redesign it if I repeated the project. Schematics, layout and SPICE simulation are in the attached ZIP file.
Parts are detailed in the schematic in the next step.
Tools & Supplies:
- Laser cutter (at the TechShop)
- Soldering iron
- Helping hands
- Toaster oven
- Spackle knife
- Painters tape
- Fine (<#70) drill bits, chuck and drill
- Dremel (or other tool capable of cutting PCB)
- Wire snips
- Needle nosed pliers
- Black spray paint
- PCB etchant
- Solder paste
- Electronics solder
- Li-Po charger
Step 1: Circuit Design
The circuit was designed to accomplish a few things:
- Support on/off toggle via a single button
- Flash the taillights
- Allow battery charging in-circuit without damaging other components
Toggle is handled by a 3 transistor latch controlling an NFET. It is based on this EDN article. Note I used the NFET since I had it lying around, you could just as easily used another BJT. Flashing is handled by a simple 2 transistor astable multivibrator. You can find other examples here and here. Neither circuit is sensitive to in-circuit charging.
I simulated the circuit using LTspice to adjust the values for the various components. I would recommend adjusting the multivibrator values a bit to slow the flashing rate. The switch might also be more responsive with a smaller capacitor in the latch section.
The final design is in the LTspice ASC file. A slightly outdated version of the design (using different transistors) is included in the DCH file.
Step 2: PCB Layout, Mask and Etching
I did the PCB layout manually using DipTrace (see DIP file). Note that instead of using two layers I used 24 gauge wire in a few places to join on the back plane. I followed this Instructable for masking and etching the PCB using a laser cutter at the TechShop. I used ferric chloride as my etchant -- be careful with etching chemicals!
I also used the laser cutter to make a solder paste mask for my SMD components. I used the paste image (attached) to etch a sheet of thin clear mylar from TAP plastics. The result was imperfect due to some melting but acceptable. Unfortunately I wasn't able to get a good photo of the clear mylar stencil.
NOTE: Sending out for professional PCBs and stencils isn't particularly expensive and would save a lot of time / increase quality.
Step 3: Placement and Assembly
I attached the SMD components using reflow in my home toaster oven. The Sparkfun tutorials on stenciling and reflow were invaluable here. I taped my stencil to the PCB and used a spackle knife to spread solder paste evenly over the surface. I then removed the stencil an placed the SMD components using tweezers. Finally, I reflowed the board in my toaster oven. It's worth testing the joints for continuity before continuing.
Next I attached the larger components (taillights, switch, jumper wires) to the board. A decent soldering iron goes a long way to making this process easier.
Finally, I attached the off board components (headlights and battery) and fired it up!
I won't cover the case in detail since the design was relatively poor. It consisted of glued together acrylic that was ugly and impossible to service. Hopefully this can serve as a jumping off point for something much better!