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.
I’ve been using the same engine controller for a robot very similar. After a few months I have managed to become operational. I still have to improve a lot.
Ehy, that’s really very similar to my design it looks even more stable
Is there a page about your project with more details and info? i’ll be happy to see how you implemented it. If not, you could consider adding your robot it to this site, i’m sure others will be happy as well.