loading
Picture of DIY Bike Generator

Using easily accessible parts, it is possible to build your own bicycle generator that will charge your cell phone! This instructable is an extension of this instructable made by our friends. Eventually, this bike will stand on its own in our student union, so our classmates can sustainably charge their phones off the grid!

The basic setup of the bike is as follows: the back wheel of the bike spins a DC motor via fan belt, the motor is connected to a charge controller, the charge controller charges a lead-acid battery, and the battery is then connected to an inverter. You can then plug your phone into the outlets of the inverter!

Basic Materials needed:

Bicycle Stand

Bicycle Frame with Back Wheel

12V Lead Acid Battery

DC-AC Inverter

DC-DC Battery Charger

24V DC Scooter Motor

Fan Belt

Fan Belt Pulley

Wires, Screws, Wood, and a Metal Rod

NOTE: We added more to our bike to make it run better, but these are the bare minimum materials to get it up and running.

 
Remove these adsRemove these ads by Signing Up

Step 1: Assembling the Bike

Picture of Assembling the Bike
IMG_1490.jpg
IMG_1491.jpg
IMG_1509.jpg

We attached our bike system to a 2' by 6' piece of plywood. We used a bike stand to suspend and stabilize the back wheel. You can bolt the back wheel stand to the board, but we thought it was unnecessary since other portions of the bike were attached to the board. Our bike was donated with the front wheel off, so we built a front wheel stand. Make sure you have enough room on the board to attach the motor behind the back wheel!

Building the front wheel stand: The forks had a 1 cm diameter hole, so we found a one inch dowel for it to rest on. In addition, we took a 1.5" x 3" wooden beam and cut it into two 9.5" and two 4.5" blocks. We drilled a 1cm hole 1/2" down from the top of each of the 9" blocks. We then put the metal rod through the blocks and assembled the stand (see photo above). We added some washers and nuts to make the connections more secure. The two 4.5" blocks should be cut to fit tightly between the 9" blocks, as shown above. After building the bike stand, the front wheel should sit snugly on the blocks. Next, we screwed the lower 4.5" block down to the plywood. Finally, we attached the upper 4.5" block for stability. Now the bike stand for the front wheel is complete and should sit snugly on the rod between the blocks.

Step 2: Adding the Fan Belt to the Motor

Picture of Adding the Fan Belt to the Motor
IMG_1511.jpg
IMG_1510.jpg

We removed the tire from the back wheel using this video (make sure all the air is out of your tire). Next, we attached the pulley to our motor by adding a collar to the pulley and making it D-shaped. The pin running out side of the motor is in a D-shape so this allows the pulley to fixate to the motor and rotate the internal portion of motor smoothly. The screw holding it on is a left handed screw that goes on in the opposite direction of a normal screw allowing the motor to turn without having the screw come out. We then attached the belt to the wheel and to the pulley. Make sure that the motor is directly aligned with the back wheel. We screwed down the motor to the plywood base by having one person hold the motor unit as far back as possible while the other screwed it down, this insured maximum tension in the fan belt. The more tension we can get on the belt, the better it will work.

Note: Be aware of the direction that your motor is spinning in order to a positive and not negative voltage output. If it's negative, just switch the leads at your charge controller.

Step 3: About the Fan Belt Choice

Picture of About the Fan Belt Choice

The motor is rated at 2800 rpm, but riding at 20 mph is only 250 rpm at the back wheel. Thus, we chose a pulley with diameter about ten times smaller than the wheel, so riding leisurely could give us higher rpm (about 10x increase). For practicality purposes we chose the thickest belt that could fit in the rim of our wheel. Our belt was rather long because it needed to be able to fit around the entire wheel and still have extra length to attach the pulley at the motor. Depending on what belt you are using, the motor could be mounted at various distances from the back wheel.

Function of Motor: This component is what is converting the movement of your legs on the bike into a DC voltage.

Step 4: Step 4: Motor to Charger

Picture of Step 4: Motor to Charger

Purpose of Charger

The charge controller regulates the rate at which current travels into the battery. Ultimately, the charge controller prevents overcharging and draining of the battery, which will ruin the health of the battery. If the battery is overcharged then water electrolysis will occur, converting the water molecules into hydrogen and oxygen gas inside the battery. This will increase the sulfuric acid concentration in the battery and expose the internal plates to oxygen, quickly degrading the internal materials. Draining the battery will lead to sulfation, the crystallization of sulfur on the plates inside the battery. This will diminish the concentration of sulfuric acid in the battery and it will no longer be able to charge to its original potential.

Charger Properties

This charger can regulate the amount of current going to the battery, read the voltage that you are producing when biking, and the total amount of energy you have generated in one bike session. It will not give you the percentage of the battery charged, therefore (this is in the additional section) we have required that the user ride on the bike a set amount of time before the inverter will allow them to charge their device and that the user cannot charge the device if they are not biking.

The battery that we are using is a 12 V battery therefore the charge controller we chose can take us from 12V to 24V. The battery has a maximum charging current of 5.4 A, therefore the charge controller should be put on a current output setting less than the max. Increasing the current that the charge controller is requiring will make pedaling harder. That’s a good reason why it’s good to keep the gear system on your bike, and not make it a one-speed!

Adding a Capacitor or Zener Diode

Also, it is important to not overcharge the power controller by biking over its limit of 24V. You can add a zener diode with a breakdown voltage of 24V, so that if voltage is above 24V the zener diode will allow excess voltage to flow away from the charger.

In this setup we added a capacitor in parallel with the charge controller to assist in regulating the voltage generated by the motor. If we were to suddenly have Lance Armstrong hop on the bike and generate a voltage more than 24V temporarily, we can avoid a sudden overload to the charge controller by forcing a regular discharge from the capacitor.

Step 5: Step 5: Charger to Battery

Picture of Step 5: Charger to Battery
IMG_1527.JPG

Choosing your Battery

As we said before, you want to make sure that your battery is being charged at an appropriate current and voltage, well within the limits listed on your battery. Be sure to find a battery that your charge controller can charge or vice versa. The reason that you want to have a battery is so that you can store the energy that you are creating—so that you don’t have to bike constantly to charge your device and that you can bike without charging a device and store your energy for later.

Taking Care of your Battery

Make sure your battery is not moving when you are biking—sloshing around the liquids in the battery will add a kinetic energy variable into storage of your energy. It’s not a good variable. Your battery will output different voltages at different levels of charge. The voltage across your battery will be different when it is charging, sitting, and discharging; they will be about 14V, 12.5V, and 11 V respectively. Remember that these values will change over time (most likely decrease) as your battery ages and is being used. Degradation will occur. Be sure that if the output of the battery is 14V then you drain the battery so that it doesn’t overcharge.

http://www.power-sonic.com/images/powersonic/sla_batteries/ps_psg_series/12volt/PS-12180_12_Sept_10.pdf

Step 6: Step 6: Battery to Inverter

Picture of Step 6: Battery to Inverter

Purpose of AC Inverter

The current that comes out of your wall socket is alternating current (AC) rather than direct current (DC). The inverter converts the DC output of the batter to AC so that you can appropriately charge your devices. Also it provides the infrastructure to charge your devices, as in a plug and USB ports.

Choosing the Right Inverter

When choosing your inverter you want to be sure to make sure it give an output current and voltage similar to that of your typical wall socket, accepts a range of voltages similar to your battery, and the wattage that it can output.

Depending on the devices that you decide to charge (here we were interested in charging laptops, cell phones, and other small student devices) you need to make sure your inverter can output the right amount of watts. As a reminder, watts are a measure of energy required over a unit of time, joules per second. Appliances typically list the wattage that they require but to give you an idea a cell typically requires 5 watts and a laptop computer requires about 45-60 watts. The inverter featured in this instructable has a capacity of 400 watts.

Step 7: Making the Bike User Friendly

Our aim is to put this bike in our student union. Therefore we wanted to make this bike as user friendly as possible. A big obstacle we found was that the charge controller required you to press a button for 3 seconds in order for it to start charging. Although this is relatively simple for us to do, we felt like other users might not read the directions and think that they were charging even though they hadn't pressed start. The screen lights up which is misleading because it is technically "on", but is not charging. Therefore, we hacked our charger and will control it with an arduino instead to make the energy generation process user-friendly.

Step 8: Hacking the Charge Controller

Picture of Hacking the Charge Controller
IMG_1516.jpg
IMG_1517.JPG
IMG_1518.JPG
IMG_1520.jpg
IMG_1521.jpg

Hacking the Charger: We took apart the charger by unscrewing the sides and popping off the top lid. We found that there was a ribbon wire connecting the 4 buttons to the circuit board. There were 5 wires on the ribbon wire, thus we thought that there might be one "reference" wire and the other four wires went to the buttons. Connecting the "reference" wire to any of the other four button wires was equivalent to pushing a button. We took a multimeter and tested our theory, and it was valid. To press a button, we should connect one of the wires with the "reference" wire. Next, we added wires to each of the five terminals where the ribbon wire used to connect to. The wires were led outside of the charge controller by drilling a hole through the side panel and pulling them through. These wires lead to our arduino shield, which will allow us to press the buttons and control the start button autonomously using a relay.

External Buttons: We used 4 buttons on our shield to recreate the buttons on the controller for testing purposes and in case we wanted to change settings on the charge controller.

Use of a Relay: We used a OMROM G5V-1 Relay to "press" the start button using our arduino. The image above shows how we connected each of the relay pins. The digital output pin from the arduino that is wired to the relay will signal the pressing of the button when it is set to HIGH. Two other pins on the relay connect to the start button wire and the "reference" wire, completing the connection. We had to connect one other relay pin to ground. For precaution, we put a diode across signal and ground of our relay because we don't want current flowing into our arduino when the digital output pin is switched to LOW (start button is off) . Now the arduino has the capability of pressing the start button autonomously.

Programming the Start: Although we know how to get the arduino to press start, we don't know when to tell it to do so yet. We would like it to press start for a few seconds after the user has been pedaling for about 10 seconds. How will we know a user is pedaling? We would like our arduino to read the DC voltage of our motor which will be present when a person is biking. However, our voltage is more than 5V, so our arduino cannot read it directly as it has a limit of 5V. We used this article to create an appropriate voltage divider to have the arduino read motor voltage.

A simple sketch of this voltage divider is in the picture above. I will include all the arduino code in another step. We used a 3.9K and 1K resister to scale down the voltage going into the arduino by a factor of 5. We've yet to pedal hard enough to get the motor to go above 17V, so we should be safe. Usually, we are outputting less than 15V from our motor. The voltage divider will go into an analog input in the arduino which will let the arduino calculate the motor voltage.

Psudo Code:

void loop(){
while(!started){

startCharger();

}

void startCharger(){

if (motorVoltage>12 && hasBeenOnForLong){

digitalWrite(relayOut, HIGH); //which really is equivalent to pressing Start
started=true;

}

else if (motorVoltage>12){

//say it has been on for longer

}

else{

//reset hasBeenOnForLong to the beginning

}

}

Step 9: Battery Voltage

Picture of Battery Voltage
IMG_1522.jpg

We soldered an additional voltage divider to the shield in order to measure the voltage of our battery. We found that this was the best way to calculate how much our battery was actually charged. The output voltage of the battery is between 14-11V; decreasing as it becomes discharged. We found these tables which relate the output voltage of the battery to the battery state of charge in percent values for a 12V Lead Acid battery. We can make estimates from this graph, but we will further calibrate it later. Eventually we could add an LCD screen to readout the percent battery charge on our arduino. This readout can be coded by a lot of "if" statements simply structured as follows:

if(batteryVoltage<12){
batteryPercent=.7;

}

Because the battery only outputs up to 15V the absolute worst case scenario, we chose 2.2K and 1K resistors for our voltage divider. This divider works the same as our motor voltage divider. The picture above shows the resistors for the voltage divider on our board.

Note: Batteries degrade over time and the the capacity to which a battery can charge will change, altering the percent charge graphs.

Step 10: Preserving the Battery

Picture of Preserving the Battery

Lead Acid Batteries last a lot longer if they are not completely drained. Furthermore, we want to make sure users are generating electricity and not just charging devices from the battery without pedaling. We decided that we wanted users to bike for at least 2 minutes continuously before they were allowed to charge their phone. This idea turned out to be a little difficult, because we need something that can control a lot of current. We ended up employing a HUF7345 MOSFET, which we be between our inverter and battery. When we signal the MOSFET with our digital output pin on the arduino, it will allow current to flow from the inverter to the negative terminal of the battery, thus completing the inverter/battery portion of the circuit. When it is signaled on, the MOSFET will act as though it is not there at all and the cell phones can charge normally. This is possible because the MOSFET we used allows a high current. However, we decided not to allow computer charging on our bike because that would draw more current than the MOSFET could handle. Furthermore, we were afraid the computer would deplete our battery. We are relying on some users biking just for fun without charging.

We will keep track of time since the charger pressed start and once two minutes have elapsed, we turn the MOSFET "on" by setting the digital out to HIGH. Here is part of the code:

String allowBatteryAccess(){
if(currentMillis-startMillis>(1000*120)){ //if 2 minutes of time has elapsed

digitalWrite(allowBattery, HIGH);

return "Your device has started to charge. Keep Peddling";

}

return " "

}

Step 11: Board Layout

Picture of Board Layout
IMG_1519.JPG

We soldered all our components to a small board. Here is a color coded layout of how we attached everything. A lot of what we were attaching was to components off the board, so the names of these components are written instead. Attached is the untested Arduino Code for our board.

Step 12: Current Progress

Our board currently has the same functions as the charge controller before it was hacked with the arduino. We have the board wired up for the most part, but we need still need to attach a couple more components:

  • attach the battery and motor positive leads to the voltage divider
  • ground the other end of the voltage divider
  • attach the inverter negative lead to the drain of the MOSFET
  • attach the ground lead of the battery to the source of the MOSFET
  • attach battery ground to the arduino ground
  • ground the relay

These connections may be more difficult to create because the wires on the external components of the mortor and charge controller are much larger than the wires on our arduino shield. Once we get everything added we can test our code. We may need to fiddle with the timing of the start button and how long we it will be "on". The charger performs battery checks when it turns on so we might need to hold it down for as many as 8 seconds. We will check this once we get our board finished.

Step 13: Future Ideas

Picture of Future Ideas
IMG_1489.JPG

Though our system works, there is a lot more to be done with user interfacing before it can be introduced unsupervised in the student union. We definitely should encase our electronics so that no one can touch them. We also would like to have a LCD display the can interact with the user showing how much they have charged the battery and their real time motor output voltage. We already have a clear plexiglass stand where people can put their homework reading. We plan to have instructions pasted to the back of this stand and mount the charge controller and arduino to the bottom of the stand.

1-40 of 64Next »
theegghead1 month ago

ohmygod! I have been searching everywhere for that type of inverter, what model is it?

McgyverD5 months ago

I built one out of a exercise bike and used a chain and a treadmill motor that is giving me 12 volts at 50amps, I'm able to charge the battery and watch tv at the same time. And just going at the rate of 2 miles per hour riding it. I invented it my self the design.

hi. can you upload the photos?
SKSW47 (author)  McgyverD5 months ago

Thats awesome!

MM Ecology4 months ago

Hi. We're a group of 5th grade students at a Montessori school in Virginia and we are making a bicycle generator and we were wondering if someone could give us some advice. We are having trouble knowing which parts to buy. We would appreciate the help. You can email our teacher if you would like to help us. His email is mccafferty.patrick@gmail.com. Thank you!

Fission Chips5 months ago

Hey, nice job. But just a question - did you copy this from Chris Hackett's and Popular Science's book Big Book of Maker Skills? They seem pretty similar.

Kressle1 year ago

Don't know if anyone else has suggested this, but what about running neodymium magnets along the rim of the wheel and spinning those through a coil of wire like a wind turbine? More expensive, but you may get more efficiency with a better design. Thoughts?

Magnets-on-bike-wheel would be great as an engineering exercise, but in this project, it is another kind of exercise that counts.

Billster361 year ago

I don't get the need for the inverter. Why not just hook up a standard cigarette lighter type outlet to the battery and charge the cell phone with the same sort of plug you would use in the car?

arizzotti1 year ago

You can vote for this Bike Generator to win a Nest here: http://homeplanet.maker.good.is/projects/bikegenerator?position=0&sort=972

Bill WW1 year ago

Very nice, love the way you link the material list to the actual suppliers.

I always thought it would be great to connect a bike generator such as yours to a TV (as the ONLY power source). You would have to work out if you wanted to watch.

300w = 0.4hp, about the max a human can sustain.

Nice.

fazlehaq1 year ago

exactly how long it took to charge that battery completely ?

loachridge1 year ago
Or maybe even make some refinements to the K-TOR to fit it into a bike frame.
loachridge1 year ago
Look up "12 volt dc hand generator".
This is essentially what was mounted to bikes I mentioned earlier.
Can you make this work dual purpose?
Put an LED in for lower consumption. Add a small Li battery for charge storage if your device isnt plugged in.
omikeo1 year ago

can you give us an indication of efficiency

like how long and fast one may have to pedal to make toast?

Giving an guesstimate, a toaster draws about 700 watts. You could probably create about 200-300 watts peddling pretty hard. It takes approximately 100 watts to toast a piece of bread so it would take at least 30 minutes to be able to toast your bread. You would need a shower after all that peddling, so any energy you saved by peddling is lost to the water and heat bill XD

Yeah fig' it'd be a lot of work, I don't think people realize how much work would have to be done to create the energy they use. If they had to contribute in this form of muscle power to electric, conservation, I suspect would be the norm.

minus my spelling errors! :P

I think i might attempt this.

But im going to try and not take apart my bike and just make it so that i can just easily place my bike into the contraption pedal make electricity and when im need to go somewhere just take my bike off and go.

You don't need to take apart your ebike. After you place the rear axle on the trainer, just disconnect the power line that goes to the motor and hook it up to the 12 V battery. Mount a voltmeter on the handle bars and monitor the output voltage from the motor while cycling on the trainer. Just pedal hard enough to keep the charging voltage below about 14.5 V to prevent overcharging the battery. I think this is the maximum charging voltage for car alternators. At this charging voltage, my output was about 60 W.

Althenuker1 year ago

It's great to see projects like this in support of bike generators. Well done! However, you really need to look closely at your project from the energy production and consumption standpoint. I built a bike generator using a 350 W BIONX motor from my electric assist bike last Dec during an 8 day ice storm power outage. The best I could do was to generator 60 W for about 10 minutes before I was whipped. I'm sure you younger fellas could do better than me. I used it to charge my 12 V deep cycle battery, charge my cell phone from a USB port connected to a standard 12 V cigarette charger and run my 12 V internet satellite modem. After a couple of days, I was really beat and my 12 V battery was depleted. I reluctantly had to give it up and charge my battery using my truck while driving to the grocery store. Nevertheless, it was an interesting project and actually kept me warm during the frigid weather. Good luck with your project, but to get increased power you need several cyclists pedaling while hooked up to the same generator.

xarlock6671 year ago

I'm going to be a bit rude, so I apologize in advance: But WHY would you go to so much trouble to charge a cell phone? You have almost 200 worrth of equipment there that you could have put to MUCH better use. It is not an entirely worthless concept, but make it a LOT more useful by using a rectifier and making it put out 120v AC. That way you can charge several phones at once, perhaps a laptop or run a TV, etc... Good try.

SKSW47 (author)  xarlock6671 year ago

The inverter has a standard plug for it as well. You could technically charge a laptop with the basic set up, but we are planning on putting it in our student union and figured people would mostly like to charge cell phones. Thus, we only used a MOSFET rated for lower current because that is what we had lying around. If you omitted Arduino part of the bike, you can charge many other things as well.

Because you can XD

In all fairness, "Because you can" is the best reason to do ANYTHING. Therefore, you win.

loachridge1 year ago

When I was younger; dont go to far into that; I remember bike head lights being run from a generator attached to the bike.

A simple lever would lower the pulley side down onto the tire. That would generate enough to power a pretty good head light. Or is it headlight?

You could use the same principle here. Put another wheel, or something round rubber, on the generator. And work the mounts to take any bike. That way you can actually ride your bike. Or just like the old ones, mount the generator to the frame.

There is a lot of efficiency lost by relying on the tire to turn a small motor mounted to your bike. It would work, but it would take a long time.

I will disagree with you for now. I like to be "proven" wrong. ;-)
You have the materials all right there.
Why not give it a shot. It worked well in the '80s.
And those things weren't made for efficiency.
Consider it a challenge for you.

I may take you up on that challenge. I do have all the parts required.... But the 300 watt motor I have is quite heavy so the bike might have to remain stationary until I find a smaller one......

Now to get my parents to let me take apart that old electric bike XD

Random thought..... It would be awesome to be able to run a Raspberry Pi and a small screen off of the bike. If you stop pedaling, your computer turns off!

And consider that the motors on those bikes were probably 5 watts or less.

That looks like someone would have to put a fair bit of effort to keep the wheel spinning.

Have you considered adding on a freewheel to the rear wheel? Add on another 10-20 pounds so that when you take a break from pedaling, the wheel won't lose nearly as much rotational speed from the momentum stored in the freewheel. Just an idea.


Solid project otherwise! Great work.

This is a great idea, but if you are only using it to charge USB devices why would you use an AC inverter? The USB standard is 5Vdc. You are loosing a considerable amount of energy in the conversion from 12Vdc to 115Vac and then back to 5Vdc. Why not start with a 6V battery and use a zener diode to drop down to and maintain a constant 5Vdc output to a standard USB outlet?

Squidyman1 year ago

A bit of advice....

Make an easier to understand chart on how everything connects with one another.

Nice project!

TorBoy91 year ago

Very interesting build, and you've done a lot of work.

You might consider adding a fender to the rear wheel so that scarves and other loose clothing will not get caught in between the belt and the rim. The rear stand will need to be permanently screwed down to the base, otherwise with natural cycling movement there will be a loosening of the belt, resulting in less efficiency.

A front handlebar bag that has a metal frame could be changed to support a flat surface, which will allow the use of a tablet or smartphone while riding.

Overall a very interesting build.

I think this is a good way of testing a concept as a bike generator has some potential as an overall power source for small devices. As mentioned it would be good to be able to ride the bike as a bike though as well(maybe build one for yourself), so the next stage would maybe to fit everything you have there actually to the bike, then you could go out for a cycle and come back with a charged up battery that you could then plug in a car type mobile phone charger to. Bit of an extreme measure to charge a phone but you get the idea :) or keeping you design as it is, try different motors/generators in place of your scooter one, for instance a car alternator needs to only spin at about 1000rpm to cut in, and they put out a fair wack of power when connected to a battery, then you could connect a mains invertor and run a laptop or something without barely touching the battery, although I dont know how much strain an alternator might put on the rider! I have thought about building a similar to test the car alternator theory! The advantage with the alternator is you dont need all the various charge controllers, you just have a light which goes out when your up to speed (which can be replaced with an LED/resistors) making it slightly more simple.

Couldn't you have replaced the rear cassette with another smaller pulley and reduce the overall size of the belt? The wheel technically wouldn't be needed, just the hub.

Great project over all though. Nice work.

SKSW47 (author)  xtracycletony1 year ago

The large diameter of the back wheel provides the 2800 RPM that the motor is rated at. It is the big to small ratio that lets us spin the motor fast enough to create a large voltage.

Spelling error throughout article, nice job though.

Peddling is for drugs, pedaling is for bikes!

Maybe get the Arduino to display stats to the rider like estimated calories burned and a high score for the best (fittest) charger!

SKSW47 (author)  Mesa_Arch_Man1 year ago

Thanks! We'll fix that. Good Idea for the Arduino.

1-40 of 64Next »