Saturday, April 24, 2010

Power your bike lights with Faraday's law!

Is this a UFO? Why do the lights blink so consistently as a function of distance? Why not just get a battery?

A project of mine for a while has been to set up a lighting system for my bike that did not require batteries. You have seen the old-fashioned Schwinns with the generator on the back wheel going to the headlight. This is the same idea, except the entire back wheel becomes the generator. As the magnets pass by the coils, the changing field generates a (small) current, in quantities defined by Faraday's law

The materials needed for this setup:

4 cheap guitar pickups
8 neodymium bar magnets (I got mine here)
8 x Nylon 1/4" bolts w/ nuts
8 nuts and 8 bolts (bolts must have high iron content.)
2 Aluminum bars 1/8" x 1/2" X 5" long to attach the guitar pickups
20' of cheap speaker cable
16 rectifier diodes
1 box of LED color christmas lights
1 x 6000uF - 15000uF 20V Capacitor (axe-man)
1x 50uF 50V capacitor
1 x magnetic reed switch
6 x 800 - 1500 ohm resistors
1 x 100 ohm resistor
soldering iron / solder
wire strippers
a breadboard for testing configurations
a volt meter
lots of spare time
I have mounted neodymium magnets on the spokes, and mounted 4 cheap guitar pickups on the rear horizontal fork. The rusty bolts seen to the left were selected for their high iron content, which helps to conduct the field to the coils (a little wd-40 would have helped stop the rust). The other side has 2 aluminum support bars, with 2 copper pipe holders to attach it to the bike frame. Aluminum was not the best choice, since the field-effect will slow down the wheels. If you find a strong plastic, use that instead.
Believe it or not, the hardest part of this whole operation was getting the magnets to stay on the spokes while riding. I used nylon bolts, since I could saw them in half and put the nut on the other side of the spoke to clamp on to the spoke. The head of the bolt is mighty-puttied to the magnet. The ones that did not fall off within a week have lasted 2 years , and I have 4 of 8 left. The wheels get jerked around when you ride, so what ever method you use to attach these has to be good. If you use glue or putty, be sure to score the magnet and bolt surface before gluing.

The other consideration is the distance from the magnet to the coil as it passes by. The closer the better, but you will find that the wheel flexes when you turn, which will change that distance and maybe even cause the parts to collide. I keep mine about 5-8mm away.
Once the coils and magnets are mounted in place, the next step is to start on the circuitry.

Step 1: build a rectifier circuit that will take the AC pulses from the coils, and smooth them out with a low-pass filter to a safe DC voltage for that mega-capacitor you bought. Here is a crude circuit diagram (anyone have a good free circuit-drawing tool that runs on xp?)

The squiggles are the coils (there are 4, but I only drew 2...), representing an AC voltage source.

The arrows with the lines are the rectifier diodes. Each wire from a coil gets 2 diodes opposing in polarity. match all the diodes of 1 polarity together to form 2 main leads coming from the coils (a + and a -)
Step 2: the low-pass filter
The 1st capacitor on the left is the 50V/50uF - make sure this has a rating of 50V or more, since the coils can produce spikes that will short out smaller caps. The 100ohm resistor drains the voltage to the main cap between spikes.
Step 3: charge the main capacitor:
The Main cap should have a rating of 20V or more, with 6000uF of capacitance (for those confused while shopping, MFD is the same as uF ) Get the capacitors attached to the breadboard , and get the polarity figured before you solder anything.
Step 4: the magnetic reed switch:
Attach the magnetic reed switch on the rear fork somewhere in the vicinity of a passing magnet. This will be the strobe driver for the lights. As you can see on the left, electrical tape works just fine to secure this light-weight component. When in the presence of the magnetic field, the switch is pulled to the closed position.
Step 5: testing out the lights:
This next photo shows the breadboard in use. You can mix-and-match to a certain degree with LED's, but using only the LEDs from the xmas lights will allow you to assume that all of the lights have the same voltage drop and current draw. The 6 800-Ohm resistors are for equally dividing the current between all the LEDs, and keeping the lights from draining the capacitor right away. To organize this, I soldered a collection of 5 resistors to the positive lead of the main capacitor, and attached the wires going to the diodes from there. The advantage here is that a pair of diodes can share a negative lead, requiring only 3 wires for 2 led's. I put 2 LEDs in the back, 2 in the middle, and 1 in the front.

Step 6:
Solder the connections and manage the wires. - Be sure that the wires do not interfere with the break or shifting cables. Electrical tape works well. Get the wires in place and taped before soldering. wires that ware twisted together will not stay that way (and the oxidize too), so soldering is mandatory.

  • The LEDs are polar, so be sure to keep track of this when soldering.
  • mark the polarity on the wires to save time. (often I will use copper for positive, and steel for negative)
  • If people start conversations with you about how this is "green", inform them that far more energy went into the manufacturing these components than will ever be generated by them. My computer has even surpassed the amout generated while writing this blog. If your friends want to be green, have them all write a letter to our delegates urging them to cover Minnesota in windmills and solar panels, and to pay for it by taxing carbon.
  • don't try to look at the lights while riding, as this can be distracting and cause accidents.
  • have someone take a long exposure photo of you going by at different speeds.