Neopixel Bike Lights

by geok24 in Circuits > LEDs

825 Views, 4 Favorites, 0 Comments

Neopixel Bike Lights

DSC_6469.JPG
DSC_6468.JPG
DSC_6475.JPG
DSC_6467.JPG
DSC_6473.JPG
89312460d89b88c8d66839e0520cedda.jpg
DSC_6476.JPG

In this instructable, we will be making a neopixel bike light to make your bike look cooler at night

you can either make connect it to your phone via WiFi or just with an Arduino nano and momentary button to switch through the modes

Sadly I cannot provide detailed images of the build process because I have already built it but I will do my best to explain how to make it using diagrams and some photos of the finished product

Supplies

  1. A WeMos D1 Mini or an Arduino nano
  2. A neopixel led strip
  3. A switch
  4. 2 18650 lipo shells or a power bank
  5. A battery charge and protect circuit capable of at least 1 A with a 5v output
  6. A momentary switch (optional)
  7. A case (it can either be 3D printed or made with something else)
  8. A XH 1.25 JST 3 connector (optional)

Deciding How You Are Going to Make It

You can either make it using the WeMos and through my app, control it from your phone with WiFi (if you decide to make this version there's is a bug in the code which cause the esp to close the access point making you have to restart the esp if you want to change the colour or the pattern )

OR

Using an Arduino and a momentary button to cycle through the animations

I personally have chosen the esp method although the Arduino works great too

Deciding What Case to Use

photo_2020-10-08_20-26-27.jpg
photo_2020-10-08_20-26-05.jpg
photo_2020-10-08_20-26-19.jpg
photo_2020-10-08_20-26-26.jpg
DSC_6480.JPG
DSC_6494.JPG

You can make this out of anything really (the first version was a caprice can for me)

what you need is either something that you can strap to your bike or something that can fit int the water bottle cage with a hole for the charging port and the switch(s)

I have now 3D printed a case for which I will be including a 3D file as well as the .step files if you want to customize them

if you 3d print the case on the bottom there is a slot for the connector, otherwise you can use dupont cables so you can easily take it off for charging if you use dupont cables then you must secure it with tape

Led Strip Termination

Chances are that the led strip won't be properly terminated so when you solder the cables you must fill the hole with hot glue and if you have also put on a heat shrink

Wire Up the Board

Untitled Sketch_bb.png
Untitled Sketch_bb.png
Untitled Sketch_bb.png
InkedInked89312460d89b88c8d66839e0520cedda_LI.jpg

first wire up the batteries in parallel to the charger as shown here then connect the - to the - on the battery charger and the + to the + careful not to mess up the input and the output on the battery charge module

You will have to connect the 5v from the charge and protect module to the power switch both the board and the neopixel strip like it is shown in the diagram .connect the ground to both the board and the led strip.

For the WeMos connect the data pin to D2

And for the Arduino connect the switch to D4 and ground and the led strip to D6

Uploading the Code

For the wemos we will be using code from bitluini where he initially used this code for home automation, I have modified it to work as an internet access point to which you connect to with your phone and change the colours from the app open all the files under one tab download all missing libraries and upload

for the Arduino, we will be using the buttoncycler sketch from the adafruit neopixel library

download all missing libraries and upload

IMPORTANT :

1)there currently is a bug in the code that makes it so the wemos closes its access point after 1-2 changes the colours or pattern making it so the strip effectively cannot change pattern unless you turn off and then back on the board

2)You will have to change the number of LEDs according to how many LEDs you neopixel strip has

For the wemos you will have to change const int LED_COUNT = 60; where 60 is the number of less on the strip

And for the Arduino, you will have to change #define PIXEL_COUNT 60 where 60 is the number of less on the strip

Mounting the Led Strip Onto the Bike

DSC_6484.JPG

In order to mount the led strip on the bike, you will have tο use zip ties like it is shown here

Turning Them on

For the Arduino, you just turn on the switch and press the button when you want to cycle through the modes

For the wemos you will have to :

download the apk for the app

open the switch

connect to the WiFi network named neobike

open the app and use it as you like

Downloads

Final Results

DSC_6476.JPG

sadly I can't show the bike from far away because the back wheel is being fixed but it looks pretty sweet

Thanks for reading my instructable

if I have made any mistakes, forgotten something or said something one to many times I am sorry but this is my first instructable