A Garmin Edge 540 is $400. A Wahoo Elemnt Bolt is $300. Both are excellent products. Both are also fundamentally a microcontroller, a GPS receiver, a small display, and a battery — the same parts list as a $40 DIY build that does 80% of what they do. The 20% you give up is mostly polish: their UI is more refined, the route uploads are smoother, the integrations with Strava and Garmin Connect are seamless. The 80% you keep includes everything that actually matters on a ride.
This article builds a complete bike computer with GPS, speed, distance, route tracking, and an OLED display. It is the project that has converted more people in our team to embedded electronics than any other, because every cyclist has been frustrated by something a commercial unit can't do.
System architecture
NMEA over UART] -->|9600 baud| MCU[[ESP32]] Buttons[3 buttons
up, down, select] --> MCU MCU -->|I2C| OLED[OLED display] MCU -->|SPI| SD[microSD card
track log] Bat[LiPo battery
2000 mAh] -->|3.3V| MCU Bat --> Charger[TP4056 charger] USB[USB-C] --> Charger
GPS feeds NMEA sentences to the MCU over UART. Display shows live speed/distance/heading. SD card logs the track for later upload to Strava or Garmin Connect.
Hardware
- ESP32 DevKit or LILYGO TTGO T-Display (ESP32 + 1.14" colour LCD on one board) — $10–15
- NEO-6M or NEO-M8N GPS module with patch antenna — $5–10 (M8N is better in tree cover)
- 0.96" or 1.3" SSD1306 OLED, I2C (skip if using TTGO T-Display) — $4
- 2000–3000 mAh LiPo cell — $8
- TP4056 charger module + DW01 protection — $2
- Push buttons (3) for navigation — $1
- Waterproof enclosure (3D-printed is best — designs available on Thingiverse) — $5
- Bike handlebar mount — $5
Around $40 total for a single-screen build, $50 with an external OLED.
What the screen shows
A bike computer screen design has more nuance than it looks. The successful commercial layouts arrive at similar choices because the constraints are tight: small screen, glanced at while moving, must not require interpretation.
Our default layout, in order of prominence:
- Current speed — large, top of screen. The number you check most often.
- Distance ridden — medium, below speed.
- Time elapsed — medium, beside distance.
- Heading or compass — small, bottom-left. Useful when navigating unfamiliar roads.
- Battery percentage — small, bottom-right.
Buttons toggle additional screens (lap, max speed, average speed, GPS quality). Three buttons is the right count — fewer is cramped, more is hard to find on a moving bike with gloves on.
Battery life
Active draw breakdown:
Component Current draw
--------------------- ------------
ESP32 active ~80 mA
GPS module ~30 mA
OLED display ~12 mA (visible)
SD card writes ~50 mA (peaks during write)
--------------------- ------------
Typical total ~120 mA average2000 mAh / 120 mA = ~16 hours per charge. A long endurance ride is around 8 hours; weekend riders charge weekly.
For multi-day bikepacking, use a USB power bank in your seat bag. The bike computer accepts charge while operating. A 10000 mAh power bank gets you 50+ hours of additional runtime.
Going further
- Bluetooth heart rate / cadence. Most fitness sensors broadcast over BLE using the standard Heart Rate Profile or Cycling Speed and Cadence Profile.
- Turn-by-turn navigation. Pre-load a route as GPX on the SD card; have the firmware compare current position to the route and display next turn.
- Strava live segments. Real-time alerts when entering a segment.
- Crash detection. Add an MPU6050 IMU; if it detects a crash spike, send an SMS via cellular module to an emergency contact.
Frequently Asked Questions
How accurate is the speed compared to a Garmin?
GPS-derived speed is accurate to about 0.5 km/h above 10 km/h. Below that — slow climbs, very low speeds — both Garmins and DIY builds get fuzzy.
Will it work in cities with tall buildings?
Less reliably than in open country. NEO-6M struggles in urban canyons; NEO-M8N (multi-constellation: GPS + GLONASS + Galileo) is dramatically better. Spend the extra $5 on the M8N.
How does it sync with Strava?
End of ride, remove the SD card and copy the GPX file to your phone or computer. Strava's web upload accepts GPX directly.
What about waterproofing?
Critical for road riding. The 3D-printed enclosure designs on Thingiverse usually have a USB-C cutout you need to seal with a plug. Inside the case, conformal coat the PCB or pot it in epoxy.
Get the complete project package
The article above shows the core firmware and the principles behind it. The complete project package — assembled, tested, and ready to flash — is available by email request. We send it manually, and we read every request.
- Complete Arduino sketch (.ino) with full error handling
- List of required libraries with version numbers
- Printable wiring diagram (PDF)
- Bill of materials with current part numbers
- Build guide and troubleshooting tips
- Configuration template (WiFi, MQTT, etc.)
Share your thoughts
Worked with this in production and have a story to share, or disagree with a tradeoff? Email us at support@mybytenest.com — we read everything.