Bicycle Computer

One thing about cycling about, it’s handy having a phone with apps that tell you your speed and distance, but at the cost of battery power!

And many years ago I had a bike computer that worked by GPS,, but it was hard to calibrate most of the time and as small as it was it didn’t give great information about the trip.

And I had been on the lookout for another one, but the prices seemed a bit high, ranging from the cheaper €75 end to €300 and up.

And after my last project, I wondered would it be possible to build one, I know arduino supports GPS modules so I figured that ESP32 boards would be able too, and with a quick search I found a few people used them for motorbike and car displays for accurate speed and distance. It would have been nice if someone did one for a bicycle, but I couldn’t find any.

Now me being me, not only did I want something to show me speed and distance, but temperature and air pressure would be a nice bonus.

So parts ordered and then wait a couple of weeks for it all to arrive.

And bits started being delivered it was time to start testing ideas.

The first GPS module that arrived didn’t work, so a quick search on Amazon and I had 2 more after the weekend.

After testing them I found they worked quite well.

Then the temp/humidity/pressure sensor arrived, and again a few more tests, and that worked.

So time to test and design the code for it all, now there’s no point having all the information all on one screen, so I added “pages” that I could rotate through with a button, speed – trip – compass – clock – barometer.

But that seemed to be a bit fiddly, so added a second button, so now button 1 flicks through speed (main page) – trip -GPS info- compass- clock and back to speed, while the second button scrolls through clock – weather (showing temp/ pressure/humidity as basic text with trending data arrows to show increase or decrease in values over last few minutes) – barometer style gauge with temperature- system info.

And then added long press to the buttons, on button 1 it shuts the unit into sleep mode until pressed again, and button 2 changes theme from a dark theme to a light theme.

Then, there was the problem of making it mobile, so with a couple of capacitors, a voltage regulator and a LiPo battery with charging module that was taken care of, and a power switch to help save battery life when not in use.

But again, thinking pushing buttons while cycling is not ideal. I needed something like a touch sensor so I could just tap to change the pages. I knew they existed because I’ve often thought of using them for different things, but never did, so did a quick search about capacitive touch and Esp32, and it turned out they are capable of doing that without the need for sensors, just run a wire from one of the dedicated pins and it’s ready to go!! Well that was handy.

So a bit of copper tape and away it goes,, for the moment it now resides inside a Listerine bottle for a while while I do some more testing, but so far it’s going well, except for the odd short circuit happening here and there, but it seems to be going well now.

The project scripts can be got here, https://github.com/stevecrow74/BikeComputer

It’s still a work in progress so the code will change as I continue with it.