Dangerous weather warning
Automatic bike lights
With the endemic cycle theft in Cambridge, our team wanted to create something which could help owners to monitor their bikes remotely. We also saw an opportunity to improve the safety while riding by utilizing various sensors on the Mbed board.
What it does
Our device has two modes, alarm mode and riding mode. When in alarm mode, movement of the bike is monitored using an accelerometer, and data is sent to a server. When unexpected movement occurs, an alert can be sent to the user to warn them. In riding mode, we created an object warning system, which looks at the distance to approaching objects and then calculates whether or not the deceleration is large enough to stop in time. The user is warned with flashing lights if they are not slowing down fast enough. At nighttime, headlights turn on automatically based on the light level. In dangerous weather conditions, an alert is displayed to warn the user of slippery roads, and an extra factor is applied to the stopping distance calculations. A mobile interface allows the user to monitor weather/air quality conditions in order to make a decision as to whether or not it is safe to ride the bike.
How We built it
We built a web backend using PHP and MySQL to save data recorded by the Mbed cloud, and then queried this data as required. Alerts were configured using IFTTT. C++ code was written to run on the Mbed platform, which included taking measurements from the sensors and then uploading it to our web server.
Challenges I ran into
The main issues we had were with C++, since none of us had much experience with this language. Formatting and querying the data was also a challenge.
Accomplishments that I'm proud of
We have all improved our knowledge of C++, and of building IoT devices.
What we learned
We are now much more familiar with using the Mbed cloud hardware, and with integrating multiple platforms to create one solution.
What's next for Mbed Bike Monitor
Given more time and equipment, we would use distance sensor with a greater range, to provide earlier warning. We would also link bike headlights to the board, rather than just the LED's on the Mbed. It would be useful to have GPS tracking in order to locate the bike if it is stolen. Also a mobile data link would be needed, to keep constant connection with the bike.