Bike Computer Powers On Long After Your Legs Give Out

A typical bicycle computer from the store rack will show your speed, trip distance, odometer, and maybe the time. We can derive all this data from a magnet sensor and a clock, but we live in a world with all kinds of sensors at our disposal. [Matias N.] has the drive to put some of them into a tidy yet competent bike computer that has a compass, temperature, and barometric pressure.

The brains are an STM32L476 low-power controller, and there is a Sharp Memory LCD display as it is a nice compromise between fast refresh rate and low power. E-paper would be a nice choice for outdoor readability (and obviously low power as well) but nothing worse than a laggy speedometer or compass.

In a show of self-restraint, he didn’t try to replace his mobile phone, so there is no GPS, WiFi, or streaming music. Unlike his trusty phone, you measure the battery life in weeks, plural. He implemented EEPROM memory for persistent data through power cycles, and the water-resistant board includes a battery charging circuit for easy topping off between rides.

When you toss the power of a mobile phone at a bike computer, someone will unveil the Android or you can measure a different kind of power from your pedals.

13 thoughts on “Bike Computer Powers On Long After Your Legs Give Out

  1. This is a nice project from Matias!

    It is a shame that Hackaday didn’t publish about the NuttX Online Workshop that happened this weekend. Matias presented about his Bike project there. BTW, if someone want to watch it, everything is recorded on YouTube:

    Day 1 (Saturday – Aug 15 2020)
    https://www.youtube.com/watch?v=t49wq_ovT50

    Day 2 (Sunday – Aug 16 2020)
    https://www.youtube.com/watch?v=CIpa3_70PCY

    The link for each Presentation is fixed in a user comment. I’m waiting for google to include the Live file in the Takeout.

  2. I feel its worth pointing out e-paper isn’t particularly power efficient if you are rapidly changing the screen. Its real efficiencies come from having zero cost to maintain a static display, actually switching to a new image has a pretty high power requirement. So for this case not only would it be laggier with the slow update speeds of epaper screens it probably wouldn’t be an improvement on power consumption (though they can be driven rather fast for a while with some software tweaks and not all screens can do daylight readable without massive backlights).

    Neat looking project. All it needs is the map holder behind it (otherwise having compass point references doesn’t seem very helpful to me) and logging the data to the almost certainly present smartphone (or timestamps on the data so it can be combined later) will give some great details about your ride.

    1. Every bicyclist has a place to hold the map of their current ride, that place is called a brain. Memorize your route before you ride, keep your eyes on the road and the cars and don’t get distracted. Stay alive, don’t end up as a sad story in the newspaper.

      1. yeah that works well on proper roads in areas you know – in which case you don’t need the compass either.
        But once you go off-roading, through areas you really don’t know or into the wilder rural areas (as they tend to have many unmarked roads that are just driveways/farm tracks etc) having a map and compass becomes very useful.

        As with all tools its not having them but using them sensibly – and picking what is best for you.

    2. If you want something to connect the phone with, buy a commercial product. I also prefer battery life to the modern approach and consider it a key feature (longer battery life).

      Although I find the L4 to be way overkill for this project (but better with more power than less for prototypes). I have a comparable project, even with the same LCD, with an L0 instead and can maintain realtime response with custom graphics rendering just fine (even while only still using the MSI clock at 4.2MHz with the HSI in reserve), but I also love an optimization challenge (hand-optimized blit routines anyone?). In any case, profiling to get the most out of sleep/stop modes, minimizing wake-ups and using DMA for everything while doing rendering and sensor data post-processing in parallel is quite fun (and a somewhat complicated task).

      1. Hey alyx,
        mind linking your project? Would be interested to look at it.
        I think I chose the L4 due to the peripheral options, not sure if there was an L0 with everything I needed.

        1. Sorry, my project is currently not described (or publicly released) anywhere. Which peripherals are you referring to? I needed the LPTIM to drive the screen’s COM at 64 Hz (depends on the exact model), which I also use as a 7.8ms wakeup when otherwise waiting for completion/timeout in sleep mode (when the DMA is running like I2C and SPI but not complete) since the SysTick is disabled in sleep/stop mode. And then I use the RTC as a 1s wakeup (when not awoken otherwise by buttons’ EXTI IRQ).

  3. This is a great project but…

    “A typical bicycle computer from the store rack will show your speed, trip distance, odometer, and maybe the time. ”

    Oh my sweet summer child, I remember the 1990s too – go find a bunch of spokeheads and ask them about their stats – prepare to be there for some time.

    The current crops of onboard computers do everything from tracking power output via strain gauges on the cranks to heart rate, cadence and position/altitude information on touchscreen maps. All of this then gets uploaded to various apps so that they can compare and even race for distance or time online. With electronic shifting coming into vogue, there’s no guarantee that it won’t start choosing gears for you.

    All this assumes they have a dedicated unit – most just use their phone for navigation/stats in the first place with apps like Strava that use the sensors they already have..

  4. All that of course with DRM in it — you want to change a spoke, a Bowden cable (or heck, a brake pad!) and have to ask permission from the firmware copyright holder. Or something.

    Have fun with that crap.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.