Self-balancing reaction wheel toy
Santeri Hurnanen, Eero Moisio, Oskari Koskinen
The goal of this project is to build a device that can balance itself using reaction wheels. The device will look like a miniature bicycle and it will keep itself actively balanced.
An additional goal is to incorporate a motor driving one of the wheels and a servo motor that can steer the bicycle. The steering and drive of the bicycle are intended to be remotely controlled.
The idea of the project is to utilize Newton's second law to balance the object. When our object starts to tilt away from its equilibrium point, a flywheel perpendicular to that axis is accelerated in the so-called tipping direction. As the engine accelerates the flywheel, it generates a counter-torque in the opposite direction of the tilt. Since the engine is attached to the object, with properly adjusted counter-torque, the object can maintain stability.
First step was to get data from sensor, which will be used to control the motor
To demonstrate and practice the principle of balancing the object, we have designed and 3D-printed a prototype.
The counter-torque created by the motor is demonstrated in the video. We are using a DC motor and an H-bridge for this purpose.
List of components:
- esp32 development board
- 12V DC-motor
Adafruit LSM6DSOX + LIS3MDL - Precision 9 DoF IMU.
- SparkFun Motor Driver - Dual TB6612FNG (1A)
- 12V powersupply
- Breadboard and cables
In short, microcontroller reads data from the IMU and then gives pwm signal to h-bridge and that controls the motors (white and yellow cable from red board).
In the code there is PID-controller whose values can be changed to suit your setup.
Footage of the project
Reaction wheel is 3D printed and M3 bolts are threaded in to the wheel to give it more torque. Reaction wheel is attached to the DC-motor with glue and heat. Body is made from thin plywood and bolt and nuts acts as bearing.
Challenges and outcome
As you can see the project didn't work as it should have. Reaction wheel didn't have enough torque to pull the body to the center. With correct mechanical design project could have been a major success. Code of the project worked well and motor reacted to angular changes, but not with enough force.