.AI // Deep Learning Skateboard Brakes
I commute to the train every day on my skateboard. It’s a great way to get some exercise in, cut my commute time down, and brush narrowly against the thin veil separating a boring start to the day and trip to a walk in clinic.
In the summers I ride an electric longboard and a feature I miss the most is the ability to slow down or brake the board. Usually my rides are pretty normal, but sometimes I’ll experience that awkward fall or trip where the board will stay upright and quickly roll away. On the electric board, no problem — throw it in reverse, keep it stationary, walk up to it and jump back on. On a normal board, I’m sprinting to save the thing from it’s fate as a car’s new bumper ornament.
The idea for a fix was straight forward: A small brake system that would detect when the board was rolling quickly without the rider and stop the wheels accordingly.
I decided to make the solution much more complicated than it needed to be by injecting it with deep learning.
I’ve been wanting to dive into a project that would require an understanding of machine learning for a few years now. Every time I waded into the deep ocean that is programming tutorials and resources I would tread water until I burnt out and quit. This time I spoke about my ideas to a couple people and reached out to a few artists and coworkers who had tinkered with Python and machine learning libraries. Shoutout to them, because if they didn’t keep me going I would have let this project go like I have dozens of times before.
I was inspired by a video by Smarter Every Day where he showcases a system built by his friend to detect a dangerous event when cutting wood called “kickback”. He uses an IMU (Inertial Measurement Unit) to measure 3 axes of acceleration and rotation and magnetic heading. Armed with this example as proof my idea could work, I started researching methods of capturing data using Python and Raspberry Pi.
After hours of installing libraries, remembering how to write data quickly, chasing down weird clock speed issues, figuring out how to calibrate IMUs, deciding the IMU I bought was too noisy, un-deciding that, and then re-deciding it, I finally had some data to play with.
Unfortunately, without a crazy amount of filtering, I was looking at some extremely noisy data even when just doing some basic movements as a test. Chasing this issue down has been pretty annoying. This level of filtering would slow down the response time of my algorithm which isn’t something I want to do at this stage.
Eventually I came across an algorithm that would help interpret the data which netted me a much better result.
Breaking here for now. Had to make a big move and it’s stunted the development of this project.