Close
0%
0%

Arduino Bicycle Light

Arduino Nano controller 10W LED bicycle light with addressable LED strip, EL wire, temp sensor for LED, voltage sensing for 3.7v LiPo.

Similar projects worth following
I wanted a high power LED for my chrome bicycle light housing to replace the weak incandescent lamps. I also had a 1M strip of addressable LEDs (WS2812B) that take 5V and already on the bike, some 12V EL wire I wanted to control (turn off/on).

Unique features:
a) LM35 sensor on LED heat sink with dimming when temp gets too high. (No one has done this as far as I know)
b) Monitor LiPo battery and display cell voltage/status bar graph style on the addressable LEDs when powering up. Also auto shutdown when LiPo is depleted.
c) Use the metal case as capacitive touch for user interface.
d) On board USB charger board. Also allows optional solar cells to recharge during the day.

Yes, 100W of LED goodness would have been great, but the heat and the power, not to mention size, is too much for the given housing. The 10W chips fit much better in the hole vacated by the old lamp is is plenty powerful enough. I could have also just went from battery to DC booster to LED and adjust accordingly, but I also wanted to run a strip of addressable 5050 RGB LEDs (WS2812Bs,) thus requiring some kind of processor. Hence the Arduino nano.

Another reason I decided on the 10W LED is that it only needs around 9-12v and thus a much smaller DC-DC booster than the more powerful 20W, 30W, and 100W LEDs that require over 30v. After trying several DC-DC boosters with the single sell 3.7v LiPo, the 4A max XL6009 was the only one that worked for me. The 2A N108 (MT3608 on back) did not boost for me.

Given I needed an Arduino to run the addressable LEDs, I can also use it for other purposes. Like PWM the 10W LED. Also why not monitor its heat sink temp (via a LM35) and auto adjust brightness if it gets too hot? Since I have a on board LiPo, why not also monitor its voltage. And since I have addressable LEDs, then use them to display the battery status which I've decided to do after initial startup.

I wrongly ordered a weather proof lighted switch to replace the original, but it was wired for 110v and not 12v. I just got in the replacement, and guess what, its also rated for 110v and not 12v as the eBay listing showed. For now, I'll just live without a lighted switch and press on.

Current status: I have some of the wiring done including the MOSFETs on a board along with their resistors. As you might guess, there is not a lot of room inside the case and stuffing all this stuff is going to be tricky. Will update with actual photos (and not just stock) here tonight. I also need to work out the programming (my profession BTW) on the main LED and temp monitoring as well as the voltage/LED display, and capacitive touch.

View all 14 components

  • Arduino Issue: Multi Sensor (different ranges) = Multi VReferences?

    scottacrane09/14/2016 at 20:58 0 comments

    Thank your follows. Perhaps one of you could help me with one of my technical issues.

    My Multi Sensor Question on Arduino Forum

    Here is the text of my problem/question I posted to the above forum:

    I'm working on a project requiring more than one analog sensor. A 0v to 1v LM35 temp sensor and since my project is portable and on battery power, the 1S LiPo voltage (approx 3.2v to 4.2v).

    So I did some reading on external and internal voltage references and how to use them to obtain more accurate readings (this article was very useful: http://blog.fiftythree.com/posts/measuring-battery-voltage).

    I was thinking about using one of the cheap 0.9V-5V to 5V 600mA DC-DC Step-Up Boost Converter boards (they look like: Picture link to power my Arduino from the battery to give me a solid 5 volts. I'm guessing I could also use this as an external voltage reference (into AREF pin). This would then workout nicely for my battery measurements.

    But what about the LM35? It wants a lower voltage reference if I want accuracy. Can you switch references (internal/external) and measure each value separately? Or do I need to bring down my LiPo voltage via voltage divider so both use same fixed VRef? (aka lowest common denominator).

  • Programming The User Interface

    scottacrane09/13/2016 at 20:16 0 comments

    Let's talk about programming the user interface and how I want my light to work when I only have essentially a power switch and a on/off touch sensor available. How do you control multiple items using just one "button"? Read on and I'll tell you.

    On startup, the first thing I thought was like a car when you first start it and all the lights go on. I'm thinking the same thing. Of course after setting up the pins for the I/O I want. Turn on 10W lamp, EL wire, and all three RGB LED colors for all addressable lights for 2 seconds and then alternate 3 primary colors on RGB LEDs, 1 second each.

    Then on to setup mode. But first, read battery voltage and somehow map to color bar perhaps weighed more to the front of the bike where I can see the addressable LEDs better. Maybe just the first 10 LEDs. The display would also be more useful skewed to show a 3v to 4v range because you don't want to deplete the LiPo any lower (and I also plan on monitoring and gracefully shutting down when the voltage gets too low).

    While the battery level is shown on the addressable LEDs, the EL wire would "blink" off and back on to indicate that we are setting it up. My thought was to go into a loop for 5 seconds. If no capacitive touch, blink once more and go on. If the metal housing is touched, the EL wire state would toggle on to off or vice versa and restart the 5 second timer. So leave it alone if you like its current state, otherwise touch the lamp to change it. The initial and final blink indicate the entering and exiting of the EL wire setup. Always think about having your device give you feedback when trying to control it.

    On to the main lamp. Again, quick flash to indicate enter and exit and with a 5 second timeout. For the lamp though I'm thinking as long as you are touching the lamp, the brightness would slowly ramp up and down including a brief pause while off. Remove your finger and the lamp would stay at that brightness. Wait 5 seconds and the setting sticks.

    Finally, the addressable LEDs. I've done a pair of the neopixel glasses that I programming with multiple modes with just one button using long and short "clicks". I thought about using similar techniques here to alternate and pick the display mode and or color. But I've found just having a random changer between modes/colors works best.

    After the setup I'm thinking that the only control you would want or need would be LED brightness in a similar way as the setup. Otherwise, you could just toggle the power if you wanted to turn the EL wire off, but leave the headlight on for example.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates