Introduction: Rainbow Bike Lights

About: I love making things. I have for as long as I can remember liked to make stuff. Now days I have two kids (Thomas and Emma) and most of the things I do are safe for them! I love electronics and Microchips, I ha…

Take one old bike and see what happens when you put lights in the wheels!

This was a little experiment I tried with the help of my 12 year old niece Lydia and my much (much) older Sister Trish.

Step 1: The Circuit

Basically I wanted to treat myself to a new bike and so had no use for my old one (other than recycle it) so firstly I got my kids to paint it fully black and I took off all unnecessary items which might have shown on the picture this included brakes and gears, basically all that was left was a frame with wheels and pedals! (And handle bars!)

I then added 16 fully colour LED’s in each wheel in a strip, these are units you can get off eBay and use the WS2812 LED. The LED’s come in strips of 8 and you can join as many as you like, I chose to combine two units to make a strip of 16. If you have never seen these LED’s they are very convenient to use as they only have 3 wires, ground and power which is 5Volts and then Data, and the really nice thing is you only need one data wire in a chain the data out from the first LED connects to the data in if the second and the data out of the second connects to the data in of the 3rd and so on. Because of this (only 3 wires) I choose to try out a Digispark micro USB ATTINY85.

Digispark from Banggood

These are convenient little things as all you need to do is plug the PCB directly into your computer to program, then for power I decided to use a 9Volt battery. You program these units using the Arduino programing environment but you do need to add the Digispark unit to the library. I followed these instructions.

How to Connect

Step 2: Camera Setup.

Next I needed some help and thankfully my sister and niece wanted to come and play! So I choose a nice quiet and dark road which also had a junction and a bend so I could set up the camera on a tripod in the junction then take a long exposure as the bike went along the road. It took a bit of experimenting to get some nice (weird) photos but that was all part of the fun!

One of the best pictures was made when Lydia rode around the junction 5 or 6 times, because the lights are only on one side you get the lights showing arches in background and colours on the tarmac in front of the camera. Exposure times of about 50 seconds allowed for the orange glow to show in the background which adds a nice effect!

Step 3: The Program

#include

#define PIN 4

Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800);

void setup() { strip.begin(); strip.show(); // Initialize all pixels to 'off' }

void loop() { rainbow(20); }

void rainbow(uint8_t wait) { uint16_t i, j;

for(j=0; j<256; j++) { for(i=0; i

uint32_t Wheel(byte WheelPos) { if(WheelPos < 85) { return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); } else if(WheelPos < 170) { WheelPos -= 85; return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3); } else { WheelPos -= 170; return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3); } }

Bicycle Contest 2016

Participated in the
Bicycle Contest 2016

Rainbow Contest 2016

Participated in the
Rainbow Contest 2016