News & Articles

PyroEDU
Get started learning to build your own electronics by following our FREE online courses below!
Learn More »

Categories

Sponsors

Build Like A Pyro!
Find many of the parts used on this site at our favorite online electronics shop
Take Me To The Gadgetory!
Self-Balancing Electric Unicycle

Posted March 9, 2012 by Chris

“To estimate its orientation, Bullet integrates readings from the gyro and accelerometer using a complementary filter. To balance, the angle estimate is fed through a PID loop (with no integral term). The loop runs at 625 Hz. The output from this stage determines the duty cycle of a 1.22 kHz PWM signal, which is connected to the H-bridge. The code was written in C, and is in the public domain.”

Leave a Reply