Multi-coloured Bicycle Frame Lights
by hanlin_y in Outside > Bikes
3130 Views, 35 Favorites, 0 Comments
Multi-coloured Bicycle Frame Lights
The more visible your bike is, the safer it is especially at night time. That's why I created this frame light. It also flickers rapidly to catch people's attention.
Materials
- 2 - 1nF capacitors
- 2 - 47uF capacitors
- 1 - 20V 2A Schottky diode
- 1 - 100uH 2A inductor
- 1 - 0.1 ohm resistor
- 2 - 150 ohm resistors
- 1 - 220 ohm resistor
- 1 - 4.7k resistor
- 2 - 10M resistor
- 2 - N-channel low-voltage power MOSFETs (eg. AO3400)
- 1 - ATTiny85 IC
- 1 - 8 pin DIP chip socket
- 1 - 2A fuse
- RGB LED strips
- 2 - 18650 or 3 - AA batteries
- 2-cell 18650 or 3-cell AA holder (18650's can be harvested from spent laptop batteries)
- 1 - metal box (eg. chocolate box)
- 26 AWG wire
- 5 - M3 screws
- 3 - M3 standoffs
- 5 - M3 nuts
- 5 - M3 locking washers
- 2 - rectangular neodymium magnets
Adhesives
- Silicone caulk
- Glue gun
Circuit Diagram
In this circuit, the ATTiny microcontroller uses one output to flicker the LEDs and the other to drive the step-up converter. The converter was needed to power the 12V LED strips with a Li-ion battery. Switch 1 was used to adjust the brightness of the brightness of the LEDs.
Soldered Circuit
On the perf board, it is possible to solder SMD components to it. The AO3400s' can be soldered to the traces using a tweezer to hold them in place while soldering. If the inductor has no leads, you can make the leads by soldering copper wires to it.
Microcontroller Code
This program does the following:
- Sets LED strips's brightness with the push button
- Stores the brightness setting
- Steps up 3.7V to 12V
- Flicker the LED strips at 17Hz
Instructions for uploading the code to the ATTiny85 can be found here.
Downloads
Converting a Two-cell Series Holder to a Parallel Holder
This step is needed if you want increased battery life. I modified a 2-cell 18650 holder to a parallel cell hold because the chip can be powered with up to 5.5V. This can be useful for reusing cells in laptop batteries.
To do this:
- Drill a hole on the holder where the + and - contacts connect together
- Disconnect the contacts that connects the two cells together
- Drill holder for the wires
- Solder the two positive terminals together
- Solder the two negative terminals together
- Hot glue loose wires to the holder to stabilize it
Cut Wires for the Frame Lights
Measure how much wire is needed for the bike light and cut longer than needed.
Cut LED Strips
Use wire cutters to cut LED strips for the bicycle frame and project case. You will need:
- 1 for the head tube
- 1 for the tail (case)
- 2 for the top tube
- 2 for the seat stays
See this picture for the parts of a bike frame.
Expose the Soldering Contacts
Use an X-acto blade to remove the coating above the contacts. Be careful not to cut the contacts.
Drill Mounting Holes on the Box
Before drilling, mark the holes with a permanent marker. Drill holes for the:
- External switch's wires
- External 2.1mm socket's wires
- Circuit board screw
- Tail light's wires
- Tail light strip's cable ties
Tie Tail Light to the Case
Use cable ties for this. It will be the rear light.
Solder Attachments to Circuit Board
Solder the following components to the circuit board:
- Tail light LED strip (select only the red LEDs)
- Switch
- Battery holder
- 2.1mm socket
You want to be able to turn on the red tail light when nothing is attached to the socket.
Insulate the External Connections With Glue Gun
Screw Circuit to Box
Solder Frame Lights Together
RGB strips were used because you can select different colours. For people to easily recognize the direction of the bike, I selected:
- Red for the tail light
- Red and green for the seat stays
- Green and blue for the top tube
- Red, green, and blue for the head tube
Soldered the LED strips to a 2.1mm plug.
Insulate and Strain Relief Wires With Hot Glue
Attach LED Strips to Bike
When attaching the LED strips, you want them to face toward the drivers and away from your eyes. Tie them tightly with cable ties and cut the ends flush.
Glue Quick Release Magnets
Use silicone caulk to glue magnets to the box and a flat metal attached to a bike rack. Let the caulk set.
Hot Glue Velcro to Box
The velcro would be used to hold the case to your bike when there are vibrations. The magnets are strong only when they lie flat.
Use glue to strain relief the external switch and 2.1mm socket. If the wires bend too much, they will break.