Due to the increase in popularity of bike sharing services, we developed a process that rewards good users and limits the reach of bad ones.
Project Origins and GoalsThe idea for this project got realized as part of a school project for our Internet of Things university class. The goal was to create an IoT product that utilized machine learning on an Arduino Nano 33 BLE Sense which would then feed the data to a user terminal via Bluetooth. Of course we also created an Android app so that the recieved data could be displayed in a neat and user-friendly manner.
The project as such is split into three larger tasks:
- Creating the machine learning model
- Creating the mobile phone app
- Enabling Arduino's Bluetooth connectivity
We started our work by gathering data that could then be fed to a machine learning algorithm. The website Edge Impulse has everything one could wish for when making such projects with many handy tools. One of them is a really simple way of gathering the necessary data. All one has to do is to simply connect their mobile device and any recordings of its sensory information can be uploaded directly into the ML project on the website. We gathered data of driving the bike on the road, off road on the grass, when being still and when going of the curb.
The creation of the machine learning model was then a relatively simple task. After choosing a processing and a learning block of an impulse we were able to train and test the model. In the end its prediction accuracy reached about 87%. The details of the model's training can be seen on the bottom two images.
The testing results were not as accurate as we hoped (55% accuracy), so there is still room for improving the model.
Arduino FirmwareCreating a program for the model to run on an Arduino board is by itself fairly easy as well. The procedure is to simply import the.zip library built by Edge Impulse, open the acceloremeter_continuous example from the examples list, and upload it to your device. In its default state however, you can only use it to send data to your computer via the USB cable and IDE's serial monitor. As one of the main project's goals is being able to stream data to a mobile device, we had to do better. To implement BLE connectivity we decided to use code from another IDE's example: battery monitor. While requiring a bit more programming know-how it was still a relatively simple process of copying and pasting appropriate lines of code to the right places and then editing a few of strings. The final thing we did was adjusting the output of the predictions so that the board would send a 1 when it detected a negative action and 0 when it wouldn't. The full program is listed under the Attachments section but on the images bellow there are highlights of the changes done to the original Edge Impulse code.
The application was made as a backend surveilance tool, that gives bike sharing service operators an insight into how their bikes are being used. Currently the app starts each user with 50 points, but the idea is that our app is implemented into the existing bike sharing network, where each user would have points linked with their profile. This would enable bike sharing services to limit the reach of "bad" users to lower rated bikes.
If the sensor detects a misuse of a bike, such as riding on grass or riding over a big gap too fast, points are deducted. To gain points, one has to ride for a certain amount of time, without errors. The app also tracks the total sum of points lost in the current ride as well as its duration.
The app was made in MIT App Inventor 2.
Comments
Please log in or sign up to comment.