Use the Rasp Pi to log data from bicycles and motorcyles

Lead Image © amplion,

On the Road

, , , , , , , ,

University students take the Raspberry Pi to the streets, using it as a data logger for bicycles and motorcycles.

Every year, students majoring in automotive engineering at the Joanneum University of Applied Sciences in Graz, Austria, take on an interdisciplinary project. In 2015, the task of three teams of students was to chart various information during travel by bicycle, including turning radius, speed, acceleration, and GPS data. Each team of three worked alone: One member took care of the hardware and set up the computer, a second member wrote the software, and the third member worked on the software needed to analyze the data.


A mandatory project requirement for each team was to use a Raspberry Pi as the basis for analyzing sensor signals and storing measurements. All of the teams were therefore confronted with the challenge of how to mount a Pi on a bicycle so that it would remain stable.

Two groups used a bicycle in developing a prototype (Figure 1), whereas the third group used a somewhat more dynamic interpretation of the word bicycle and decided to use a BMW S1000RR motorcycle (Figure 2). One of the biggest challenges for this group was to find enough space for the Raspberry Pi, all of the sensors, and the power supply (Figure 3).

Figure 1: The first bicycle prototype with a Raspberry Pi sitting on a platform attached to the handlebars so that various additional components could then be attached.
Figure 2: One of the groups decided to use a BMW S1000RR motorcycle for the project.
Figure 3: Finding appropriate space for the Raspberry Pi plus sensors and its power supply required some skill and imagination.

Sensor Technology

The bicycle teams used a Hall effect sensor [1] for collecting speed data – specifically, an Infineon Technologies TLE 4945 L Hall IC 3.5-24 V PSSO 3-2 [2]. This sensor delivers a digital signal that can be read directly on the Rasp Pi. The teams placed this sensor on the right suspension fork, and the magnet was attached to the spokes. The south pole of the magnet rotated past the sensor, which also served as a clock for the other sensors. At high speeds, the Rasp Pi proportionally sampled the number of revolutions.

The motorcycle group, on the other hand, took the ABS signal from the engine control unit, which required the knowledge acquired from working with automotive electronics to avoid damaging the motorcycle.

A PC20BU rotary potentiometer was used to measure handlebar angles. An analog to digital converter (ADC) generated a digital signal from the fluctuations in voltage, which the Rasp Pi processed. The teams used a custom console to measure the steering axis angle of the front wheel.

A GPS sensor charted the route traveled. The Adafruit Ultimate GPS Breakout proved to be the best for this task in terms of cost and precision. This module recorded speeds in addition to coordinate points. To maintain a continuous connection to the GPS satellites, it made sense to mount the sensor onto the handlebars of both the bicycles and the motorcycle.

The motorcycle team used a Bluetooth-capable, battery-operated GPS receiver, the eGPS model 3975. A Bluetooth unit made it easier to accommodate the wiring and took up relatively little space. For good reception, the team hung the receiver on the steering head bearing.

One of the most important questions that arose during the course of the project concerned the choice of power supply. Given that the Rasp Pi uses a USB connection, the simplest solution was to get a commercially available powerbank typically used for charging mobile devices (Figure 4).

Figure 4: When connections are properly set up, you can get an overview of all the cycles movements.

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content