Superbike
My work on an all-electric motorcycle through Washington Superbike!
The point of Superbike is to make an electric racing bike from scratch to compete in the biennial Motostudent competition. At UW’s Superbike team, I worked on the firmware subteam, helping manage embedded systems on the bike.
Much of my work was devoted to calculating the state of charge of the bike at any given time. This is harder than it seems due to several variables that change the battery life. I had to find a way to accuratley find the amount of “juice” left in the bike at any time taking into account temperature, number of cycles previously ran, and previous charge capacity. The calculations were complex, and involved integral calculations which could not be done on the 3 MB microcontroller on the bike:
In order to make the function work, I decided to implement it as a riemann sum instead of an integral. This introduced some error, but the reading was within 4% in tests which we deemed good enough. Implementing the State of Charge function in the actual firmware was more than writing a simple sketch however. I had to learn about RTOS and add a priority to my task in order to make it work. All in all, I learned a great deal about low-level systems programming in C through this project, and hope to keep working with embedded systems in the future.