Awesome. This is a project I’ve really wanted to tackle, but I’ve put it off so far because of how expensive it would be. I definitely want to see how yours comes along, maybe it will inspire me to finally get started on mine
You know there’s a lot riding on you: EVERYONE wants to see this work! Specially me, since I’ve done it before, but I think your solution will be a LOT neater mechanically. Mine was completely in assembler and it JUST ABOUT worked.
I, too, am a programmer. I do jet engine control systems. What do you do? (Please don’t say “databases and web pages”!)
I wouldnt say a self I wouldnt say a self balancing robot is the holy grail of a robotic hobbyist. To me a holy grail robot would be a room exploring, plethora of sensors, inductance charging station (so it can get near it and charge the batteries) GPS tracking, Gyro sensing (knows which direction it is going in) and a wireless RS232 communication with a computer so it traces its course.
Uhm that’s a little worring if you do jet engine control systems and had difficoulties, what can i do?
I saw your balancing robot on these pages… How was the code like? did you used raw input or with some filtering? (edit: forget it, i remembered your post here :P)
Anyway, i do databases and web pages But that’s just work, i did more interesting projects at home as open source. Mainly they’re (sometime unfinished) videogames: for example FunkyCars and The Sheep Killer. I also did Space Cadett, a space shooter for a game develoment competition which involved some heavy math… (i scored 5th :P)
Not alone Hehehe! Not on my OWN! There are, like, 40 of us. Now, if I had a team of 40 working on a balancing co-axial wheeled robot with the budget for a jet engine controller… THere would simply not be any limits! Haha! I’m the same. Programming fun happens at home!!!
I’m actually reading the values every 20 ms, so it’s 50 times per second.
The gyro is not integrated, it is fed to the kalman filter stuff.
The acelerometers aren’t really converted or integrated too. I have two of them, one pointing forward and one pointing up, and the values are fed directly (well, after subtracting 511 to normalize) to the atan2 function, which calculates the angle. It doesn’t care the unit of measurement as long as both value use the same.
Good design Nice, sturdy looking design. I trust you’re going to mount the batteries (probably the heaviest component) quite high up? I found it easier to balance if the weight was quite high. Also, if the weight is too low, it’s difficult to move position. You have to allow it to fall forward, then get the wheels to catch up, so if the whole thing’s too light and the weight is too low, it will only move slowly.
Yes, that’s the idea. Those Yes, that’s the idea. Those L-shaped pieces should hold two lateral “walls”, and i’ll add another deck (or a couple). And at the top there will be the battery. Men, that robot’s gonna be heavy! Those motors already weight a lot! I think i’m at the limit with my syntetic glass, i’ll add some reinforcement on the way…
My experience was that if the mass was higher, more correction was needed, which worked well for my system as it seemed to always over-correct anyway. In this case, I’m not so sure. It seems to be falling too far too fast already. I haven’t thought about it, but raising the battery might make it tak elonger to fall…
Can you adjust the program so that the motors accelerate more quickly?
Yes, it will make it take Yes, it will make it take longer to fall. And the motors cannot get the last speed, it seems, so therefore. Change nothing, just raise the bat a bit, is what Dr Clever here says
but i don’t know about making the battery higher. The fact is that the battery is very heavy (1,15 Kg), so it have a lot of "intertial force. When it get tilted over a certain angle, the robot just cant make it enougt to restore the position… it’s just about weight, not about falling speed.
I was considering trying to put the battery vertical to distribute the weight along the body.
Also, the software filter adds a little lag, just about a tenth of second, but it’s enought to make it wobble back and forth when the robot is hit.I have to correct this, it looks likeit will block any development…
Actually, I’ve been giving some thought to Professor Frits’ wild outburst. Raising the battery will give you more time to correct a fall. I know it’s counter-intuitive, but it stands a fighting chance of working.
Have you given any though to how you can get it to move around? My feeling was that you have to allow it to fall a little, but not quite catch up. This means if you want it to go one way and it doesn’t want to fall that way, you have to force it to drive the “wrong” way to cause it to start to fall.
Getting it to drive down a slope will be lots of fun to code!!
To move it around, i concluded that the best thing is to just change the value for “straight up”. That is: to make it stable, the program tries to keep the robot angle to 0°, correcting as needed. If you force it to keep the robot angle to say 2°, it will keep that angle, and the only way is to have a fixed speed forward. I haven’t tested it but i’m almost sure it will work.
I think that, once the robot is as stable as i want it, slopes should pose no problems. If the robot is straight up, it shouldn’t fall becouse of the slope, and the wheels should just keep it on the same spot…
Did any of you consider doing the broomstick experiment before making suggestions about battery placement? Even as a thought experiment. I did. The longer the broomstick, the more time I have to correct the angle.
As an aside: Nicola, try to get a feel for your controller’s job. Do it yourself. Pick up your bot by the wheels en try to balance it yourself. As if it were a broomstick. That way you will be able to tell if raising the CoM (Center of Mass) will make it easier or harder.