Project in progress
Onboard computer for bicycle

Onboard computer for bicycle © GPL3+

Advanced Onboard Computer for Bicycle.

  • 4,986 views
  • 16 comments
  • 20 respects

Components and supplies

STM32F103C8 BluePill
C8 or CB doesn't matter. Both have 20k of RAM and 128k of ROM
×1
OLED Display
I2C bus, 128x64, 1.3", SH1106 driver
×1
DS3231 RTC
With AT24C32/AT24C64 EEPROM chip (IMPORTANT!)
×1
XT60 connector
×1
LM2596
Heatsinks recommended
×2
8 DIP socket
×3
AP9971GD
Heatsinks recommended
×3
Piezzo buzzer
12mm in diameter
×1
Female headers
Bunch of these, straight and 90°, 0.1" pitch
×1
Male headers
Bunch of these, straight and 90°, 0.1" pitch
×1
Fuse holder
20x5mm
×1
Glass fuse
5A, 20x5mm
×1
4S BMS
With all protections it can have
×1
18650 LiIon batteries
Minimum four LiIon batteries connected in series
×8
White LED 3mm
Cold or warm, depends on you
×2
Resistors
See scheme for exact values and quantity, 1/4W, THT
×1
SMD resistors
200 ohm, 1206, see scheme for exact quantity
×1
3m 969102 0000 da image 75px
Generic Jumper (0.1")
×2
3751290
Wire, Wrapping Wire
24, 26 & 32 AWG, recommended black, 20m for each AWG
×1
SPST Switch
2 pin, cca 18mm in diameter.
×1
Sponge rubber seal
3mm in diameter, 3m in length
×1
Push button
2 pin, momentary, minimum 9.5mm in heigth
×1
USB Type A female connector
Recommended with black color
×1
Phillips screws
M3 and M4
×1
Nuts
M3, M4 and M5
×1
SMD White LEDs
1206 package, for headlight
×1
SMD Red LEDs
1206 package, for taillight
×1
SMD Amber LEDs
1206 package, for turn signal lights
×1

Necessary tools and machines

FT232RL
With 3.3V
71y9193 40
Breadboard, 270 Pin
Multimeter
88w2570 40
Servo Motor, Premium Male/Male Jumper Wires
09507 01
Soldering iron (generic)
4966285
Solder Wire, Lead Free
66y6421 40
Solder Flux, Soldering
Wire stipper
20-30AWG
Wire cutter
Lighter
For heat shrink tubes
Nail Polish
To make water resistant solder joints. Not needed, just for extra protection
3drag
3D Printer (generic)
Minimum dimensions 200x200x200mm. Recommended with enclosure. Print with ABS or ASA, PLA will get soft on direkt sun
Scalpel
26w6260 40
Multitool, Screwdriver
Phillips and hexagonal. Project uses screws from M3 to M5
Plexiglass razor
To cut plexiglass.
Heat shrink tubes
Various colors and dimensions
Hammer
Light hammer, to insert nuts into enclosures
Hy gluegun
Hot glue gun (generic)

Apps and online services

About this project

Little background story

I like motorbikes, but I'm not old enough for supersport bikes, yet. Thing that fascinate me about bikes is taillight and rear end in general. One day I decided to do a little DIY project. The project was about making a circuit that behaves as bike's taillight. The idea for the project was taken from TSTIndustries' 2013+ Kawasaki Ninja ZX6R Programmable Integrated Tail Light. Project was too complicated for me, because my knowledge in electrical engineering was poor, so I gave up from idea.

A few months later professor in high school was talking about some microcontroller, that microcontroller was Arduino. That moment woke up this project. I have googled about Arduino, how-to, examples etc. I have learned a lot about electrical engineering, programming while I work on this project.

I did the first few schematics for the project. At the beginning project was very simple, few push buttons, Arduino, blue LED as an indicator for lights, hall sensors for brake levers and that is it. But, as a young DIY lover, I felt into a trap - adding new stuff to the project!

I said to myself once "I have more Resources to use, why I don't build onboard computer with display?". I decided to do more on the project. I added OLED display, RTC, turn signals, tachometer, and speedometer, etc... So the project has become complicated. Later I swapped Arduino Nano with STM32F103C8 board. Also, I didn't like the look of the project on perfboard, I decided to learn how to use EAGLE and design nice looking PCBs.

Features

  • Total distance, daily, monthly, trip A, B, C
  • Top & Max speed
  • Average Speed
  • Total trip time and resettable trip time
  • Speedometer
  • Tachometer
  • Front light - Daily light ; Normal light ; High beam. Auto turn on/off
  • Rear light - Daily light ; Normal light ; Fog light ; Brake light. Auto turn on/off
  • Turn signals & hazard light
  • Handlebar light
  • Time, date & ambient temperature info
  • Screen saver
  • Dimmable screen (manully/auto)
  • Customizable tyre size
  • Supports metric and imperial units
  • USB charging port

First version

The first version was built on the Arduino Nano R3 board and plan for the project was much much simpler than it is today. Below you can see how it looked back then.

Little tachometer animation on startup

Second version

The second version is based on STM32F103C8 board. The reason why Arduino is not in use for the second version is lack of pins and memory. STM32 is a very good replacement for Arduino Nano. Also, the second version brings a completely new display design.

It is the first time for me to solder SMD components, it's not done well. It will be better for the next revision. Some pictures are not good quality and maybe a little bit out of focus. Below you can see how the project looks today.

NOTE

The only thing that holds this project is lack of money. I started with this project while I was going to high school, spending half allowance on components and tools. Only thing left to do is to make models and 3D print them. Also, that is the reason why code and CAD files for PCBs don't match up. In the next month or two I'll match code with PCBs.

Code

Custom parts and enclosures

Schematics

Comments

Similar projects you might like

Bluetooth-Enabled Bicycle Turn Signal

Project tutorial by simonwongwong

  • 802 views
  • 2 comments
  • 12 respects

Arduino Nano as CP/M-Compatible Computer

Project in progress by FoxyLab

  • 13,217 views
  • 16 comments
  • 29 respects

Probability | Autonomous Rover

Project in progress by colepurtzer

  • 6,226 views
  • 19 comments
  • 41 respects

Arduino TV Volume Control

Project tutorial by Sam

  • 5,003 views
  • 1 comment
  • 15 respects

Interactive Children's Jack-In-The-Box

Project tutorial by Team 10

  • 883 views
  • 0 comments
  • 4 respects
Add projectSign up / Login