Gyroscopic stabilization

Hello, I want to create a small model (about 8-10 in) that sits on two wheels in line with each other, like a motorcycle. The only thing I want to install on vehicle is a gyroscope that is controlled by a servo to get it to balance. Any ideas on how to approach this? I could not find much online about people doing this.

Google "self balancing bicycle robot" for lots of examples.

ben_meyer:
Hello, I want to create a small model (about 8-10 in) that sits on two wheels in line with each other, like a motorcycle. The only thing I want to install on vehicle is a gyroscope that is controlled by a servo to get it to balance. Any ideas on how to approach this? I could not find much online about people doing this.

Greetings.

A gyro, a.k.a. as rate gyro, will give you the rate of gyro precession in degrees per second or some other increment of time measurement. In relation to your device falling over a gyro data output is slow. Gyros tend to drift over time.

Accelerometers can be used to give an angle of tilt with a fast data rate. Unfotunatly, accelerometers are noisy.

Fortunatly, using both gyros, accelerometers , and math these issues can be compensated.

Many people start out with a MPU60X0 gyro/accelerometer module. They can work. I used one for nearly a year to hold an XY platform stable.

After a time, I decided to try another MPU module, a MPU9250. The MPU9250 has shown itsself to be a number of steps above the MPU60X0 modules.

The library, for the MPU9250, I settled on is the Bolder Flight Systems library for the MPU9250. Initially the reason being is that this library works with a ESP32. After digging into the library and using its functions, I found that much of the code I had wrote to operate the MPU60X0 was not needed. Between the features of the MPU9250 and the Bolder Flight Systems library, I only used, from the MPU60X0 the code for the complementary filter. The MPU9250 has good low pass filter capibilities that the Bolder Flight Systems library makes use of. I cut out the low pass filter code from the complementary filter code.

I am satisfied with my current combination of MPU9250 and the Bolder Flight Systems library to the point that I no longer tweak that portion of my code for operational improvement.

Hope this helps in your decision making process.