How to Charge a USB Device by Riding Your Bike

This article outlines the development of a continuous charging system which can create a mobile power source to extend the battery life of portable electronic devices carried by the rider.


  1. Image titled Usb_495
    Design a circuit that can take the ~6 volts from the motor, store it, and then convert it to the 5 volts that are needed for the USB device. The circuit designed in this example complements the function of the MintyBoost USB charger, originally developed by Limor Fried, of Adafruit Industries. The MintyBoost uses AA batteries to charge portable electronic devices. This independently constructed circuit replaces the AA batteries and supplies power to the MintyBoost. This circuit reduces the ~6 volts from the motor to 2.5 volts. This allows the motor to charge the BOOSTCAP (140 F), which in turn supplies power to the MintyBoost circuitry. The ultracapacitor stores energy to continuously charge the USB device even while the bike is not in motion.
  2. 2
    Select a motor. In this example, the Maxon motor was chosen due to its smaller diameter. It also provides 6 volts whereas previous motors often give upwards of 20 volts, and that could make over-heating a huge issue. The cost of the Maxon 90 was US$275; for those wishing to build this project, a cheaper motor will suffice.
  3. Image titled Usb_856
    Attach the motor close to the rear brake mounts directly on the bike frame using a piece of a meter stick between the motor and frame to act as a spacer, then tighten 2 hose-clamps around it.
  4. Image titled Usb_550
    Connect the motor and circuit. Speaker wire is a stranded wire, but it's durable because of its large diameter. Attach it to the frame with zip-ties.
  5. 5
    Build the circuit. This will be the most difficult challenge of the process. Here are the details for the circuit in this tutorial:

    • Electricity from the motor first travels through a voltage regulator which will allow up to a continuous five amp current; a larger current than other regulators would pass. From there the voltage is stepped down to 2.5 volts which is the maximum the BOOSTCAP can store and safely handle. Once the BOOSTCAP attains 1.2 volts, it has enough power to allow the MintyBoost to provide a 5 volt source for the device being charged.
    • On the input wires, a 5A diode was attached so that there's no "assisted-start effect," where the motor would start to spin by using the stored electricity.
    • The 2200uF capacitor was used to even out the power flow to the voltage regulator.
    • The voltage regulator used, an LM338, is adjustable depending on how you set it, as seen in the circuit diagram. The comparison of two resistors, 120ohm and 135 ohm, connected to the regulator determines the output voltage. It is used to reduce the voltage from ~6 volts to 2.5 volts.
    • The 2.5 volts are used to charge the ultracapacitor, a 140 farad, 2.5 volt BOOSTCAP made by Maxwell Technologies. The BOOSTCAP was chosen because its high capacitance will allow us to hold a charge even if the bike is stopped at a red light.
    • The next part of this circuit is the Adafruit MintyBoost. It is used to take the 2.5 volts from the ultracapacitor and step it up to a stable 5 volts, the USB standard. It uses a MAX756, 5 volt boost converter coupled with a 22uH inductor. Once we get 1.2 volts across the ultracapacitor, the MintyBoost will begin to output the 5 volts.
      Image titled Usb_181
      Image titled Usb_920
  6. Image titled Usb_493
    Build an enclosure. In order to protect the circuit from external elements, an enclosure is necessary. A "pill" of PVC tubing and end caps is used in this example, with a diameter of 6 centimeter (2.4 in) and a length of 18 centimeter (7.1 in). While these dimensions are large when compared to the circuit, this made construction more convenient. A production model would be much smaller. The PVC was selected based on durability, nearly perfect weather-proofing, aerodynamic shape, and low cost. Experiments were also performed on containers crafted from raw carbon fiber soaked in epoxy. This structure proved to be both strong and light weight. However, the construction process was extremely time consuming and difficult to master.


  • One technique that can be considered for the motor is to encase it in a Nalgene container. These containers are known for being waterproof and nearly indestructible. Additional protection can be provided by expansion foam to seal the unit, however the material has limitations. Not only is it difficult to position properly, but it would also prevent ventilation essential to the overall operation of the device.
  • As to the streamlining of the circuit, possibilities include a multitasking voltage regulator chip and a custom printed circuit board (PCB). The chip could replace multiple voltage regulators, this would decrease both the product's size and heat output. Using a PCB will provide a more stable base because the connections will be directly on the board and not floating beneath it. To a limited extent it will act as a heat sink because of the copper tracing in the board. This change would decrease the need for excessive ventilation and increase component life.

Sources and Citations

Article Info

Categories: Bicycles