Introduction: Measure Exercise Bike Output Power and Peloton Equivalent Resistance

Fancy exercise bikes will calculate the power in watts used by the bike. Our comfy but unfancy recumbent bike does not. Furthermore, in calculating calorie expenditures it does not take into account the resistance level set on it. For a long time I've been thinking how to do this, and finally found a method to estimate watts used by the bike.

The technique only works for bikes with magnetic braking (eddy current) systems: it doesn't work for bikes with a mechanical brake that actually rubs a flywheel. You can check that your bike has magnetic braking by reading the manual or by taking it apart or maybe by checking how quiet the motion is (mechanical braking is presumably louder). Magnetic braking systems have the resistance proportional to the speed you are pedalling, which is a better simulation of outdoor biking since air friction increases with speed, too.

To a first approximation, if w is rotational speed (rotations per time), then the resistance force on the pedal is

F = kw,

where k is the rotational coefficient of resistance. Over a time T, a pedal travels a distance of 2πrwT, where r is the length of the crank from the center. The work done is then force times distance traveled:

W = F(2πrwT) = 2πkrw2T.

The power used by the bike is then:

W/T = 2πkrw2.

Given the power in watts, taking into account the conversion factor between watts and kcal, and the human efficiency factor of 0.24, the amount of (kilo)calories expended is about 1/1000 times the watts times the time in seconds, or 3.6 times the watts times the time in hours.

In other words, what we need to know is k, the rotational coefficient of resistance for the chosen resistance level on the bike. If the rotational speed w is measured in revolutions per second, then k equals the resistance force at one revolution per second or 60 RPM. If we could set up a motor to drive the bike at a steady speed, we could measure k easily. But that would be difficult to set up. But driving the bike by a human has inconsistent force. One could also use pedal force sensors, but these are expensive.

It took me a long time to figure out how to measure k cheaply, and finally I found a fairly simple method involving a luggage scale, a camera, inconsistent speed and some simple calculations. Basically the idea is that you rotate the crank by hand via the scale, thereby directly measuring the resistance force. However, because it's hard to rotate the crank at a constant speed, you need to take multiple measurements of the resistance force, and that's where the camera comes in.

There is a complication to the above. In addition to the speed-dependent resistance from the magnetic system, there is also plain old mechanical friction in the system. This is generally taken to be independent of speed, however, and hence is easier to measure. So the actual model for the force resisting the user is F = kw + f, where f is the mechanical friction. And the power is:

2πrw(kw + f).

Finally, I will do a rough estimate of Peloton equivalent resistances.

Supplies

  • good quality camera possibly with tripod
  • luggage / fish scale

Step 1: Measuring Mechanical Friction

This is very simple. Attach the scale at the end of the crank, and pull on the scale very slowly, keeping it at right angles to the crank. Record the value you get in steady motion in kilograms (of force). Because at low speeds the eddy current braking is negligible, it shouldn't matter what resistance level you have the bike set to, though you might as well as set it to the lowest value you can. I got about 0.8 kg of force or f = (0.8 kg)(9.8 N/kg) = 8 N.

Step 2: Mounting the Scale for the Resistance Measurement

Our bike has removable pedals. As a first attempt, I removed a pedal and hooked the scale directly to the crank's pedal attachment hole. However, that didn't work for me as it was too difficult to pull the scale at right angles to the crank in a consistent way.

The solution was to make a little caddy for the scale. The caddy screws to the crank's pedal attachment hole, and the scale sits in the caddy and makes it easier to keep everything at right angles. I used a 3D printed thingy for this but you can also easily cobble together something out of scrap wood.

Step 3: Set Up for Video

You now need to set up the bike and camera in such a way that you can capture the scale value in all the positions. I had a horrible time dealing with glare on the scale's display and the on-and-off backlight on the scale. I modified the scale not to have a backlight (the easiest way is just to open it up and cut the wire to the backlight, or you can add a backlight switch). Additionally, you need to be able to move around the bike without interrupting the camera's view much.

I was willing to compromise and allow some data to be lost due to my arm being in the way and occasional glare.

My setup was to put the bike on its side, and have a large tripod with a camera looking down from above. The legs of the tripod were spaced widely enough not to get in the way of the crank. The camera (a Sony A7R2) was set to manual exposure and manual focus, so as to maximize visibility of the scale display throughout the rotation. I recorded the video at 1080P60.

Another way would be to have two people, with one hand-holding the camera and following the scale.

Of course, the ideal would be to capture the data from the scale directly via a battery-powered microcontroller. But that would be much more complicated, and I went for the simple and, I hope, good enough solution.

Step 4: Spin!

I attached a loop of string for two fingers to the scale hook. That turned out to be a mistake: I now have a band-aid on my finger from raw skin. You should find something smoother than string to pull the scale hook with. Maybe something smooth like thick insulated cable.

After some testing of the setup, I rotated the crank and recorded the rotation. I recorded about 5-10 rotations per level, and I used finger gestures to mark in the video which resistance level I was recording.

Step 5: Compute

You will want a video viewer where you can see either milliseconds or frame numbers, and can go back and forward by either a single frame or a specified period of time. I went with Adobe Premiere Pro. I transcribed the start time and end time (m:s:frame) for each set of rotations, and the number of rotations, as well as the force data from the scale in kilograms of force every second for the higher (and slower) levels and every half-second for the lower (and faster) levels. Where glare made the scale display disappear, I checked some neighboring frames to see if data was visible there.

I interpolated missing data (glare and arm-cover) and then for each level I had an average rotational speed and an average force. (For the highest level, I ended up consolidating data from two runs.)

We will have

k = (F-f)/w,

where F is the force resisting motion, f is the mechanical friction, and w is revolutions per unit time. To calculate this, take the average kilograms from the scale, multiply by 9.8, subtract f, and divide by the revolutions per second. The resulting units are Newton seconds. The results ranged from 28 for level 1 and 197 for level 8. The variation in k between levels was quite linear (I just used the graphpad website to graph it) with an r-squared value of 0.99, which makes me pretty confident the data isn't random.

I used a fairly simple python script that takes data in a file called data.txt. The data there includes level numbers, "start" entries with m:s:frame times, "end" markers with the number of rotations and the end time, and in between kilograms of force from the scale sampled every second or half-second, with an "x" marking missing data. The script interpolates missing data, and calculates average rotational speed, average force in Newtons, and our value k for each level, in our Newton-seconds, as well as some sample power data and Peloton equivalents.

Attachments

Step 6: Power and Calories

Once you have the coefficient of resistance k in Newton-seconds and the mechanical friction f in Newtons, you can calculate the bike's power usage in watts as 2πrw(kw + f) where r is the length of the crank in meters (0.145 m in my case) and w is the rotational speed in rotations per second. If v is the cadence in RPM, then w = v/60, and the bike's power expenditure in watts is:

2πr(v/60)((kv/60) + f).

Now time for a quick sanity check. A fairly normal speed is 60 RPM. With my numbers, at level 8 we have k = 197, and the bike's power usage is 2π(0.145)(1)(197+8) = 187 watts. Which seems reasonable, though maybe on the low side. Roughly the power varies as the square of the cadence, so if I go at 70 RPM, I will expend 253 watts.

To get calories expended per hour, just multiply the watts by 3.6, so 673 at 60 RPM.

Unfortunately, the above calculations will give an accurate calorie count only if you go at a constant cadence throughout the session, because of the non-linearity in the speed-dependence. For more accurate data, you need real-time monitoring of the rotational speed, but that's another project.

Step 7: Peloton Resistance Equivalents

On the Peloton forum, there is a graph showing the relationship between cadence in RPM, output in watts, and resistance setting on a Peloton bike. Using linear regression, we can reverse engineer the formulas:

  • at 60 RPM: output = resistance × 3.98 - 86.6
  • at 80 RPM: output = resistance × 7.78 - 183.1
  • at 100 RPM: output = resistance × 11.73 - 279.1

We can reverse these. For instance, with my bike, we computed the output at 60 RPM on level 8 at 187 watts. Thus we have:

  • 187 = resistance × 3.98 - 86.6
  • So, resistance = (187 + 86.6) / 3.98 = 68.7.

You get slightly different (but not very different) results when you use different RPM values for the calculation. My python script does calculations at 60, 80 and 100 RPM, and averages them. So, for Level 8, I get 67 and for Level 1, I get 31 Peloton resistance.

Anything Goes Contest

Participated in the
Anything Goes Contest