I started by measuring how many amps the full strip of LED's drew at full brightness. It measured 1.3 amps so the battery should give me about 9 hours of run time between charges which is obviously more than enough for a long night ride.
The spool had just enough LED's to light up each of the tubes of the frame on both sides of the bike. The LED strips have a cut line every three LED's. I cut the LED strips into sections that would fit each of the tubes on the frame of my bike.
|
|
Then I soldered power and ground leads onto each of the strips and covered the connections with heat shrink.
I attached the LED strips to my bike using zip ties and black electrical tape.
Next I wired up the TIP120 transistors on some scrap proto board. I soldered on a row of right angle headers so I could plug the Arduino right onto the board. Please keep in mind I was just throwing this together at the last minute so it isn't very pretty. The only real goal was to make it fit on top of the battery and stay out of my way while pedaling the bike. I used a scrap barrel connector pigtail for the main power to the board and another to power the Arduino. I added a 12 volt regulator to the Arduino power circuit because the battery was putting out a little over 13 volts and I didn't want to damage the voltage regulator on the Arduino. The transistors connect to four different LED segments and are controlled by four PWM digital pins on the Arduino. I used a different color wire for each transistor and LED segment so I could keep track of them when I wrote the software for animating the segments.
The transistor circuit is very simple. The TIP120 isn't the best way to do this but I had them laying around. A N-channel Power MOSFET is better for this because it can handle high amperage without generating heat.
Example of TIP120 used with an Arduino. Image taken from here |
Now I turned my attention to making a proper mount for the battery. I wanted to make sure the battery was mounted solidly so it didn't fall off the bike when I hit a bump. I started with an old L bracket I had laying around the garage and drilled some holes in it so it matched up with the water bottle mounts on the seat post tube of the bike. I bent the L bracket down a bit so the battery would sit level on the bike. Next I took a piece of scrap sheet metal and created a short metal box for the battery to sit in. I made another tab out of sheet metal so the battery box could also bolt to the other water bottle mount on the down tube. I spot welded everything together and ground down the welds on the battery box so it didn't scratch or cut my legs while pedaling.
After the welding and grinding was all done I mounted the battery box on the bike.
I did a test fit of the battery and it was a little loose in the box but I had planned on putting something on the top edge of the sheet metal to cover any sharp edges.
I scrounged around the garage a bit more and found some extra automotive vacuum tubing. I made a slit down the entire length of the vacuum tubing and then pushed it on the top edge of the battery box.
Next I made two velcro straps out of 1" webbing. I cut the webbing to length and sewed on some velcro with the sewing machine. These straps will hold the battery in box.
Here is the battery with the straps in place and then the control board installed on top of the battery.
Here is how the overall bike looks with everything installed.
The last thing I needed was some way to charge the battery. I searched around on Amazon and found this SLA battery charger. I paid about $18 US dollars for it. It has an automatic shutoff once the charging is complete. It only comes with screw terminals so I had to make my own cable. I used yet another barrel connector and some 18 gauge wire to make a cable. (seriously how many barrel connectors can one person have? I may have used up my stockpile on this project.) I triple checked the polarity of the connecters on my charger and my battery with the voltmeter and then charged up the battery.
I finished writing the code for the Arduino the night before the event. Here is a video showing the animations. Since I only had four TIP120 transistors I could only control four sections of the LED's. The fork and the seat tube just stay on full brightness.
After the welding and grinding was all done I mounted the battery box on the bike.
I did a test fit of the battery and it was a little loose in the box but I had planned on putting something on the top edge of the sheet metal to cover any sharp edges.
I scrounged around the garage a bit more and found some extra automotive vacuum tubing. I made a slit down the entire length of the vacuum tubing and then pushed it on the top edge of the battery box.
Now the battery fit very snug in the box.
Next I made two velcro straps out of 1" webbing. I cut the webbing to length and sewed on some velcro with the sewing machine. These straps will hold the battery in box.
Here is the battery with the straps in place and then the control board installed on top of the battery.
Here is how the overall bike looks with everything installed.
The last thing I needed was some way to charge the battery. I searched around on Amazon and found this SLA battery charger. I paid about $18 US dollars for it. It has an automatic shutoff once the charging is complete. It only comes with screw terminals so I had to make my own cable. I used yet another barrel connector and some 18 gauge wire to make a cable. (seriously how many barrel connectors can one person have? I may have used up my stockpile on this project.) I triple checked the polarity of the connecters on my charger and my battery with the voltmeter and then charged up the battery.
I finished writing the code for the Arduino the night before the event. Here is a video showing the animations. Since I only had four TIP120 transistors I could only control four sections of the LED's. The fork and the seat tube just stay on full brightness.
Here are my kiddos at the starting line a few hours before the event.
The night ride event was really fun and my kids enjoyed the ride. I'll go ahead say I had the coolest bike at the night ride. This bike has inspired me to get some exercise and I have been riding about 4 miles every night since the event. Maybe for next year's event I will step up to some Adafruit NeoPixels.