We aren’t sure there’s enough information in the [We Make Machines’] video to easily copy their self-balancing bike project, but if you want to do something similar, you can learn a lot from watching the video. Building sufficient gyros to keep the bike stable required quite a bit of trial and error.
There are some tricks to getting a stable heavy weight to rotate without a lot of vibration and problems. The gyros go on the rider’s saddle, so you aren’t going to be able to ride in the normal fashion. However, a substantial motor drives the wheels so there’s no need to peddle.
The first attempt to self-balance stayed stable for about 10 seconds. Some of it was fine-tuning code, but noise from the gyros also threw off the angle sensor. A higher-quality sensor seemed promising, but it didn’t really fix the problem. Instead of using PID, the guys tried an LQR (Linear Quadratic Regulator) algorithm. Once that was sorted and a servo allowed for steering, it was time to let the bike roam free.
Then disaster struck as the bike lost its cool in a parking lot, causing damage. After repairs, they found issues that confused the angle sensor. They didn’t have the stomach to fit a third sensor onboard, so they put Billy the Crash Dummy onboard and decided to try to run him and the bike off a ramp. That didn’t exactly work out, though. After two attempts, the bike was effectively totaled, although Billy seems to have survived with no more than a bruised ego ..
Support the originator by clicking the read the rest link below.