Multi-coloured Bicycle Frame Lights

by hanlin_y in Outside > Bikes

3130 Views, 35 Favorites, 0 Comments

Multi-coloured Bicycle Frame Lights

IMG_20141121_124158.jpg
Custom Bicycle LED Strip Light

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

Screenshot 2015-02-19 16.04.01.png
Screenshot 2015-02-19 15.57.07.png

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

IMG_20141114_181003a.jpg
IMG_20141114_180710a.jpg
IMG_20141114_175228a.jpg

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

Screenshot 2015-03-28 23.53.46.png

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

Copy of IMG_20141115_162011.jpg
IMG_20141115_170524.jpg
IMG_20141115_170547.jpg
IMG_20141115_172210.jpg

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

IMG_20141117_161503.jpg

Measure how much wire is needed for the bike light and cut longer than needed.

Cut LED Strips

IMG_20141117_155659.jpg

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

IMG_20141117_162509.jpg

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

IMG_20141116_171006.jpg
IMG_20141116_172331.jpg
IMG_20141116_172320.jpg
IMG_20141116_180139.jpg
IMG_20141117_132058.jpg

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

IMG_20141117_133706.jpg

Use cable ties for this. It will be the rear light.

Solder Attachments to Circuit Board

Copy of IMG_20141117_153147.jpg
IMG_20141117_140047.jpg

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

IMG_20141117_153227.jpg

Screw Circuit to Box

IMG_20141117_153105.jpg
IMG_20141117_153244.jpg
IMG_20141117_153354.jpg

Solder Frame Lights Together

IMG_20141118_151914.jpg
IMG_20141118_152951.jpg

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

IMG_20141118_154645.jpg

Attach LED Strips to Bike

IMG_20141118_161008.jpg
IMG_20141121_124220.jpg
IMG_20141121_124158.jpg

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

IMG_20141121_123119.jpg
IMG_20141121_123128.jpg

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

IMG_20141128_173411.jpg
IMG_20141128_174040.jpg

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.

Mount Box to Bike Rack

IMG_20141128_174550.jpg