Echtzeit-Motorrad-Telemetrie mit Arduino, GPS, Sensoren & Azure Cloud
Hardware
| Arduino UNO R3 | 1 |
| u‑blox NEO‑7M GPS | 1 |
| LM35DT Temperatursensor (Außen) | 1 |
| TMP006 Infrarot-Temperatursensor (Reifentemperatur, kontaktlos) | 1 |
| HC‑05 Bluetooth (Arduino ↔ Windows Phone) | 1 |
| HC‑SR04 Ultraschall (2×, Federweg vorne/hinten) | 2 |
| ADXL345 3‑Achsen-Beschleunigungssensor (Lean/Wheelie-Winkel, G‑Kräfte) | 1 |
| ProtoShield / Breadboard / Jumper / 9 V Block + Clip | 1 Set |
| Ducati Monster 695 (Testfahrzeug) | 1 |
| Lumia 650 (Windows 10 Mobile) für UWP-App | 1 |
Software & Cloud
- Arduino IDE
- Visual Studio 2015 + UWP SDK (WinAppDeployCmd)
- Microsoft Azure: IoT Hub, Stream Analytics, SQL Database, Web App (ASP.NET + Entity Framework), Machine Learning Studio
- GIMP, Fritzing, Blend
Systemarchitektur (7 Phasen)
- Erfassung: Arduino liest alle Sensoren ~2 Hz.
- Bluetooth: Daten per HC‑05 an Windows Phone (UWP-App).
- Cloud-Upload: App sendet per 3G/4G an Azure IoT Hub.
- Stream Analytics: Job schreibt Telemetrie in Azure SQL.
- Web App: Echtzeit-Dashboard (Charts, Authentifizierung) liest SQL via Entity Framework.
- Machine Learning: Historische Daten → Trainings‑/Vorhersagemodell (Fahrstil-Klassifikation).
- Feedback (Zukunft): Predictive Service → Event Hub → Cloud Service → IoT Hub → Phone (Warnung bei riskantem Fahrstil).
Sensor-Details & Code-Snippets
Bluetooth (SoftwareSerial)
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX, TX
void setup() { BTSerial.begin(9600); }
void loop() { BTSerial.print("Hello Hackster"); }
GPS (TinyGPS++ + SoftwareSerial)
#include <TinyGPS++.h>
SoftwareSerial ss(12, 13);
TinyGPSPlus gps;
void loop() {
while (ss.available()) if (gps.encode(ss.read())) {
if (gps.location.isValid()) { lat = gps.location.lat(); lon = gps.location.lng(); }
}
}
ADXL345 (I²C, Offset-Kalibrierung, Lean/Wheelie)
#include <ADXL345.h> #include <Wire.h>
ADXL345 acc;
double Xg,Yg,Zg, refXg,refYg,refZg; int i=0;
void loop() {
acc.read(&Xg,&Yg,&Zg);
if (i==0) { refXg=Xg; refYg=Yg; refZg=Zg; i=1; }
Xg-=refXg; Yg-=refYg; Zg-=refZg-1; // +1g auf Z
roll = -(atan2(-Yg, Zg) * 180/PI); // Lean Angle
pitch = (atan2(Xg, sqrt(Yg*Yg+Zg*Zg)) * 180/PI); // Wheelie Angle
}
TMP006 (I²C, Reifentemperatur)
Montageabstand ≤ Reifenbreite/4 (bei 160 mm → ≤40 mm). Library: Adafruit_TMP006.
LM35 (Analog, Außenluft)
float celsius = (analogRead(A1)/1023.0*5000)/10; // 10 mV/°C
HC‑SR04 (NewPing Library, Federweg)
#include <NewPing.h>
NewPing sonar(2,3,200); // Trig, Echo, MaxDist cm
int dist = sonar.convert_cm(sonar.ping());
UWP-App (Windows 10 Mobile)
- Empfängt Bluetooth-String:
$START|Lat|N|Lon|E|Mon|Day|Year|Time|Speed|Alt|Sats|HDOP|Roll|Pitch|Xg|Yg|Zg|Audio|Dist|TempExt|TempTyre|FrontShock|RearShock|$END| - Parst per Pipe-Trenner, zeigt Gauges (Speed, Lean, Wheelie), GPS, Temperaturen, Federwege.
- Sendet JSON an Azure IoT Hub (Device ID + SAS Key).
Deployment via WinAppDeployCmd.exe (ARM-Paket, Developer Mode, USB).
Azure-Konfiguration
- IoT Hub: Erstellen, Connection String (iothubowner) notieren.
- Stream Analytics Job: Input = IoT Hub, Output = SQL Azure Tabelle, Query:
SELECT * INTO SqlAzureMyTelemetry FROM MyTelemetryInputHub. - Web App + SQL: Free Tier (F1), Custom Domain kaufbar.
- Device ID: Via Console App (
Microsoft.Azure.DevicesNuGet) registrieren → Primary Key generieren.
Web-Dashboard
Responsive ASP.NET (Entity Framework). Demo-Zugang: User demo / Pass demo. Zeigt Charts für Speed, Lean, Pitch, G‑Forces, Temperaturen, Federwege, GPS-Karte.
Machine Learning (Azure ML Studio)
- Datenimport aus SQL (CAST zu float, Filter: Speed>3, Federwege>0, |Roll|<60).
- Split → Train Model (Two‑Class Decision Forest – beste Metriken: Accuracy/Precision/Recall/F1 ≈ 1).
- Predictive Experiment → Multiclass Decision Forest → Web Service Deploy.
- Klassifizierung: „SAFE DRIVING“, „HIGH STRESS HIGH SPEED“ etc.
- Erkenntnisse: Fahrer neigt zu Rechtskurven, Lean unabhängig von Reifentemp/Speed, Wheelie bei Reifentemp >35 °C.
Montage am Motorrad (Ducati Monster)
- Zentraleinheit (Arduino, GPS, ADXL, LM35) hinter Sitz.
- TMP006 an Halter hinter Hinterrad (Abstand ~40 mm).
- HC‑SR04 vorne unter Scheinwerfer (Abstand Scheinwerfer–Vorderradkotflügel).
- HC‑SR04 hinten unter Sitz (Abstand Sitz–Hinterrad).
- Stromversorgung: 9 V Block / Powerbank.
Zukunftsausbau
- Pufferlogik bei fehlendem Mobilfunk (lokal speichern, nachholen).
- Xamarin-App für Android/iOS.
- Präzisere Sensoren, kleinere Zentrale (MKR1000/ESP32).
- Social WebApp: Gefahrenkurven teilen, Community-Sicherheit.
- Stream Analytics als ML-Datenquelle (Echtzeit-Training).
Code-Repositories
- UWP App (C#): github.com/lentzlive/MotorbikeArduino
- Arduino Sketch: github.com/lentzlive/BikeTelemetryArduino
Schaltplan

Fritzing-Datei: MotorbikeProject.fzz
Herstellungsprozess
- Sensor Telemetrie 2.0.1 – Fortschrittliche Temperaturüberwachung mit Azure IoT Hub
- KI-gestütztes Hindernisvermeidungssystem mit Arduino und Ultraschallsensoren
- Interaktives Gyroskop-LED-Display mit NeoPixel-Ring & Arduino
- DIY Arduino USB Gaming Controller – Bauen Sie Ihren eigenen High-Performance Gamepad
- DIY Wolken-Kostüm: LED-Streifen, Arduino Nano & SparkFun Teile
- Industrieroboter für Materialtransport – Linienfolger mit RFID & Ultraschall
- Pixie: DIY NeoPixel-Armbanduhr mit Arduino Pro Mini – Schick & Selbstgebaut
- Smarte Arduino-Trinkflasche: Echtzeit-Überwachung & Trinkerinnerung
- DIY Schattentheater mit Arduino 101 & adressierbarem LED-Strip (Blynk-Steuerung)
- Tragbares Überwachungs-Roboter-System mit Raspberry Pi & Android-App