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 pedal.
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.
We were dismayed that they didn’t really complete the project, but it does seem like they learned a lot, and maybe that will help someone else out in the future.
We have seen working bikes before. We also have seen some truly strange bike projects.
It seems like they just assumed that turning the bicycle’s handlebar towards the desired direction is the way to steer. It is not, and it’s somewhat ridiculous that they spent so much time engineering and building the wrong method of balancing the bike without stopping to think about how a cyclist balances in real life.
at least they managed to make a trackstanding robot. (and, full fairness, it did trackstanding a lot better than i can.) but it does sort of seem like they were just getting to the really interesting problems around two-wheeled balancing, then gave up. maybe they’d’ve been better served with a set of accelerometers than an angle sensor?
For those interested. When you turn a bike you actually turn the bars the opposite direction initially just a little which throws your weight into the turn, banking you the correct direction. Then you turn jusssst the right amount in the correct direction to kinda catch yourself. Try next time you’re a bike it’s really cool that we do this all subconsciously.
Oh one other fun thing- I read an argument somewhere that the high school physics bicycle wheel angular momentum thing is not really how you “balance” on a bike. The argument goes that you can balance on a bike just fine going super slow. Or during a track stand basically motionless. Or that rollerblade wheels are tiny and you can balance on their fine. Even better an ice skate. Bicycles are super cool no wonder hackers love them.
I’ve not found their system model, but if they’re using an LQR, then they are certainly using a system model of some kind. I don’t think it would be difficult to find some openly available bicycle models on the web. Anyways, as soon as they have a decent model in place, then the model would tell the LQR how to control the bicycle by steering first the wrong direction, followed by the intended one. They should be able to test this offline with Matlab or Python… but oh well. These “formal” methods don’t seem to be common practice amongst “Makers” on social media.
They could have tuned their algorithm to bias one flywheel over the other to make the bike lean into a turn. This would preclude having to steer the opposite way initiallly.
it’s an error i see a lot of native anglophones making, but for some reason it always grates on me: “peddle” is not the same word as “pedal”, and they shouldn’t be used interchangeably.
I thought maybe they were going for “no need to peddle [on YouTube]”, which obviously didn’t make much logical sense.
shutters
I did LOL!
Thanks!
Aren’t bikes pretty much self-balancing already? I’m pretty sure I’ve seen a fair few videos of bikes without riders going just fine after a start.
not at all. they are unstable. try it yourself- push a bike down the drive or a hill and see if you can get it to go very far. high school physics classes like to talk about how the rotating wheel acts as a gyroscope and stabilizes the bike but that effect is very small and not enough to make a bike self balancing. people, even my clumsy self, can balance just fine on a non-wheel single ice skate just fine. Motorcycles can be a little different since the wheels are a lot more massive than bike wheels, and also they just usually are going much faster when the rider falls off, leading to the occasional ghost rider situation. But it still isn’t self-correcting.
In the motorcycle example you’re discounting the gyro effect of the rotating mass inside the engine as well.
Check out some videos of Police Motor Unit competitions. Those guys pull off some insanely tight corners at very low speeds by utilizing the engine RPM and slipping the clutch to help with balancing
It is absolutely self correcting, but not perfectly, and definitely not when riderless. The rider doesn’t just add extra control inputs to the system (and most of that is just damping), they also raise the centre of mass. That is critical for reducing the correction needed for any disturbances – just try balancing a broom vertically on one hand and then try balancing a pencil the same way.
tell you what. you put a human size and weight dummy on a bike, then push it down the driveway. “self correcting but not perfectly” means it will fall the heck down. It is not self correcting. it just fails more slowly or, maybe, less fast-ly if you prefer. it does not correct itself. maybe my English is bad or something. Maybe “unstable equilibrium” or “non-local minimum” or something is a better term.
There’s a long list of ways a two-wheeled vehicle may be made to turn into a lean, thus correcting itself, and why being out of whack will lead to under or over correcting. https://en.wikipedia.org/wiki/Bicycle_and_motorcycle_dynamics#Trail
Yes they are.
https://www.youtube.com/watch?v=oZAc5t2lkvo
A substantial motor means you don’t have to peddle? What is he trying to sell that requires the motor to be substantial? On the other hand, pedal might be a more fitting word.
So some people try to build a self balancing bike, fail, and destroy everything.
What a waste, this is why I hate the current state of YouTube. Grumble grumble get off my lawn
I dunno, watching people fail can be pretty funny. Honestly I almost never watch the videos but I skimmed this one- i wouldn’t say it was a fail at all really, there were numerous incremental wins. The bike sort of started there motionless then went itself across the grass and stopped again. pretty cool. And it was pretty funny to watch all that work self-destruct and the dummy’s head go rolling off, so that’s a thing too
A sad demise. Rather than an expensive sensor, they could have used a $10 contactless potentiometer on one of the gyros gimbals. Presto.
when i was a kid, i discovered that you could jump off the back of a moving bike, and it would keep going for some distance. and an old guy saw me doing that and said “you’re destroying the bike for no reason.” and i’m with old guy now