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
- 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.