Introduction: Practical Bike Dynamo Lights and USB Charger

About: Texan living in NL. I like to make simple electronics projects and share them with the community.

I originally posted this a little over two years ago, but it remained incognito to the site search. My dynamo got stolen a while back, and I thought about this Instructable when I was replacing it. Amazingly I still have the bike from back then :) The USB plug above has been exposed to Dutch weather this whole time. While the outside is rusty, the contacts are still clean and uncorroded.

So I am reposting it, hoping it gets picked up in the site search this time.

I have been using it since then and it still works perfectly. The stand-light still works for 4-5 minutes when still and I just checked the charger bit with a multimeter and it still outputs 5V at >400mA at about 10mph/15kph. Going faster will pump more current - I estimate 25kph will get you >500mA (I didn't want to do this while holding a multimeter trailing wires).

I´d been meaning to do this for a while. In Amsterdam a bike is usually faster than public transit, so I ride every day. I really wanted a USB charger powered from my bike for longer rides listening to music or using a navigation app without killing my battery, and to boost my phone a bit when it was dying. I also wanted my lights to stay lit at stop lights.

There are a few things you can buy in the shop to accomplish this. However, I am on bike #6 after about as many years. My first bike broke in half, and the rest were stolen. This is not that unusual here, so I was not eager to plunk down 50 EUR for something that might be gone in the morning.

I ended up putting about 10 euro plus spare parts into the project. Granted, if you don´t have some of this stuff already laying around this could end up costing around 20 euro. That´s still quite a bit cheaper than anything you will find in the shop and does not require a fancy-pants hub dynamo (but could work with one). Add 5 euro for the 6 LEDs, resistors and proto-board you might need for the lights and worst case you will spend ~25 euro making something useful that costs a fraction of a similar off-the-shelf gadget. If you are an electro-tinkerer, this may not cost you anything but spare parts (and you have probably already built something like this...).

I guess this is my take on this popular topic.

  • Powers headlight, tailight and USB charger
  • Lights stay on at stops
  • Lights can be turned off while still charging USB
  • Inconspicuous
  • No batteries
  • ~20 euro to build - less if you have any parts lying around

Requirements

I needed this to

  • be powered by a standard 6v bottle dynamo (4.95 at Albert Heijn, 2 euro any street market)
  • power the headlight (white) and tail light (red)
  • keep the lights on for 4-5 minutes when stopped
  • have a 5V >400 mA output for USB charging
  • ability to turn the lights off while still charging (daytime riding)
  • be somewhat inconspicuous (ideally fit into the headlight housing or under the seat, but I didn´t manage to do this :P so I mounted it behind the seat - not very noticeable what with all the crap on my bike)
  • look/be inconvenient to remove to discourage theft if it catches a thief´s eye (several zip ties, piece of black duct tape to make it blend in)

This is a simple 7805-based bike charger/light combination. Even the cheapest 6V bottle dynamo will put out >8VAC when you get going faster than jogging speed, so no need to use a low drop-out. Basically, it´s a rectifier in front of a standard 7805 voltage regulator circuit with 3 outputs. 2 common that have a switch and 5V 1F supercap with a N5817 diode in front, and one separate with no additional components. This lets me switch the lights off when I want to charge in the daytime, and makes sure that only the lights feed off the supercap at stops (the phone would drain it in couple seconds).

You can probably improve on it :) You can also adjust it to your needs - if you only want the charger bit or don´t care about stand-light or turning the lights off, you can eliminate some components and bring the cost down a bit. If your bike frame is a reliable ground then you can eliminate some of the ground wires, too.

Step 1: Tools and Parts

Tools you´ll need

  • Soldering Iron
  • Something to cut PCB (hacksaw, Dremel with cutting wheel, karate chop...)
  • Something to drill holes in the PCB for components and mounting - I use a Dremel tool.
  • Your preferred etching process for single-sided PCB or you can use a prototyping/stripboard pcb
  • wire cutters
  • something to strip wire

Parts

(with prices in EUR from conrad.nl for similar components - you probably have much of this laying around already)

  • 80V rectifier (lower the dropout the better) (0.82)
  • Axial 20V 4800 uF elcap (2.22, a 1.94 40V 2200 uF would work as well)
  • .1 uF ceramic cap (~.25)
  • 16V 100 uF tantalum cap (5.47 - al elco for .25 will work as well)
  • 2-terminal connector (0.19)
  • 6-terminal connector (0.19 X 3 = 0.57)
  • 7805 voltage regulator (0.64)
  • 5v 1F button supercap (elco) (2.88)
  • heatsink for TO-220 (1.07)
  • single-sided PCB stock (~2.00)
  • N5817 diode (~.15)
  • USB-extension cord (or any cord you don´t need with a female USB plug on it) (3.00)
  • a switch (~.50)
  • some wire (~2.00)
  • an enclosure of your choice (~4.50)

The PCB design I use as an example is about 64x40mm - consider this when choosing your enclosure.

For the lights I took the incandescent light out of my headlight and replaced it with 3 white LEDs. The back light was already LED, but battery powered, so I just wired it up with an extra resistor to keep it from eating power too fast at stops, giving preference to the headlight. If you have an led headlight or taillight, you can use them as-is, just wire up to the battery terminals.

Headlight

To replace the incandescent light in your standard headlight fixture.

  • 100 ohm resistor (for the white LEDs)
  • 3 white LEDs
  • a little prototyping board to hold them together

Tail Light

I used the existing tail light LEDs on my bike, but still added he resistor to limit current drain in the tail light circuit.

  • 1K ohm resistor (for the red LEDs)
  • 3 red LEDs
  • a little prototyping board to hold them together

Step 2: Design

I've added a circuit diagram (made on Digikey's SchemeIt), to clarify what's going on. It's pretty straightforward, but warrants a little explanation.

Diode Brige (DB1)

You can see that the AC power source at the left side is connected to a diode bridge. This effectively turns the AC from the dynamo to DC, that LEDs and batteries can use.

Smoothing Capacitors C1 and C2

Next there are a couple capacitors, 0.1 uF and 100 uF, to smooth out the voltage from the dynamo, which will be pretty noisy. This will help feed a relatively constant voltage into the 7805 voltage regulator.

Smoothing Capacitor C3
This 4800 uF capacitor is to make sure there is a steady stream of 5V to the charger (and lights), even if the dynamo slips a bit. Keeps your phone from switching in and out of charging mode while riding.

7805 Voltage Regulator

A dynamo is supposed to output 3W, ~6V at ~ .5A. I chose a 7805 because I had one laying around, it's rated for 1A, and the only low-drop out regulators I had were rated for 500mA. With a multimeter I found that I could get around 12 volts out of the dynamo pretty easily, so I ditched the low drop-outs for the 7805, which usually requires at least 7V in to get 5V out. I also thought I might be able to get more than 500mA out of the dynamo. I put it on a heatsink since it might get a bit hot depending on how fast I am going.

USB 5V

This output is tapped before the switch so the lights can be shut off without affecting charging.

Switch S1

This lets you turn out the lights while charging (for daytime charging).

Diode D1

Makes sure that only the lights feed off C4 at stops. A mobile phone would drain C4 in a couple seconds without this.

Power Capacitor C4

This is a 5V 1F supercap, and it keeps the lights lit at stops for 4-5 minutes.

The rest is pretty clear in the diagram, but I will try to answer any questions you might have.

Step 3: Build

Check Component Fit in PCB

Once you have your parts, print the PCB and make sure they fit - adjust ad necessary. I recommend editing the SVG (link below) with Inkscape or something to tweak the layout as required. Feel free to add labels or whatever to the mask. If you are designing your own PCB with stripboard, keep the enclosure size in mind.

Make and Drill PCB

Some of the components, like the terminal connectors, the supercap and the 7805 usually have slightly bigger leads than the other components (smaller caps, diode), so you may need a slightly larger hole for these in the PCB.

Check PCB Fit in Enclosure

Make sure the PCB fits in the enclosure you have and that any required mounting holes are drilled. Better to do this before the components go in :) Make sure you leave room for the switch to be mounted on the enclosure and drill a hole for this as well.

Drill the Enclosure

  • one hole for the switch
  • one hole for power-in from the dynamo
  • one hole for the USB cable
  • one hole for the light wires

Solder It Up

When soldering in the parts, mind the polarity on the caps/rectifier/diode and be sure the 7805 goes in the right way (IN/GND/OUT).

Add the Switch

Run wires from the 2-pin connector to your switch.

Add stub wires

I recommend knotting the lead wires and USB cord inside the enclosure so they don´t easily get pulled out. If your terminal connectors are too big to tightly grip the wire you are using, you can put some soldier on the wire to fatten/stiffen them up and make them stay in the connectors better. These will poke out of the enclosure so you can extend these as needed to fit your bike frame and lights.

Now you can close it up. It's ready to test.

Step 4: Test It

  1. Get a 9V battery and hook it up as input.
  2. Make sure your switch it closed.
  3. Use a volt meter to check that you have 5V at all three outputs.
  4. Open the switch
  5. Use a volt meter to check that you have 0V at the head/tail light outputs and 5V at the USB output.
  6. Disconnect the battery
  7. Close the switch
  8. Check that you have ~5V at the at the head/tail light outputs (from the 5V supercap) and 0V at the USB output.

If all this works, take it to your bike and hook up the dynamo to the input. Spin your front wheel with your hand - the LED should come on or get slightly brighter.

Step 5: ​Mount It on Your Bike

I like where I put it behind the seat, but your bike and preferences might be different. You should think about how you will wire it up when choosing a mounting location.I used strong zip ties to secure mine to my bike frame and added a piece of black duct tape to blend it in and cover the PCB mounting screw heads.

Wiring It Up

For the wiring you will need to connect/extend wires along your bike frame. Be sure the connections are good and secure - I just twisted the wires together and used heatshrink tubing to secure them. I recommend using heatshrink tubing along the length of the wire along the frame, as the insulation will wear out after a couple months otherwise.

Connect the Dynamo

Now take your wire and hook up your dynamo to one of the input wires. Ground the other input wire to the frame.

Connect the Lights

Take the +5V and GND wires from the head and tail light outputs and wire up your LED lights. You can use the resistors to connect the ground wires to the lights.

Step 6: Use It

  1. Get your phone and USB charging cord
  2. Plug it into the female USB on your charger box
  3. Get on your bike
  4. If it´s nighttime - turn your lights on :)
  5. Be careful

Ride around the block or something - your phone should start charging after you get going past walking speed.

When you stop, your lights should stay on for a few minutes. If not, check your wire connections.

I get about a 5% charge on my Galaxy S2 after about 20 minutes of riding with the lights on and music playing. I'm probably going around 20 kph most of the time. It´s not going to fill your phone on the way to work, but it will boost it a bit and keep it running while you ride.