Project Overview
Motorcycle theft is a major concern. This DIY tracker provides commercial-grade security at a fraction of the cost.
Features:
- Real-time GPS tracking
- Motion/vibration detection
- Geofence alerts
- Backup battery
- Waterproof enclosure
- Mobile app notifications
Components
- ESP32: Main controller with WiFi/BT
- NEO-6M GPS: Location tracking
- SIM800L: GSM/GPRS for alerts
- MPU6050: Motion detection
- 18650 Battery: 3.7V backup power
- TP4056: Battery charging
Assembly
// Wiring
ESP32 → NEO-6M GPS
VCC → 5V, GND → GND
TX → GPIO17, RX → GPIO16
ESP32 → SIM800L
VCC → 5V (2A capable)
GND → GND
TX → GPIO4, RX → GPIO5
ESP32 → MPU6050
VCC → 3.3V, GND → GND
SDA → GPIO21, SCL → GPIO22
Firmware
#include <TinyGPS++.h>
#include <HardwareSerial.h>
TinyGPSPlus gps;
HardwareSerial gpsSerial(1);
void checkMotion() {
int16_t ax, ay, az;
mpu.getAcceleration(&ax, &ay, &az);
if (abs(ax) > THRESHOLD || abs(ay) > THRESHOLD) {
sendAlert("Motion detected!");
startTracking();
}
}
void sendAlert(String message) {
// Send SMS via SIM800L
sim800l.print("AT+CMGS=\"+1234567890\"\r");
sim800l.print(message);
sim800l.write(0x1A);
}
Mobile App
Use Blynk or ThingSpeak for mobile dashboard:
- Live map with bike location
- Movement history trail
- Geofence setup
- Alert notifications
- Battery status
Installation Tips:
- Hide tracker inside fairing or under seat
- Connect to motorcycle battery with fuse
- Ensure GPS has sky view
- Waterproof all connections
- Test before final installation
Next Steps
- Add engine kill relay
- Implement ride tracking
- Add crash detection
- Integrate with insurance
Related: Fleet Tracking | GPS Tracking