Inspiration
As an off-campus commuter, I have observed several instances where cyclists are unintentionally hit by cars. A common pattern I've noticed is that cyclists sometimes veer too close to vehicle lanes from their designated bike lanes. After speaking with friends who bike to campus, it seems that many cyclists are often unaware of cars approaching from behind. By the time they hear a vehicle, it is often too late, especially if they have drifted too close to traffic and the driver does not react or slow down in time.
What it does
We developed a clip-on camera that can be easily attached to the rear of a bicycle to monitor approaching vehicles. When a vehicle enters a predefined range, the system alerts the cyclist with an audible warning, prompting them to steer clear of the vehicle lane if they have drifted too close. This safety feature helps cyclists stay aware of their surroundings and avoid potential hazards from approaching traffic.
How we built it
This project leverages the YOLOv5 object detection AI to identify vehicles approaching a cyclist. The AI detects cars or trucks and assigns a confidence score to each detection, reflecting how certain it is that the object identified is a vehicle. Based on this information, the code generates a boolean value, which is then transmitted to the Arduino. By integrating the Arduino Uno with our Python-based AI, we ensure that when the AI detects a vehicle with high confidence and returns a "true" boolean value, the Arduino activates an alert through a speaker, notifying the cyclist of the approaching car.
The breadboard circuit utilizes two 1k ohm resistors and several jumper wires, connecting the speaker to the power output from the designated Arduino pin, as specified in the code. After powering the speaker, we initially used a photoresistor, connected to the analog pins, to regulate the voltage output from the Arduino. However, the photoresistor was later replaced by a camera-based AI detection system, which more effectively modulates the output by providing real-time feedback based on environmental conditions, improving accuracy over the manual photoresistor setup.
Challenges we ran into
Initially, our plan was to implement color detection and monitor pixel changes in the background to identify approaching vehicles, which would then trigger the signal to the Arduino, alerting the cyclist. However, we quickly realized that many factors, such as pedestrians, traffic lights, and scooters passing by, could interfere with pixel changes, leading to false positives.
We also intended to play a custom audio file we recorded, instructing the cyclist to move to the right. Unfortunately, due to the Arduino’s limited memory capacity, we were unable to store the audio file, as it exceeded the available byte allocation. This issue could have been easily resolved by integrating an SD card, which would expand the Arduino's storage capabilities, but we were constrained by the materials available at the time.
Accomplishments that we're proud of
One of our key accomplishments is successfully detecting when the camera identifies a car or truck exceeding our predefined threshold, triggering an alert for cyclists about approaching vehicles. While this may seem straightforward, the camera is capable of recognizing a wide range of objects, such as cups, cell phones, pedestrians, and even various breeds of animals. The ability to precisely filter and isolate vehicle detection, ensuring it produces an accurate true boolean value, was a significant technical achievement.
What we learned
Throughout this project, we gained invaluable experience in the integration of AI, hardware, and real-time problem-solving. One of the primary lessons was the importance of precision in object detection. While our initial goal was to simply detect vehicles, we soon realized that a high level of specificity was crucial. The AI's ability to differentiate between a car and various other objects such as pedestrians or smaller items like cell phones was essential in preventing false positives. This taught us how to fine-tune detection thresholds and balance accuracy with real-time responsiveness in order to produce reliable results.
Additionally, this project reinforced the importance of flexibility and iteration in the design process. We initially explored using photoresistors and pixel-based detection to identify approaching vehicles, but after recognizing the potential for numerous environmental variables to interfere with accuracy, we adapted our approach. By shifting to a camera-based AI system, we achieved greater precision and reliability. This adaptability in problem-solving and the ability to pivot when faced with technical challenges were key takeaways from this experience.
What's next for BikerPro
The next steps for our product would involve refining both the hardware and software components to enhance performance and user experience. Upgrading the system’s memory and processing capabilities, possibly by integrating an SD card or using a more advanced microcontroller, would allow for the storage of custom audio alerts and more complex functionalities. Additionally, improving the accuracy of the object detection algorithm by fine-tuning the AI model or incorporating more sophisticated technology will help reduce false positives and deliver more reliable alerts to cyclists.
Log in or sign up for Devpost to join the conversation.