This is about a battery operated rear light in heart shaped form.
For safety reasons, a good rear light is essential for a kid's bike. So it needs to be really reliable.
Kids normally forget to turn on the rear light when they start cycling. So it needs to be fully automatic: It turns on when your kid starts cycling and stops when the bycicle is put to rest.
The battery must never be flat: When it runs low, there is a tiny sound. To make it easy, it can be charge with a standard mobile phone charger.
The first part of this instructable is about how it works, while the second part guides you in making the final product.
Step 1: The Heart Case
The cover is a very important part of the project since it needs to properly protect the electronics from the harsh environment:
- it must withstand the elements: sun, rain, and UV light.
- it needs to be red, and tranclucent.
- it has to be sturdy, since it will get some hits.
Step 2: The Back
The back is screwed to the bycicle and also carries the PCB. It has a notch which features an o-ring for making the whole thing water proof.
Step 3: Electronics
There are altogether 36 powerful red LEDs. They are connected as three rings, so we can implement a pulsating motion from inner to outer. Three transistores independently switch on the LED rings.
The battery is a LiPo, charged by an MCP73831. The design of this circuit is from Adafruit.
A photo resistor measures environmental light to adjust light levels of the LEDs
Step 4: Movement Detection
How does the processor know the bike moved? A tiny ball of solder is soldered to a very small wire. It slightly touches a large golden pad. When there are vibrations e. g. when someone rides the bike, the ball moves, thus interrupting the processor and waking it up from deep sleep.
This design is incredible reliable and sensitive. It has been working now for one year every day.
Step 5: Firmware
Normally, the processor is in deep sleep mode, drawing some nano-amps. When there is movement, interrupt INT0 fires and wakes it up.
When the battery voltage is below some threshold, the piezo makes some sound to alert the user, so she can charge it.
LEDs start to light up from the inner circle to the outer. When it is fully lighted, this process is reversed. So we get a nice pulsating motion.
If the environmental light is too bright, like in summer sunlight, this would hardly be visible. In this case, the LEDs are flashing on-off at full power.
Step 6: Build It!
Enough talk, let's get things rolling. We need this:
- o-ring: inner diameter 66mm
- 3 tapping screws, ISO 7049, diameter d=2.9 mm, length l = 6.5mm: SBL29065
- 2 screws with nuts, M5 x 16mm
Step 7: Print the Case
Step 8: Solder the PCB
Now, it is time to solder the parts to the PCB. Of course, you will need everything from the bill of materials.
For a tutorial on how to do solder SMDs, see here:
- Put some solder on one pad.
- Grab the part with a pair of tweezers.
- Melt the solder on the pad again and move the part into the molten solder.
- While soldering, adjust the part so it is nicely aligned with the copper pads.
- Turn the board and solder the second pad Solder all other pads, if the part has more then two pads.
For the solder ball that is at the end of the movement-detection, see the previous chapter about "Movement Detection". You need a very tiny wire. I had good results with pulling one strand out of a highly flexible wire.
Put a solder ball on one end of the wire. You may need several tries. This ball is going to rest on the golden pad labled 'DETECT-IN' on the PCB. Solder the other end of the wire to the pad labeled 'DETECT-GND'.
For protection, I put some plastic over the movement detection. I have no idea if this is needed, but it lets me sleep good at night.
Solder the battery to "GND-BAT" and "VDD-BAT".
Step 9: Attach the Piezo
Glue the piezo to the back cover.
Since it has only one wire, solder another another one to the brass plate. Solder both wires to the two "PIEZO-OUT" of the PCB.
Step 10: Program the Microcontroller
Step 11: Assemble Everything
First, put in the screws since they will be hidden by the PCB.
Then, put on the PCB making sure the cables from the battery and to the piezo stay clear of the battery, since there is no space underneath that. Fix the PCB with three screws.
Put the o-ring in the groove of the back cover. Close it by putting on the top cover, first inserting the top part of the heart. It may get easier by putting some lubricant on the o-ring.
Fasten the heart at the carrier of your kid's bike. Charge it.
Step 12: Finished!
Your done! Congratulations. Your kid will be the envy of the neighbourhood. And she will always have the rear light on.
Participated in the
Make it Glow Contest 2018