Low-cost bicycle computer

garmin-computer_76533582_183495021-e1550679909553.jpg

In Fall 2018, two of my cyclist friends and I got together. One was a suitemate, and another a teammate from both Rice Electric Vehicle and Rice Bikes. Together we tried to think of a cool project we could all do!

We settled on designing and producing a low-cost bicycle computer, to undercut the fancy, high-end models out of reach for us broke college students.

Thus, team Rice Power Rangers was born!

IMG_2198.jpg

Our computer would follow the same basic principles as those high-end models, and consisted of two main subsystems.

The first is a sensor suite mounted to the left crank arm, to measure pedal RPM and force exerted on the crank arm. This information would be Bluetooth-ed to…

IMG_2199.jpg

The second subsystem! — a handlebar-mounted ‘headset’, to calculate and visually display rider cadence, power, and wheelspeed.

crank sensor suite

Untitled-2.png

Here is a slightly cleaner diagram I made of the crank sensor layout.

While the pinouts and connections are NOT accurate, this still provides an overview of the components we selected to take measurements!

IMG_1100.jpg

First, we selected the Bluno Beetle, a miniscule Bluetooth-capable, Arduino-compatible microprocessor as the brain for our bike computer.

Bluetooth wireless transmission was necessary because short of using a full-blown electrical slip ring system, there was no reliable way to send hardwired data from a rotating crank to the bike frame itself — all the wires would wrap around the crankshaft and break!

mini-magnetic-hall-effect-sensor-modul-13718-54-B.jpg

Next, a magnetic Hall Effect sensor would count the number of times it passes by a magnet affixed to my steel bike frame. This value would be divided by time and smoothed to get a running estimate of pedal RPM.

Coincidentally, this was the same method we used in Rice Electric Vehicle to measure wheel RPM! It’s a good method and works well.

ezgif.com-gif-maker (6).gif

Here is Kelvin successfully testing the Hall Effect sensor! This simple, [magnet nearby - LED on, magnet lost - LED off] test let us confirm the sensor’s trigger distances and was a good general hardware test.

You can also see our Bluno Beetle at the top of our breadboard.

Picture1.png

With a solid plan for RPM in place, we next had to measure force!

Through research online, we decided to build a Wheatstone bridge using strain gauge load cells to achieve this. Basically, a strain gauge is a thin squiggly coil of conductor sandwiched between two plastic films, whose electrical resistance changes as it is deformed.

Some micro-level physics going on, but for our purposes the previous paragraph is all you need to know.

IMG_4633.JPG

The idea would be to use four of these sensors, two parallel to the crank and two perpendicular, to measure the crank force!

Or more accurately, we would actually be measuring deflection-caused resistance and then curve-fitting it to known test load forces.

Don’t feel too bad if you’re confused like Gon is over to the left hahaha

IMG_1106.jpg

Our campus bike shop (my former place of employment!) provided a free crankset and left crankarm.

Bottom of the barrel models to be sure, but free is free!

IMG_1110.jpg

After prepping the metal surface, here I am applying the strain gauge with surgical precision (lol). We used Kapton tape to secure the gauge as an underlying layer of epoxy cured. This tape would later be removed.

IMG_1107.JPG

Me cheesing at the camera

IMG_4439.jpg

We connected the leads from each strain gauge to a load cell amplifier (the red chip) to boost the signal strength, before reading it from our Bluno Beetle. A Micro USB cable connected to the Beetle let us be able to read the resistance values on a laptop!

IMG_4441.jpg

Overall strain gauge test setup! We characterized a load-resistance curve by securing one end of the crank in a table clamp, and hanging heavier and heavier weights on the crank’s free end.

For each weight, we noted the resistance values coming from each gauge, aggregated them, and plotted them on a curve to find an equation for force conversion.

Picture4.jpg

With our sensors validated and calibrated (take that, Dr. Seuss), I 3D printed a small enclosure to fit everything in. We tried to ‘flat-pack’ our design, so it wouldn’t protrude out too much and get crushed between the crank and bike frame.

I like this picture because it’s colorful :3

IMG_1119.jpg

Later on, a custom PCB would be made to clean up the mess of wires.

That’s about it for the sensors!

headset display unit

IMG_1100.jpg

In order to receive sensor data and run calculations with it, we used another Beetle!

The force and RPM values from earlier would be used in the following equations:

  1. pedal force F * crank length d = crank torque T (N-m)

  2. crank torque T * pedal RPM (2πω) = rider power P (W)

  3. RPM * π * wheel diameter (2r) = wheelspeed v (mph)

IMG_4721.jpg

We also researched and purchased a small backlit, RGB-capable LCD screen to display everything.

We settled on this model because it was had the least-egregious power consumption compared to its peers.

IMG_4722.jpg

I took some measurements of my handlebar thiccness…

(Also lol my forever-injured hands, from falling off bikes, climbing trees, fighting, tool accidents, etc)

ezgif.com-gif-maker (7).gif

Modeled a very rudimentary display mount with sliding electronics tray…

Picture3.png

Created an equally basic GUI in Nextion Editor…

The ‘tachometer’ displayed power, and its redline was arbitrarily set to 360W.

(Much too low - I’ve held 900W for 10s in Beer Bike training)

IMG_1123.JPG

Then finally printed and assembled everything!

Picture2.jpg

Installed on my left hand side handlebar!

IMG_1118.jpg

Then we took it to our school’s Engineering Showcase! Didn’t win or anything, but it was still cool.

IMG_1106.jpg

(This was our poster if ya wanted to see)

cost.jpg

We ran a cost analysis as an afterthought, and found that all our hardware only cost $88!

Considering that even a ‘budget’ bicycle computer like the Wahoo ELEMNT BOLT still costs $229.99, we definitely succeeded in the ‘low-cost’ part of our criteria.

IMG_1106.jpg

This was really fun and — believe it or not — my first Arduino-powered project! I learned a lot about programming, serial communications, and microprocessors.

Also! I got to not only learn about, but use strain gauges a full year before we learned about them in class, so I got to flex on my classmates (always nice haha).

And another bandaged hand pic! That’s all folks

Previous
Previous

Lightsaber

Next
Next

Redboy (红孩儿) Stryfe