Electric Bicycle

In order to save money on my commute and explore the areas outside the city in my free time, I wanted to build an electric vehicle that could carry me a reasonable distance and require minimal effort to operate. Hence, using a combination of kit and custom design, I constructed an electric bicycle. At the time of this writing the bicycle has over 200 miles on it and consistently succeeds at being an enjoyable and efficient mode of transportation. 

The electric drive powering the bicycle is a 1000W brushless DC motor embedded in the hub of the rear wheel. The wheel kit included a speed controller, now located inside the electronics enclosure (grey box mounted behind the seat). The enclosure also houses most of the wiring and power system, and signals exit through a 3D-printed entry cover. The instrument cluster on the handlebars allows toggling of relays inside the electronics enclosure that activate peripherals including a horn, headlights, and turn signals. The system is powered on with a key switch located on the handlebars and is powered by twelve 12Ah lithium polymer (LiPo) cells in series (separated into two packs), chosen for their high energy density, high rate of discharge, and low price. I’ve found that the 12Ah pack yields approximately 20 miles of range without any pedaling.

To reliably monitor the cell voltages as well as other system parameters, I designed a “bicycle computer” which connects to the I2C interface of the BMS and monitors the battery pack voltages. The computer is mounted on a 3D-printed bracket in a waterproof enclosure, and signals enter through a waterproof terminal block connector. Measured values are displayed on an LCD screen, and the system will alert me in the event of low voltage, a short circuit, or high-current discharge. The system also displays instantaneous discharge current, instantaneous power usage, and energy consumption since startup. By connecting a Hall-effect sensor and installing it near the front wheel along with a small permanent magnet on the spokes, I am also able to display current bicycle speed, and by noting the diameter of the wheel, I can track total mileage over the lifetime of the bicycle, stored in an onboard EEPROM.

In order to safely use LiPo cells, a system is needed that monitors the voltage of each individual cell, as the pack must not be further discharged if any one of the cell voltages falls below a safe threshold. Therefore, I designed a battery management system (BMS) in Altium Designer that could be mounted next to the pack and monitor cell voltages, temperature, and discharge current. It is designed around TI’s BQ76940 battery management IC, and provides all the supporting circuitry on a compact board with standard JST connectors used on LiPo batteries. A high-voltage I2C transceiver is installed so that communication to and from the BMS over a long distance near wires with large transients isn’t disturbed. The BMS is mounted in a 3D-printed enclosure and attached to the inner wall of the electronics enclosure with 3M Dual Lock. 

The electronics enclosure houses all of the power electronics and relevant connections. Everything is connected point-to-point using connectorized stranded wire, so it looks like a bit of a mess 🙂 Painters’ sponges pad the batteries against vibrations, which are secured in 3D-printed brackets (not visible, as they are located underneath the batteries).

Peripherals visible include (counter-clockwise, starting in the bottom-right):

  • Button to activate the BMS after plugging in the battery
  • 40A breaker
  • BMS, located in the white 3D-printed enclosure. Battery cell connectors attach at the top.
  • Main power 3D-printed junction box. Inside the box is a 5mΩ current-sense resistor, connected to the BMS and allowing the bicycle to track power consumption.
  •  Main power relay, actuated by turning the key switch on the handlebars
  • (Top) Speed controller.
  • (Underneath wire bundle) Entry point for external connections and relays for horn, headlight, and turn signal.