Skip to content

An open source bike computer based on Raspberry Pi Zero (W, WH, 2W) with GPS and ANT+. Including offline map and navigation.

License

Notifications You must be signed in to change notification settings

shubham030/pizero_bikecomputer

 
 

Repository files navigation

title

Pi Zero Bikecomputer

An open-source bike computer based on Raspberry Pi Zero (W, WH, 2 W) with GPS and ANT+.

https://github.com/hishizuka/pizero_bikecomputer

News

  • 2022/12/7 There are so many updates, so you might want to look over software_installation.md..
  • 2022/12/7 Please install qasync and aiofiles for asynchronous process.
  • 2022/12/7 Install garminconnect if you want to upload to Garmin Connect.
  • 2022/12/7 Install stravacookies if you want to show Strava heatmaps.
  • 2022/12/7 Add support of ISM330DHCX, MMC5983MA(SparkFun 9DoF IMU Breakout) and BMP581(SparkFun Micro Pressure Sensor)
  • 2022/12/7 Changed the SPI SCLK connection of the MIP color display and SHARP memory display from 22 to 23 for future support of Radxa Zero. Please modify headers(GPIO_SCS) of modules/display/mip_display.py or mip_sharp_display.py as needed.
#2022/12/7 update
$ sudo pip3 install qasync

Debian
$ sudo apt install python3-aiofiles
or
$ sudo pip3 install aiofiles

$ sudo pip3 install garminconnect stravacookies

Table of Contents

Abstract

Pi Zero Bikecomputer is a GPS and ANT+ bike computer based on Raspberry Pi Zero(W, WH, 2 W). This is the first DIY project in the world integrated with necessary hardwares and software for modern bike computer. It measures and records position(GPS), ANT+ sensor(speed/cadence/power) and I2C sensor(pressure/temperature/accelerometer, etc). It also displays these values, even maps and courses in real-time. In addition, it write out log into .fit format file.

In this project, Pi Zero Bikecomputer got basic functions needed for bike computers. Next target is to add new functions which existing products do not have!

You will enjoy both cycling and the maker movement with Pi Zero Bikecomputer!

Here is detail articles in Japanese.

Daily update at twitter (@pi0bikecomputer), and my cycling activity at STRAVA.

system-01-202106

system-02

hardware_top

Features

  • Easy to make

    • Use modules available at famous Maker stores.
    • Assemble in Raspberry Pi ecosystems.
    • Install with basic commands such as apt-get install, pip and git command.
  • Customization

    • Need only modules you want to use. Pi Zero Bikecomputer detects your modules.
  • Easy to develop

    • Pi Zero Bikecomputer uses same libraries as for standard Linux.
    • So, you can run in cross platform environments such as Raspberry Pi OS, some Linux, macOS and Windows.
  • Good balance between battery life and performance

Specs

Some functions depend on your parts.

Summary

Specs Detail Note
Logging Yes
Sensors Yes
Positioning Yes A GPS module is supported.
GUI Yes
Wifi Yes Built-in wifi
Battery life(Reference) 18h with 3100mAh mobile battery(Garmin Charge Power Pack) and MIP Reflective color LCD.

Logging

Specs Detail Note
Stopwatch Yes Timer, Lap, Lap timer
Lap Yes [Total, Lap ave, Pre lap ave] x [HR, Speed, Cadence, Power]
Cumulative value Yes [Total, Lap, Pre lap] x [Distance, Works, Ascent, Descent]
Gross Yes Elapsed time, gross average speed(=distance/elapsed time), gained time from average speed 15km/h(for brevet)
Auto stop Yes Automatic stop at speeds below 4km/h(configurable), or in the state of the acceleration sensor when calculating the speed by GPS alone
Recording insterval 1s Smart recording is not supported.
Resume Yes
Output .fit log file Yes
Upload Yes Strava, Garmin and Ride with GPS.
Live sending Suspend I am looking for a good dashboard service like as Garmin LiveTrack

Sensors

USB dongle is required if using ANT+ sensors.

Specs Detail Note
ANT+ Heartrate sensor Yes
ANT+ Speed sensor Yes
ANT+ Cadence sensor Yes
ANT+ Speed&Cadence sensor Yes
ANT+ Powermeter Yes Calibration is not supported.
ANT+ LIGHT Yes Bontrager Flare RT only.
ANT+ Control Yes Garmin Edge Remote only.
ANT+ Environment Yes Garmin tempe (temperature sensor)
Bluetooth sensors No
Barometric altimeter Yes I2c sensor(pressure, temperature)
Accelerometer Yes I2c sensor
Magnetometer Yes I2c sensor
Light sensor Yes I2c sensor. Use for auto backlight and lighting.

Positioning

Specs Detail Note
Map Yes Support raster map tile format like OSM (z/x/y.png or jpg). So, offline map is available with local caches. Also, raster .mbtile format is supported.
Course on the map Yes A course file(.tcx) is supported.
Course profile Yes A course file(.tcx) is supported.
Cuesheet Yes Use course points included in course files.
Search route Yes Google Directions API
Map overlay Yes Heatmap (Strava / Ride with GPS) and weather(rain / wind).

Map example

Map and Course Profile

map-01 map-02

Heatmap overlay

Strava heatmap.

map_overlay-strava

Weather map overlay

RainViewer and openportguide are available worldwide.

In Japan, 気象庁降水ナウキャスト(rain) and SCW(wind) are available.

map_overlay_rainviewer map_overlay_weather openportguide de

GUI

Specs Detail Note
Basic page(values only) Yes
Graph Yes Altitude and performance(HR, PWR, W prime balance)
Customize data pages Yes With layout.yaml
ANT+ pairing Yes
Select course Yes local .tcx file and Ride with GPS.
Upload activity Yes Strava, Garmin and Ride with GPS.
Select map Yes map and overlay(heatmap and weather)
Adjust parameter Yes wheel size, altitude, CP and W prime balance
Network setting Yes Toggle wifi and BT, BT tethering.
Language localization Yes Font and translation file of items are required.
No GUI option Yes headless mode

Performance graph

performance_graph-01

Language localization(Japanese)

language-ja

Experimental functions

ANT+ multiscan

it displays three of the people around you in the order in which you caught sensors using ANT+ continuous scanning mode.

Comparison with other bike computers

  • 200km ride with Garmin Edge 830 and Pizero Bikecomputer (strava activity)

  • title-03.png

Items Edge830 Pi Zero Bikecomputer
Distance 193.8 km 194.3 km
Work 3,896 kJ 3,929 kJ
Moving time 9:12 9:04
Total Ascent 2,496 m 2,569 m

Hardware Installation

See hardware_installation.md.

Software Installation

See software_installation.md.

Q&A

License

This repository is available under the GNU General Public License v3.0

Author

hishizuka (@pi0bikecomputer at twitter, pizero bikecomputer at STRAVA)

About

An open source bike computer based on Raspberry Pi Zero (W, WH, 2W) with GPS and ANT+. Including offline map and navigation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.0%
  • C++ 5.1%
  • Other 0.9%