Final Project: Bicycle Blackbox - Spicca/MTEC2250 GitHub Wiki
Summary:
For my final project, I wanted to create a product that attaches to a bicycle that would allow the rider to record any instance of an accident. The bicycle blackbox uses an accelerometer and gyroscope to judge whether or not the rider is in a situation of danger, that is, any sign that the bike may have tipped, accelerated, or decelerated during the ride. Once an instance of an accident is found, the blackbox would tell the Arduino to record the data onto a standard SD card. The SD card could be used later for information on an accident report such as a police report. This project was motivated by a car crash I was in, where the police report recorded had the wrong information. I decided to add a backlight to the product to replace the space that a bicyclist would normally place their indication light for other vehicles. The LED array added is customizable and includes several frames to notify vehicles around the bicyclist of their presence, especially in a night time setting.
Initial Project Ideas:
https://github.com/Spicca/MTEC2250/blob/master/wwwwhworksheet2.pdf
https://github.com/Spicca/MTEC2250/blob/master/Screen%20Shot%202016-05-25%20at%2012.28.35%20AM.png
https://github.com/Spicca/MTEC2250/blob/master/BicycleBlackboxPowerpoint.pdf
Code Plan:
https://github.com/Spicca/MTEC2250/blob/master/Screen%20Shot%202016-05-25%20at%2012.26.54%20AM.png
Intended Users:
- Casual riders
- Commuter riders
- Professional riders
Components Used:
- 1 3D printed blackbox (OnShape)
- 1 3D printed lid for the blackbox (OnShape)
- 1 Arduino Uno
- 1 9v battery for power
- 1 LED array to replace riders light
- 1 SD Card shield
Issues:
Many of the issues that arose with building this project involved sizing in the 3D printed parts. Some of the parts did not fit when finally printed. For instance, the lid on the blackbox needed to 2 securing pegs to be removed, which hindered the lid from staying closed. This would effect the product in the case of a strong hit or dropping of the rider's bike. The 3D printed box prototype was much bigger when printed than I had expected. For prototype purposes, I decided to use the larger box to ensure that each component would fit with ample room. Anticipating a smaller SD card reader, my initial box design featured a slot for the SD card to be inputted or removed, but the slot did not meet with the shield inside the box on the board. I also found that the information being recorded from the gyroscope and accelerometer was difficult to save to the SD card reader and writer. The information from the accelerometer also gave unnecessary information like a z axis which needed to be removed from the code. In terms of the physical design, the box held every component, but was very close to full. Also, the clamp to hook to the bike post was very tight fitting and may wear or break over multiple uses. The allocated space for the LED array was also too large so a adhesion or fitting would be needed to be able to secure the light in place.
Future Expansion/Improvement:
Something I hope to improve upon for future versions of the bicycle blackbox, would be to secure the casing to allow for extreme impact, allowing for protection for the arduino and components inside. I would also like to scale down the box and optimize the space to make it both smaller and lighter for the rider and cope with the limited space available on the bike. One remedy would be to downsize to a Arduino Nano to compute with as well as a smaller breadboard. With optimizing the size, I would ensure that external pieces, like the SD card reader, would meet with the boxes allocated spaces. This problem was noticed with the initial print of the 3D part. Adding more features like an on-switch to the 9v battery supply and visual assurance like an LCD screen for the rider is not needed, but would improve the usability of the product for the rider to be able to see if the micro controller is working correctly rather than finding out after the fact.
Arduino Code:
https://github.com/Spicca/MTEC2250/blob/master/BicycleBlackboxCode.txt
3D printed parts:
https://github.com/Spicca/MTEC2250/blob/master/Screen%20Shot%202016-03-21%20at%2011.34.40%20AM.png
Final Product:
https://github.com/Spicca/MTEC2250/blob/master/20160525_120555.jpg
https://github.com/Spicca/MTEC2250/blob/master/20160525_124729.jpg
https://github.com/Spicca/MTEC2250/blob/master/20160525_125437.jpg