The October 2022 issue of IEEE Spectrum is here!

Close bar

A DIY E-bike Conversion on the Cheap

Electrifying a bike can be electrifyingly easy

4 min read
Blueprint of the simple electric bike conversion.

This simple electric-bike conversion involves just a few basic components: a brushless motor mounted under the chainstays [A]; a lithium-ion battery pack, electronic speed controller, and Arduino, housed in a normal trunk bag [B]; a Drok meter [C], two Hall-effect sensors [D] and a momentary rocker switch [E], all mounted to the handlebars.

James Provost

In 2009, I wrote in these pages about my efforts to add an electric motor to a bicycle—a project that involved a considerable outlay of money and many hours in a machine shop behind a lathe. At the time, e-bikes were still rather exotic, at least in the United States, so it seemed worth the expense and effort to build my own.

Fast forward a dozen years. E-bike availability and ridership have exploded. Purpose-built electric bikes and e-bike conversions using hub-motors are now commonplace. One thing that hasn't really changed, though, is the expense. If anything, it's gone up. Consider the two e-bikes described in this month's Gizmo column, which each cost thousands of dollars.

That got me thinking, how hard would it be, and how much would it cost, to do a simple conversion now? Thanks to a few recent technical and commercial developments, I was able to come up with an e-bike conversion that cost me less than US $200 and yet functions impressively.

The approach I adopted is mechanically as simple as you can get. It uses an "outrunner" motor designed for electric skateboards. With such outrunners, the case of the motor rotates. Driving the bike with it merely requires mounting it to the frame in such a way that the case is in contact with the rear wheel.

I'd read about such friction-drive arrangements and had followed the work of a cyclist in Australia known as Kepler who had devised a clever articulated mount that allows the motor to retract from the wheel when not applying power. He'd been selling kits for his mount in small numbers. But Kepler's newest approach keeps the motor in constant contact with the wheel, which allows for regenerative braking. I thought: "What could be easier?"

So I bought an outrunner motor designed for electric skateboards for $88 and fashioned a mount for it out of a few pieces of scrap aluminum. The motor attaches to my bike under the chainstays, directly behind the bottom bracket. In that position, it's hardly visible. While it would have been nice to engineer some sort of spring-driven mechanism to control how forcefully the motor pushes against the tire, I kept things simple: I just deflated the tire somewhat, bolted the motor solidly in place, and reinflated the tire.

Illustrations of the components.Most components are inexpensive and readily available. The only part I needed to fabricate was an aluminum mounting bracket for the motor [shown in outline]. James Provost

I next needed to decide on an electronic speed controller (ESC) to power the motor. For that I took advantage of the open-source VESC Project created by Benjamin Vedder. His work includes sophisticated hardware and associated firmware, as well as elaborateconfiguration software. Being an open-source design no doubt keeps the price of this hardware down: The controller I bought set me back a mere $85.

The third essential element of any e-bike is, of course, the battery. Here I took advantage of already owning an electric lawnmower, figuring that the 40-volt, 4-ampere-hour battery I had for it would serve well. All that was needed was a suitable adapter, which I bought for $18 from Terrafirma Technology, a company started by an engineer named Michael House who has gone into business supplying 3D-printed adapters to people who want to repurpose lithium-ion power-tool batteries.

On the handlebars are three controls: a momentary rocker switch operated by my right thumb and two Hall-effect sensors, which are switched when I squeeze the brake levers, to which I glued small neodymium magnets. These switches are wired to an Arduino Nano, which sends the appropriate signal to the speed controller.

The lack of noise, combined with the discreet positioning of the motor and other components, makes it hard for anyone to notice that I'm on an e-bike.

The most challenging part of this project was figuring out how to configure the ESC. Vedder's software contains "wizards" to help, but it's still complicated. Using it forced me to consider the difference between motor amps and battery amps and the virtues and drawbacks of controlling a motor by setting a target motor current or by changing the applied duty cycle.

I settled on controlling the motor current, which I adjust with the thumb-operated rocker switch on the handlebars. Squeezing the rear brake (which I'd normally rarely use on a road bike) applies a small amount of regenerative braking before the pads make contact–just as in my wife's Prius. Applying the front brake cuts power to the motor without triggering regenerative braking.

My first test ride convinced me that I needed some quantitative feedback about what the motor was doing. It would have been possible to have such information displayed on a smartphone, using a Bluetooth module plugged into the ESC. But I was in a hurry and simply mounted on the handlebars a Drok meter, which I had purchased for an earlier bicycle-based battery-charging project.

Setting the speed controller to use current control initially confused me when I tested it with the rear wheel in the air. With the power setting fixed, the wheel would spin increasingly fast and the amperage drawn from the battery would steadily increase. Online discussions convinced me, however, that this is the expected behavior when commanding a motor to maintain a fixed amperage in its windings (thus applying constant torque) while under little load

Illustration of the process.The handlebar-mounted controls connect with an Arduino, which interprets their settings and translates them into a PPM signal, which is applied to the electronic speed controller. The speed controller is connected to the motor and battery in the usual fashion, with an automotive-type blade fuse in line for safety.James Provost

This took some getting used to, but now I have the strategy down: I use the thumb switch to control how fast the bike accelerates and when I reach target speed, I tap my front brake, which returns the controller current setting to neutral. I can then goose it up from there as needed to maintain the desired speed.

The electric assist is virtually silent, because there's no gearing to make noise and because Vedder's electronics use quiet field-oriented control to power the motor. At speed I can't hear the motor at all. The lack of noise, combined with the discreet positioning of the motor and the fact that the battery and electronics are hidden inside a trunk bag, makes it hard for anyone to notice that I'm on an e-bike.

I took advantage of that stealthiness during an early test ride. While loitering along, experimenting with the controls, I was passed by a college student on a mountain bike who must have thought this gray-bearded old-timer on a four-decade-old 12-speed was huffing and puffing. So I poured on the juice and blew past him, thereafter maintaining Tour de France speed. As I raced ahead, I chuckled to myself. "OK boomer," indeed.

This article appears in the September 2021 print issue as "An Instant E-bike."

The Conversation (19)
Tyler Folsom17 Sep, 2021
LS

David Schneider’s suggestion to use friction-drive on the tires for e-bike conversion is interesting. If this method were efficient, standard bikes would be built this way, eliminating the inconvenient chain, chainring and freewheel. The power required to drive a bike is inversely proportional to the mechanical efficiency of the transmission. A chain can have an efficiency of 98.5%. I expect the figure for friction-drive to be considerably worse.

Schneider describes a conversion costing less than $200, but he omits the battery, which is by far the most expensive part. For a similar price, one could put a hub motor on the front wheel, install an e-bike controller and a throttle on the handlebars. This avoids the need to weatherproof and supply robust cabling to an Arduino.

A lithium battery will run $300 to $400. Adding up the prices, buying a complete electric bike for $1000 is a good deal.

Michael Partridge12 Sep, 2021
LS

If you want a bike for DYI electric bike parts, I have a 2010 Trek Valencia Ride+ for free, you pay shipping (I’m in Las Vegas).  Has a 20” frame, but I’m assuming you would want to reformat the whole thing anyway.  The lithium-ion battery pack is a 40.7V, 6.4Ah and died long ago, in fact was pretty worthless after 6 months riding.  Bike details: https://archive.trekbikes.com/us/en/2010/trek/valenciaplus#/us/en/2010/trek/valenciaplus/details

The 350W motor had so much torque that spokes kept popping.  Maybe why later models toned that down to 250W.  The bike weighs over 55 pounds, and almost all distributed to the rear (may have contributed to popping spokes).  But, was exhilarating to ride while it lasted.

5 Replies
James Heliotis08 Sep, 2021
AF

One non-EE technicality. Everyone should be using their rear brake more often than the front! Many have recommended that. I learned the hard way once when I just used the front brake, flipped my bike, and broke my shoulder. However, I'm not recommending, without further study, that the front brake be used for regenerative braking.

We Need More Than Just Electric Vehicles

To decarbonize road transport we need to complement EVs with bikes, rail, city planning, and alternative energy

11 min read
A worker works on the frame of a car on an assembly line.

China has more EVs than any other country—but it also gets most of its electricity from coal.

VCG/Getty Images
Green

EVs have finally come of age. The total cost of purchasing and driving one—the cost of ownership—has fallen nearly to parity with a typical gasoline-fueled car. Scientists and engineers have extended the range of EVs by cramming ever more energy into their batteries, and vehicle-charging networks have expanded in many countries. In the United States, for example, there are more than 49,000 public charging stations, and it is now possible to drive an EV from New York to California using public charging networks.

With all this, consumers and policymakers alike are hopeful that society will soon greatly reduce its carbon emissions by replacing today’s cars with electric vehicles. Indeed, adopting electric vehicles will go a long way in helping to improve environmental outcomes. But EVs come with important weaknesses, and so people shouldn’t count on them alone to do the job, even for the transportation sector.

Keep Reading ↓Show less