Bike Generator




About: I enjoy building things more than actually using them.

The is my first attempt at a bike generator and I have made many improvements to the project. Check out my new instructable BikeGen for the new generator which recharges 2 AA batteries and powers the lights. BikeGen can also be used to recharge you cell phone or Ipod

I made this friction drive bike generator to power my head light and tail light. I got the idea and a lot of the info for this project from another great instructable personal powerPlant

I recently bought a bike to commute to work and around town and figured for safety's sake I'd get a light set. This is the light I got, Planet Bike 1200, but there are many options for bike lights. There are many instructables on bike lights too. My lights are both 3V, two AA's in the head light and 2 AAA's in the tail light, and the box said the head light will work for 4 hours and the tail light for 20 hours in blinking mode. While this is respectable it still requires some attention. I got this bike for its simplicity, single speed means I can just hop on and go, but replacing batteries gets expensive and complicates things to much. By adding the generator I can power the lights while riding.

Thanks to instrutables member a schematic of the circuit is also available.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Gather the Parts

Your going to need a few things if you want to build a bike generator. Here's what they are:


1x Stepper Motor - I got mine from a printer I got at goodwill for $3

8x Diodes - I used 1N914/4148 from Radio Shack #276-1122, the personal powerPlant used 1N4001, Radio Shack #276-1101

1x Adjustable Voltage Regulator - LM317T, Radio Shack #276-1778

1x Project Box w/PC Board - Radio Shack #270-283

2x Resistors -Radio Shack #271-003 You'll need the 150 Ohm and the 220 Ohm

1x Heatsink - Radio Shack #276-1363

1x Battery Connector - Radio Shack #23-445

18-20 gage solid wire

Electrical tape

You don't have to get everything from the Shack but I find its easier and roughly the same cost as say Jameco or Digi-Key once you pay shipping.


1x Bike Reflector bracket - I took this off my bike when I put the lights on.

1/2" Aluminum Angle Stock - Both Home Depot and Lowes have this usually in the hardware section or order it from McMaster-Carr #88805K41, You'll need a piece roughly 6in long

Small nuts and bolts - I used the screws from the printer and some other hardware I had, #10-32 machine screws and bolts would be good

Small rubber wheel - This attaches to the stepper motor and rubs against the wheel as it spins. I used a Tamiya 70145 narrow tire because it was what I had.


Dremel - This isn't completely necessary but makes things a whole lot easier

Drill and drill bits


Screw Drivers, wrenches, allan keys - for the hardware

Solderless Breadboard - Radio Shack #276-003 I used this to test the circuit before soldering everything to the PC Board


Step 2: Make the Circuit

Now lets make the circuit. Its a good idea to test everything before you start soldering it all together, so I built the whole circuit on the solderless bread board first. I started with the motor connector and the diodes. I desoldered the connector from the circuit board of the printer. Placing the diodes in this orientation changes, or rectifies, the the AC current coming form the motor to DC current that the lights can use. The stepper motor has two coils in it and you need to make sure each coil is wired to one set of the diode groups. To find out which wires from the motor are connected to the same coil you just need to check for continuity between the leads. Two of the wires are connected to the first coil and two of them are connected to the second coil.

Once the circuit was built on the solderless bread board I tested it. The motor produced up to 30 volts while riding the bike normally. It is a 24volt stepper so this seems reasonable. With the voltage regulator installed the output was a constant 3.10volts. This was the plan. The resistors control the output voltage and the 150 and 220 Ohm resistors were chosen to get 3.08volts. Check out this LM317 Voltage Calculator to see how it was wired up.

Now it just need soldered to the PC board. I used small gage solder to make all the connections. It heats up faster and allows for better connections that only bridge where you want them to.

The .pdf's show how everything is connected to the PC Board. The curved lines are the wires shown in some of the pictures and the short black straight lines are were you need to make the solder bridges.

Step 3: Motor Mount

The motor mount was made from the 1/2" aluminum angle and the reflector bracket. Holes were drilled in the aluminum to mount the motor first. Then one side of the angle was cut out to make room for the wheel. The wheel was attached by wrapping electrical tape around the motor's shaft until there was enough to allow the wheel to be forced over the tape. This method works for now but will probably need upgraded in the future.

Once the motor and wheel were attached to the aluminum I found a suitable place on the frame to mount everything. I mounted mine to the seat tube. My bike is a 61cm frame so the area where the generator is mounted is fairly large compared to smaller frame bikes. Just find the best location on your bike to mount the generator.

After I found a good location I marked the aluminum bracket, with the reflector bracket in place, so that it could be cut to size. Then drilled holes in the bracket and the aluminum and mounted the whole thing to the bike.

I then finished everything off by attaching the project box to the aluminum mount with two 1/2" standoffs.

Step 4: Hook Everything Up

Now all thats needed is to hook it up to the head light. I just pushed the wire ends behind the battery terminals on the head light, then drilled a hole in the light to run the wires through. The wires were then connected to the battery connector. I used this because I wanted to be able to disconnect the the head light quickly. The project box will need slots or holes for the wires for the light and the motor.

Once everything is on go out and ride!

Discover Green Science Fair for a Better Planet

Third Prize in the
Discover Green Science Fair for a Better Planet

Park Tool Bike Month

Runner Up in the
Park Tool Bike Month

The Instructables Book Contest

Participated in the
The Instructables Book Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Cardboard Speed Challenge

      Cardboard Speed Challenge
    • Multi-Discipline Contest

      Multi-Discipline Contest

    193 Discussions


    3 years ago

    Very interesting intractable, why did you choose a stepper instead of a straight DC brushless?

    1 reply

    9 months ago

    Could the rubber wheel spin against the silver part of the bike wheel?


    4 years ago on Introduction

    to anyone who understands the electrical components better than I do, is there any circuitry protects against rolling backwards and outputting the reverse polarity from the motor?

    2 replies
    Doug Costlowfortepc

    Reply 4 years ago on Introduction

    With stepper motors there is not polarity like a DC motor, the circuit is made to work in either rotation direction

    fortepcDoug Costlow

    Reply 4 years ago on Introduction

    Oh okay, awesome.

    And what if I only have DC motors? Is there any circuitry I can add to make that work? or do I have to keep trying to find printers to take apart to find a stepper motor I can use x) Thanks ahead of time for your patience with my ignorance x)


    10 years ago on Step 2

    any advantage of using a stepper motor over a normal DC motor? i think this is the first time i've seen a stepper motor used as a generator...

    5 replies
    Doug Costlowpjax

    Reply 10 years ago on Introduction

    I've only done a little research into this myself but for starters a stepper motor is brushless, so you don't have losses from friction like in a standard DC motor. This would be very small loss though. I've also read that steppers generate power at much lower rpm's then DC motors. This site,, claims 10 to 15 times slower rpm than a DC motor. I have not tried to run a DC motor with this generator so I have nothing to compare to though.

    Shadow334Doug Costlow

    Reply 4 years ago

    Nice project. Reading comments. Everything could be better but did they build one ? No. They bought one. I built one it was fun still works, but it charges two 1850 cells. Good job, man. If you added a constant current circut and a usb jack instead of the 12v ciggerette light power connector you could easly charge anything usb. and yeah a bit of weather proofing could not hurt. But put your name or nickname somewhere on you project on your bike, your good..


    Reply 9 years ago on Step 2

    Agreed, found the stepper with full bridges to be an interesting approach that may indeed be more efficient.  My suggestion would be to throw in a capacitor as well.


    Reply 9 years ago on Step 2

    LOL, no it is extremely inefficient because it is generating 30V and you lose 27 volts from use of a linear regulator.  That means only 10% electrical efficiency at best, you could randomly pick any other motor with lower output @ same RPM and have it more efficient.

    However, a brushless motor will give longer life due to no brushes to replace, although selecting a motor with high quality ball bearings is another factor to increase lifespan.

    Although use of a linear regulator is very simple for a beginner, it is the wrong circuit to regulate with a human-powered bike generator.  The better option would have been a buck switching regulator IC, followed by a LC (inductor, capacitor) filter.  Also to increase efficiency you can parallel two schottky diodes in the bridge rectifier.   Total circuit cost might be $5 more, but to get roughly eight times the efficiency and lower wheel drag it would be well worth it.


    Reply 9 years ago on Introduction

    wow ,!!  NO REGULATOR ever made would have a loss of 27 volts..
    max of about 1.5  volt loss.

    or you could even buy a low dropout regulator,,,

    a better way to go would be using two motors, and or two wheels. i myself am going to try to build one, thanks for the inspiration!


    7 years ago on Step 4

    i know were talking about efficiency here, but why not add a digital readout and a power storage device? the digital readout could go on the handlebars so you can see how much power you have and could run more things. you could also add brake lights hooked up to a smaller switch for night.

    very nice build!



    8 years ago on Step 2

    My setup is quite pathetic compared to this, I have a weed whacker motor duct taped to the side of my my bike running against the wheel. I can get about 2 volts spinning it with my hand at least, and thats about 20 times slower than me riding.

    Doug Costlow

    8 years ago on Introduction

    You can check out my newest version of this generator, which is able to charge USB devices, here USB Bike Generator 

    Keep on the look out for a new Instructable I plan on posting later this summer. Its going to be a more robust design that incorporates a standard hub dynamo and USB charging. I plan on putting it to the ultimate test this summer when I ride 1700miles on the Fuller Center Bike Adventure