Intro: DIY a Bicycle Taillight With Arduino
I am a cycling enthusiast.
Years ago when I am a young handsome man, in my second year at College, I had completed the ride from Sichuan to Tibet, the famous G318 in China. It is known as the world's most beautiful and dangerous road. If there's a chance, you should got there to just take a look.
Time flies, now I am a baby's father already. Each time I think of that journey , my heart will still hysterical. But you would never have time and energy to make it again.
Cu'z the love of bicycle, I was thinking DIY many thing on the bike, suck as the taillight, a stopwatch, burglar alarm, GPS tracker and so on, it's too many to list it. But time is always limit, I don't ever get started. Today, I am going to make it happen. Make this taillight to start.
This taillight is based on Ardino, thus this is programmable and customizable, it's your own taillight, and it's unparalleled.
Step 1: The Video
I take a simple video with my Phone, it's not very professional, and I think it's enough to let you know what does it look like.
Step 2: Prepare the Stuff
There's something need to be prepared first.
Grove - Joint v2.0 shares many similarities with Seeeduino Lotus. It is a mini ATMEGA328 Microcontroller development board. It uses an Atmel ATMEGA328P-MU and CH340. ATMEGA328P-MU is a high performance, low power AVR 8-Bit Microcontroller. CH340 is a USB bus converter chip that can realize a USB to serial interface. Grove - Joint v2.0 has two Grove interfaces included I2C port and two digital I/Os. It else support battery powered. You can do some simple applications with it.
WS2812 is an intelligent control LED light source that the control circuit and RGB chip are integrated in a package of 5050 components. It includes intelligent digital port data latch and signal reshaping amplification drive circuit. Also include a precision internal oscillator and a 12V voltage programmable constant current control part, effectively ensuring the pixel point light color height consistent.
Acrylic and Laser Cutter
- 3mm Black Acrylic
- 3mm Lucency Acrylic
As for the Laser cutter, you can find one easily in a Hacker Space, if there's no hacker space near to you, you can try the Laser Cutting Service supplyby Seeed.
- M3 screws
- M3 nut
- AB glue
Step 3: Make the Acrylic Led Strip
First of all, download the 2D file to cut the Acrylic. You will get 3Parts, you can refer to the image, we call it top, middle and bottom part.
After you get the 3 parts of Acrylic, there're few steps to make an acrylic led strip.
1. Stick leds to the middle acrylic, we need 8 leds here.
2. Stick a Grove connect to the middle acrylic, about the location you can refer to the image.
The about 2 steps need AB glue, or some other glue you have.
3. Then you need to do some soldering, just 3 cable, don't afraid about it.
If you don't have a soldering iron and had never do some soldering, why not just start here. And there's a soldering iron recommendation, it's small and easy to use, please put hand on here.
4. Finally, make the 3 parts together, and screw they together. The final form you can refer to the image.
Step 4: Test the Electrical Module
Now we begin to test the hardware and the code.
It's based on Arduino, if it's your first to use an Arduino, congratulation, your life will get more fun if you just started.
The led strip connect D5,D6 of Joint.
And there's Li battery as well.
Download the code attached.
Here I suppose that you had used Arduino before.
Just chose the right boards - Arduino Pro/Mini (3.3V, 8M)Atmega 328, and the right port number. Click Upload(Ctrl+U), Then the code is ready, you will find the leds are moving.
Step 5: Final Installation
Now, the Acrylic Leds Strip and hardware is already, let's install the whole thing to the bike.
We need some ties here, just install it as shown in the image.
Then you can go for a ride in the evening, must be cool.
Step 6: Improve It
There's some point to improve it:
- Add an accelerometer, make it to a brake light
- Add a bluetooth module, set the shine mode via your phone
- Add a solar charge module, then you don't need to charge it frequency. (The battery can work for 5 hours now)
If you love bike and MAKE, just make your own taillight, Cheers.