Back to All Events

Self-Balancing Bicycle

In this project, the concept of a self-balancing bike was investigated and tested on an actual bike. The dynamics of bicycles were investigated, and multiple possible models were found. Using the available information, preliminary PID values were created based on the model of an inverted pendulum. Code was then written for the pyboard that cleaned up the data from the sensor and controlled the actuation of the bicycle's handlebar based on the PID. However in testing it was found that the actuator was too slow to make the necessary corrections to stop the bicycle from falling over.

System overview with the green boxes being internal to the plyboard.

System overview with the green boxes being internal to the plyboard.

To improve this project the most needed improvement is with the actuator. With a faster linear actuator it is likely that the controller could successfully counter steer a few times to keep the bicycle upright. Upon using a faster actuator, other issue may be exposed such as in the cleanliness and accuracy of the data from the accelerometer. Furthermore since the bicycle balance is also dependent on bicycle speed and desired turn radius, further data may be needed to create a more robust system. Further divulging from the current system, a gyroscope could be used in place of the linear actuator. Such gyroscopic systems have been implemented on other two-wheeled vehicles successfully.