Inspiration
Cyclists already juggle enough—cars passing too close, poor visibility at night, and the constant worry of leaving gear unattended. We wanted to build something that actively helps in both situations: safer riding and peace of mind when parked. VeloGuard started as a “smart lights” idea, but quickly grew into a full helmet safety system after we realized the same sensors could also detect impacts, braking, and suspicious movement when the helmet is left behind—and even generate meaningful insights after each ride.
What it does
VeloGuard: Ride Smart, Park Secure is a smart helmet system that combines visibility, safety automation, security, and AI-powered ride insights:
• Smart lighting system (WS2812B)
• Headlights + tail lights with automatic brightness using an external Grove light sensor.
• Gesture-controlled turn signals (APDS9960) for hands-free signaling.
• Brake lights that flash when braking is detected.
• Rear proximity alert
• Rear ultrasonic sensor detects if someone approaches within 2 meters and triggers a brake-light flash for visibility.
• Crash detection + action
• Uses the IMU to detect impacts and post-impact stillness, then triggers alerts/actions through BLE.
• Ride tracking + analysis
• Logs ride events (signals, braking, close-pass/proximity triggers, crash/pothole events) and shares to the phone app.
• AI-powered ride analysis (post-ride)
• Uses GPS + sensor data to generate a ride summary:
• Distance, time, average/max speed
• Elevation gain/loss, estimated climb difficulty
• Route “smoothness score” using IMU vibration + pothole frequency
• Pothole/rough-road hotspots (segments flagged on the route)
• Braking/close-call stats (how often you had to brake hard or had close approaches)
• Estimated calories burned (based on speed, duration, elevation gain, and rider weight input)
• Guard Mode (anti-theft / left-behind)
• If the helmet is moved or disconnected while in Guard Mode, the app can notify the user.
How we built it
Hardware
• Arduino Nano 33 BLE Sense Lite
• WS2812B LED strip (24 LEDs) split into:
• Right signal (4), tail/brake segment (8), left signal (4), headlights (8)
• APDS9960 for gesture input (signals)
• Grove Light Sensor (analog) for ambient brightness
• Rear ultrasonic sensor mounted at the back for proximity detection
• BLE connection to a phone app for mode switching, alerts, and logging
• GPS (NEO-6M) for speed + route tracking data used in analysis
Software architecture
We modularized the system so the main sketch stays clean and each feature is tunable:
• BikeLights renders all LEDs and handles animations (signals + brake flashing).
• GestureSignals maps gestures to signal commands.
• AutoBrightness uses Grove light sensor thresholds + hysteresis to set head/tail brightness without affecting signal/brake brightness.
• BrakeIMU detects braking using IMU orientation (gravity removal) + rotation rejection.
• RearProximityBrake reads ultrasonic distance and triggers a brake-flash event if something is too close.
• IMUDetector detects crash/pothole-like impacts and handles ride vs guard behavior.
• ModeManager switches logic between Ride / Guard / Off.
• BLE modules send events and metrics to the phone for logging.
• Google Gemini Integrated for advanced ride analysis, outcomes and summary.
Challenges we ran into
• Sensor conflicts and responsiveness: Using APDS9960 for both gestures and brightness hurt responsiveness, so we moved brightness sensing to an external Grove light sensor.
• False braking from head motion: Looking up/down caused false decel signals; we addressed this with orientation estimation, gravity removal, and gyro-based rejection.
• Car-like lighting behavior: Braking while signaling needed to preserve signal animations. We reworked the render logic so tail/brake and signal segments behave independently.
• Noisy ultrasonic readings: Distance jitter caused unwanted triggers; we averaged samples and added hold/cooldown logic.
• AI analysis alignment: Matching sensor events to GPS timestamps required careful logging intervals and consistent time bases.
Accomplishments that we're proud of
• A lighting system that feels “real”: smooth turn signals, clear brake flashes, and automatic brightness that doesn’t interfere with safety functions.
• Reliable braking detection that doesn’t fire from nodding.
• A rear proximity trigger that adds practical safety value during rides.
• An extensible modular codebase that integrates multiple sensors cleanly.
• Meaningful post-ride insights with smoothness scoring and rough-road detection.
What we learned
• Embedded projects become “product-like” when you prioritize state management, timing, and modularity.
• Real sensor data needs filtering (LPF/hysteresis), hold windows, and cooldowns to avoid noisy behavior.
• Gravity removal and orientation estimation are essential when using accelerometers for event detection.
• “AI” is most useful when it turns raw ride logs into actionable summaries—smoothness, hazards, effort, and trends.
What's next for VeloGuard: Ride Smart, Park Secure
• Richer AI ride reports: personalized insights over time (weekly trends, risk hotspots, braking patterns).
• Better pothole classification: distinguish potholes vs rough pavement using a lightweight model trained on labeled ride segments.
• Map-based hazard visualization: show close-pass zones, rough segments, and pothole clusters on the route.
• Improved energy tracking: integrate rider profile + heart-rate (optional) for more accurate calorie estimates.
• Power optimization: deeper sleep modes, battery monitoring, and smart sensor scheduling.
• Companion app polish: live dashboard, configuration UI for thresholds, and exportable ride summaries.
Log in or sign up for Devpost to join the conversation.