‘Twas the night before the hackathon. As the team was meeting together to brainstorm ideas and looking through the list of available equipment, the accelerometer caught our eye. What could we do with measuring acceleration, we thought. Then inspiration struck us. As post-secondary students that don’t drive in the city, we often require Uber and other ride-hailing services for transportation. It hit us that perhaps we can make something that rates how smooth a driver is. A solution for this could then be used for self-improvement for driving. In addition, it would be integrable with ride-hailing services to provide a rating of drivers that volunteering for this option. This could be an amazing feature for high-end services or one that tailors towards people with special needs.
In particular, one team member has had significantly negative experiences with certain Uber drivers. He has repeatedly fallen victim to “aggressive” drivers who have decided that rapid acceleration and deceleration is acceptable, prioritizing their driver experience over that of the passenger(s) they are transporting. As a result, he shared his vision of a future where he can see a driver’s smoothness stats on the road, such that he, as well as those who may suffer from motion sickness, may experience a better and more comfortable ride.
Summary of Learning Experience
Throughout the 24 hours provided to us, we went from no knowledge of Arduinos to implementing an accelerometer that transmits live data to a CSV file, which in turn provides us with the necessary information to measure the limit of reasonable comfort. Navigating between endless tutorials, invaluable mentor help, and insightful workshops, we managed to connect the pieces together to develop a working prototype.
How We Built
We started by determining the objectives to be fulfilled by our program: 1)Import data from accelerometer using Arduino, 2)Determining a proper metric through research, 3)Parse/Analyze data to output a measurement, 4)Display result through a user interface.
Then we essentially each started working on our respective part.
In order for the Arduino to communicate with your PC, it utilizes the serial protocol through your USB port. It does this by encoding what are called objects which are essentially strings of bites, and sending them in packets to be received in the serial monitor. The challenge we faced was being able to get feedback from the accelerometer in a parse-able format. The final solution, after many hours of reading through documentation and heavy debugging, we were able to initialize both the setup and looping phases of the Arduino. To read the data outside of the serial monitor, we used PySerial, a python library that allows a PC to send and receive information through the serial port. PySerial alone takes a minimum of two hours to understand, something we discovered early on, thankfully. PySerial allowed us to decode the output of the accelerometer and store the data into a CSV containing two columns of x and y acceleration
Determining A Metric for “Smoothness”
For measuring a reasonably acceptable standard for comfort we consulted numerous research papers on ride quality. In particular, a study from Uppsala Universitet provided us with the necessary rigorous research necessary for determining a threshold of comfortable acceleration, shown in the table below. Then, we referenced a paper from another university that uses a method to determine the aggregate comfort of a ride using a threshold. This method calculates the frequency of the driver exceeding the threshold.