Changing Generators

Published on 2022-04-04, updated on 2022-08-19 by Jim Gregory
reading time: ~8 minutes

toothed pulleys and belt mounted on pedal-powered generator
The new toothed pulleys and belt on my pedal-powered generator.

Early prototypes of the PedalPC used a chain-driven direct-drive Conhis Motor electric bike hub motor for it's generator. In 2014, I dropped this motor in favor of a Bofeili mid-drive E-bike motor instead. I preferred the Bofeili because it was compact, fully enclosed, and reasonably quiet.

I thought it was the ideal pedal-power generator. But a sequence of events over the past two and a half years has led me to change my opinion.

In this post, I will describe why I originally chose the Bofeili over the hub motor, the sequence of events which caused me to return to using a hub motor, and the improvements I made that now make it my preferred choice.

The First PedalPC

One of the first versions of the PedalPC looked like this:

early non-folding prototype of pedalpc
An early version of my pedal-powered computer. The chain-driven hub motor generator is visible in the lower left corner of the photo.

The chain-driven hub motor is visible in the lower left corner. The motor worked well, but the drive system had some shortcomings:

The best way to solve these problems, I thought, would be to eliminate the chain and use a generator with integrated cranks. That led me to begin experimenting with mid-drive E-bike motors.

I tried four different mid-drive motors. Three had too high a gear ratio between the cranks and the motor to use them as a pedal-powered generator. The Bofeili, however, was perfect.

Bofeili mid-drive motor generator mounted on my pedal-powered computer
The Bofeili mid-drive motor mounted on my PedalPC. Mounting the motor backward on the frame (i.e., with the chainwheel side of the motor on the left side of the frame) and welding a pin to the chainwheel mounting flange to engage the cranks causes the cranks to spin the motor, turning it into a pedal-powered generator.

A pedaling cadence of 78 RPM would generate about 60 W of electricity. I used it to power my office for several years.

What Precipitated the Change

On March 4, 2020, I was struck while riding my bike by a pickup truck that had failed to yield the right of way at an intersection. The collision created a large gash in my upper left thigh, requiring a trip to the emergency room for stitches and almost two weeks off from pedaling to allow the wound to heal.

The collision ruined my bike. A fat bike I previously used only on snowy days became my daily means of transportation.

Over the next few months, I began experiencing chronic knee pain, mostly in my left knee, whenever I pedaled.

X-ray tests ruled out arthritis. Daily physical therapy exercises and ice packs on my knees did little to help. Knee bands and compression sleeves helped reduce the pain, but didn't entirely solve the problem.

I suspected daily use of the fat bike might be the cause. Fat bikes have very wide tires, roughly twice as wide as a standard mountain bike. The wide tires require a wider-than-normal crank spacing, or Q-factor, so the bicycle's chain can clear the rear tire. A wide Q-factor increases the load on the knee, which can lead to knee pain.

On most bikes, the Q-factor is around 6" / 150 mm. On my fat bike, it was 50% wider.

measuring the left- and right-hand distance between the crank and the frame on my fat bike
The Q-factor on my fat bike: 4.25" + 4.75" = 9"!

Replacing the fat bike with a standard mountain bike reduced the pain, but did not eliminate it. So I wondered about the mid-drive motor I was using as a generator on my pedal-powered computer. Did it have a wide Q-factor, too?

The Bofeili motor consists of an electric motor and drive gears enclosed in a die-cast aluminum casing. The cranks are mounted on a shaft through the center of the casing. Fitting all this hardware between the cranks gives it a rather wide wide Q-factor of 8" / 200 mm.

To see if a lower Q-factor generator would reduce my knee pain, I replaced the Bofeili with the cranks, chain, and hub motor I used earlier.

Some Unexpected Results

To my surprise, the change not only reduced my knee pain, my power output shot up!

I noticed my electrical power output gradually declining over the years, from around 60 W in 2014 to 40 W in Aug 2021. Since a person's power output typically falls past middle age, I assumed the cause was normal aging. (I turned 57 in 2021.) To compensate, I simply pedaled longer each day.

Changing to the hub motor restored my power output to near my 2014 levels. This cut 1-1.5 hours off the time needed to pedal each day to meet our electricity needs.

Improving the Drive System

Mounting the generator hub closer to the ground greatly reduced the chance of cables getting caught in the chain. But I still found the chain to be somewhat noisy and dirty. Since I often work in the morning while my wife is asleep, minimizing that noise was especially important to me.

I had previously tried driving the hub motor with a V-belt and stamped steel V-groove pulleys . This reduced the noise slightly, but wasn't as efficient as the chain. Slippage between the belt and pulleys generated dust, too. Using a toothed belt and toothed timing pulleys, I thought, might eliminate those problems.

An increasing number of high-end bikes use toothed belts, but bicycle-specific toothed belts and pulleys are hard to find and very expensive. Industrial toothed timing belts, by contrast, are readily available and inexpensive. The only parts I would need would be toothed pulleys. I decided to try to design and make them myself using my 3D printer.

Designing the Pulleys

I designed the pulleys with OpenSCAD using Petro Rizo's Parametric Pulley file as a base to work from. I edited each file in Neovim using Niklas Adam's useful OpenSCAD Neovim plugin. The STL output from OpenSCAD was converted into gcode using using the command-line version of prusa-slicer

screenshot of a terminal window and OpenSCAD
Screenshot of my CAD editing environment when designing the pulleys. Neovim is in the left terminal window and OpenSCAD in the right graphical window.

The driving pulley--i.e., the pulley mounted on the crankarm--was designed to mount to the crankarm spider using the same five chainring bolts as a normal chainring.

toothed pulley mounted on crankarm on the generator
Toothed driving pulley mounted on its crankarm. The pulley is designed with an offset to center the pulley on the cranksarms.

The driven pulley--the pulley mounted to the hub motor--required a different mounting than the chain-driven sprocket used. Normally, the driven sprocket would screw onto a threaded hub on the side of the hub motor body, but a plastic pulley mounted this way would quickly strip out its threads.

threaded hub of motor alone, and with cogwheel
The hub motor has a threaded hub (left) for mounting freewheel cogs (right). A plastic pulley could not be mounted this way.

Instead, I designed the driven pulley with six arms on the back of the pulley. The arms mount to the case cover screws on the side of the hub motor.

toothed pulley mounted to hub motor
The driven pulley mounted to the case cover screws. (This hub has no provision for mounting a disc brake. If it did, I would have used those holes instead.)

Making the Pulleys

I printed the pulleys from PETG filament on an A30 Geeetech printer using a 0.6 mm nozzle operating at a print speed between 40 and 80 mm/s, a nozzle temperature of 230 C, and a bed temperature of 90 C. Each pulley took several hours to complete.

PETG is notorious for leaving strings--fine, hair-like strands created by filament oozing through the nozzle during non-printing movements. I pulled most of these off by hand. The reminder didn't effect the performance of either pulley.

photo of hub motor pulley on printer bed and after cleanup
The hub motor pulley looks pretty bad immediately after printing (left), but the brim and strings are easy to remove leaving a nice, useful pulley (right)

I initially used a 9 mm wide 5M (i.e., 5 mm pitch) HTD profile belt and pulleys, but the belt would occasionally skip under load unless pulled very tight. To fix this, I redesigned the pulleys using a deeper 8M profile and replaced the 5M belt with a similar-length 8M belt. That fixed the skipping problem.

I have used this toothed belt drive system now 3-4 hours per day every day for the past few months, and it is working well. It is noticeably quieter than any pedal-powered generator I have used or seen. Even my wife remarked a couple of times how quiet it is.

Conclusions

Did the Bofeili mid-drive motor cause my knee pain? Probably not. I had, after all, used the Bofeili for several years without experiencing any memorable chronic pain. Most instances of knee pain resolve themselves with time, so I may just have needed more time off the fat bike to allow my knees to heal.

However, given how much I and other users pedal each day at our desks, it's probably wise to use cranks with a normal Q-factor to minimize the chance of knee damage.

Going forward, I do not plan to use mid-drive crank motors like the Bofeili any longer. Besides their often-higher Q-factor, they are more expensive, more difficult to source and repair, and force you to pedal at a cadence that may be uncomfortable. Separating the cranks from the generator allows a narrow Q-factor, a broader selection of motors to choose from as generators, and a quieter system overall when a toothed belt and timing pulleys are used. The ability to custom-print pulleys of any size ratio to match a user's cadence is an additional benefit.

The only question remaining is how well such a system performs over time. So far, there is no visible wear on the pulleys so far and only a small amount of wear on the belt. But should either pulley need replacement or a different pedaling cadence desired, it's a simple matter to print new ones.

It's also unclear if the hub motor will experience the same decline in performance as the Bofeili with age. I presume the Bofeili's power output fell simply because the motor's internal magnets grew weaker with time and heavy use, reducing the generator's field strength. It's too soon to tell if the hub motor will experience the same behavior.

I would not recommend using 3D-printed pulleys like these on a standard bicycle. The hub-mounted pulley has no ability to freewheel. Road grit and grim would likely damage the PETG pulleys. Standing on the cranks while pedaling might strip the sprocket's teeth.

But for an indoor pedal-powered generator driven at a mostly constant load, the pulleys and belt have performed well.