3d Printed Rear Bike Light
This bike light was created to fit on my wife's tri bicycle. Her seat post is not round but flat so most lights does not fit on it. I did not wanted to just buy a rear light and creating a mount for her bicycle, I wanted to create one from scratch. This is also my first Instructables. :)
The light use Attiny 85 to control the flashing modes. There are 4 different mode: Fast, Medium, Slow and solid. Very simple and maybe in the future there will me other modes. I use PLA black for the body parts and a transparent PLA for the light cover. The 3d printed parts are water resistant but should not be exposed to water for a prolong period of time. If it needs to be more water resistant, the parts should be printed with PETG at superfine resolution.
The design was was done with TinkerCad. The link to the TinkerCad is below.
Supplies
Tools
- Soldering iron
- 3d printer or someone that can 3d print the parts.
- Exacto knife
- Wire cutters
- Wire stripper
- screwdriver
Material
- Attiny85 - Aliexpress
- Light strip - Aliexpress
- Round pan head tapping M2*6 mm screw (x1) - Aliexpress
- Round pan head tapping M2*8mm screw (x1) - Aliexpress
- Round pan head tapping M2*4mm screw (x2) - Aliexpress
- Round pan head tapping M2*12mm screw (x1) - Aliexpress
- Hexagon Hex bolt head screw kit m2 (if you don't have any) it will only require 2 screws. M2 4mm and 6mm - Aliexpress
- Surgu (for waterproofing button)
- Mini usb port - Aliexpress
- Battery - Adafruit
- Mosfet IRLB8721P - Adafruit
- Resistor 2 watt 9.1 ohm - https://www.digikey.ca/
- Any 10k resistor 1/4 watt
- Capacitor 10uf 25V - Aliexpress
- 30 awg wire - for button and charger
- 24 Awg wire - for light
- PCB with dimensions of 34mm length and 17.2 mm width.
- Silicone attachment for the mount. - Aliexpress
- 2 pin JST connector - Aliexpress
- Crazy glue
- Lithium charger (TP4056 mini) - Aliexpress
Print 3d Parts
The 3D printer that I use was a Creality CR6 SE with stock parts.
Most of the parts are printed at 10% infill at 0.2mm with support touching the build plate. The button holder ( part beside button in the picture above) will probably need light sanding to fit into it's holder.
The only part that needed the support everywhere is the mount that attach to the post. For that part I printed it at 70% infill so it can resist the stress of supporting the light and the elastic attachment to the post.
The light cover need about 30% infill with transparent filament and support touching built plate at 65 degree,.
All parts to print are provided below.
Make the PCB
The PCB needs to be exactly 34mm in length and 17.2 mm in width to fit snugly into the case. Make certain that the height of all components does not exceed 11mm. I added as much picture to show how to wire the PCB and how it fit into the case.
The white and purple wire in the picture above are the button wires. Do not solder the button to the wires yet, it will be explained in step 5. The 2 Watt resistor and the LED strip are drawn coming out the other way. Assemble the electronics components as shown in picture 3. That is the best way everything will fit into the case. Make certain that the orientation of the JST connector (Battery) is the correct way for the positive and negative.
On the PCB, add 2 more wire on the positive and negative rail to connect the charger to the LED lid in the last step (see picture 3). It can be a wire of any length but for the size I used 30 awg. It is more flexible and can store into the body easily, see last picture.
Add Code to Attiny85
After the PCB is done we need to program out Attiny85 with the program to make it work.
If you have an Arduino handy there is a good Instructables that show you how to do it: How to Program an Attiny85 From an Arduino Uno.
Like me if you use SparkFun USBTinyIsp, there are very good instructions on how to do it on their site: SparkFun UsbTinyIsp.
Attached as a file is the .ino for the sketch.
Downloads
Modify TP4056 (charger)
I need to modify the TP4056 charger so it can be smaller and fit inside the lid of the light. The charger is a standard aliexpress charger and you need to get the TP4056 mini or micro.
For the battery it is very important that you only use a LiIon/LiPoly constant-voltage/constant-current charger to recharge them and at a rate of 400mA or less. For that reason we need to change the resistor on the TP4056 to charge at 400mah or less.
To do this we need to unsolder the resistor and replace it with a 3.3k ohm resistor. This will give a charging rate slightly under 400mah per hours. A good website for the TP4056 board.
First cut the charging board at the red line shown in picture 2. Not like I did and attached the resistor before cutting. This caused me problem cutting the board as I had to be careful not to break the resistor.
Then removed the old resistor with a soldering iron or if you have it a Heat gun. Bend and cut the resistor to fit onto the solder pad. Remove the old solder from the pads and apply new one with flux. Usually I also add solder to the end of the resistor to help solder it to the pads. Carefully solder the resistor to the board.
After the resistor is added, solder 2 wire for the input 5v as seen in picture 3. The red is the positive and the black is the negative.
The final board dimensions without the resistor is 16.5mm width and 13.8mm height.
Assembling the Body
After the PCB is completed, you will need to solder the button to the white and purple wires. I used 30awg wires for the button and shorten them to about 1 inch. Also try the button box into the button case (picture 2) to see if it fit snugly. If it does not , just sand it a little bit until it fit. Before soldering the button you will need to put the button into the button box and then pass the wires through the button holder, then solder the button (see picture 3 above).
Prepare the LED light with solder on the negative and positive pads. Then solder a 1inch 1/2 or enough wire to reach the PCB onto the positive side of the LED light. Pass the wire through the hole and fix the LED light to the back of the body (Picture 4).
When the light is fixed, solder the 9.1 Ohm 2watt resistor to the PCB and pass it through the hole to reach the light on the other side. Solder the positive wire of the LED to the PCB. Verify that the PCB will fit into the case when the resistor is attached to the LED light. Then plug the battery and do a test to see if everything is working properly.
Fit the button through the button case in the 3d printed body (picture 2), screw the button holder (last picture) with the M2 * 4mm screws. Push the PCB with the battery into the case (Picture 6).
Assembling the Lid
You will need to solder wires from the TP4056 to the USB part as seen in picture 4. Then add the Mini USB to the USB cover (Picture 2) and glue it to the inside cover. The wires for the USB should be pointing inside and not toward the outside of the cover (Picture 3).
Now solder wires to the charging side of the TP4056 and then glue it to the inside of the cover (picture 4). I attached a small connector to the output of the charger so I can disconnect the lid from the body (picture 5).
That's it , the Lid of the bike light is completed.
Putting It Together
Now we can put the light together and add the waterproof button cover.
To waterproof the button, add some Vaseline on the button top and be careful to not add any to the sides of the case. Then use a small amount of Surgu to shape a button as seen in picture 3.
Now you can use M2 *6 mm and the M2 *8 mm screw to close the lid. On the lid, the 6mm screw is used on the side of the button and the 8mm on the other side.
Now for the holder, screw the holder clamp (Picture 5) to the holder so it will not fall out. Use the silicone attachment to attach the holder to the seat post.
Last step is to glue the Transparent Light Cover to the rest of the light body using super glue.
I have create an Holder for a round seat post (about 20mm diameter) in TinkerCad also if you want to print it out.
There you have it your own 3d printed rear bike light. I am very happy with how this came out, and have no real complaints with it. If I were to make it again the only things that I would change is some of the 3D prints to make the assembly a little easier, but that's it. I hope you enjoyed this build. Thank you so much for taking the time to read.