Show HN: A Vibrator Helped Me Debug a Motorcycle Brake Light System
4 days ago
- #hardware hacking
- #DIY electronics
- #motorcycle safety
- BrakeBright, a motorcycle brake light system, has received positive feedback from riders worldwide.
- The device includes a USB port for free firmware updates and improvements.
- A long ride revealed an edge case where the brake light flickered at constant high speeds.
- The motion sensor in the hardware is indiscriminate, reacting to all G-forces similarly.
- Initial solutions included averaging data over short windows and using a low pass filter to reduce noise.
- Switching to median filtering helped ignore outliers and better reflect real ride behavior.
- Sample timing was crucial to avoid syncing with engine vibrations, leading to false positives.
- Adding jitter to the sampling interval prevented synchronization with engine pulses.
- A repurposed vibrator was used to simulate high-frequency engine vibrations for testing.
- The system now includes a debounce delay to confirm braking signals before activating the light.
- If the light turns off within a second, the system increases the debounce time to filter out false positives.
- The debounce time decreases during smooth rides to maintain responsiveness.
- Continuous testing and updates are driven by real-world feedback and riding experiences.
- A special discount code BLOG20 offers 20% off for readers.