DPRG
DPRG List  



[DPRG] Balancing Robots

Subject: [DPRG] Balancing Robots
From: Karim Virani karim at bigthought.org
Date: Wed Dec 3 16:01:59 CST 2014

I thought so too. If I'm balancing a pole on my hand, it helps if there is a large weight on top of it.  Nicely slows everything down and provides a better visual marker for gauging movement.

But what inertia giveth, inertial also taketh away.  The problem is different for a robot. Particularly if you are using just a gyro sensor.  Remember, it's an angular rate sensor - in order to give good information, it needs to be rotating.  The faster it is rotating, the more clear and actionable your signal will be. This is particularly true for mems gyros which are rather noisy compared to higher-end technologies.

Though your microcontroller can react faster and more consistently than a human nervous system, a gyro-based robot is still dependent on angular motion. It's kind of like Drunken Master - it needs to see large (relatively - this could actually be just a degree or two) changes to actively balance.

What this means is that the robot will have a kind of dead zone around the balanced (actually non-rotating) state before you get good signal.  The nature of this dead zone will vary based on the sensitivity and quality of the gyro and how fast the microcontroller can read and process the signal into motor control.

So for any given sensor/controller combination, the angular motion it needs to experience before correction becomes a given. If you put your COG up high, you have that much more momentum to correct, so you'll need a beefier drivetrain.  You'll find that the base will have to travel farther to catch up with and correct the COG, with an actually greater chance of encountering an environmental obstacle. And to wrap it up, the bigger they are, the harder they fall.

This is a simplistic description, but from my vantage, making a robot tall or putting its COG up high is not a way to ease the balance problem.  It is a choice driven by other considerations like wanting to interact with standing/walking humans.


________________________________
From: dprglist-bounces at dprg.org <dprglist-bounces at dprg.org> on behalf of Dennis Clark <dlc at frii.com>
Sent: Wednesday, November 19, 2014 6:16 AM
To: k5rud at arrl.net
Cc: dprglist at dprg.org
Subject: Re: [DPRG] Balancing Robots

I would think that with a balancing robot that inertia would be your friend. I would put the battery as high up as I could. Sure, it is harder for you to change tilt direction, but it is also harder for external factors to change it too!

DLC
--
----------------------------------
Dennis Clark
----------------------------------

On Nov 18, 2014, at 9:53 PM, Rud Merriam <rudmerriam at gmail.com<mailto:rudmerriam at gmail.com>> wrote:

Thanks for the link. I will study it a bit and also the Inverted Pendulum Problem.

Right now it will balance with a lot of jerks but then it leans too far in one direction and takes off. The motor speed is maxed out in that situation so it cannot catch up with the center of gravity (COG). I guess that means the D is low, i.e. needs quicker response.

Overall I wonder about the design having the battery in the middle layer. That puts the COG pretty high. I think having the battery at the lower level would make it easier to straighten up the robot because the angular (tipping) inertia is less. This is a trade off, I believe, in how large a bump in the path the robot could drive over. You need a larger tip to climb over larger bumps. Not really a problem with this robot since it is an indoor device for flat floors.


- 73 -
Rud Merriam K5RUD
Mystic Lake Software<http://mysticlakesoftware.com/>


On 11/09/2014 10:11 AM, David Anderson wrote:
Rud,

Here's a diagram of the algorithm used on nBot:

http://www.geology.smu.edu/dpa-www/robo/nbot/bal2.txt

dpa


On 11/09/2014 12:01 AM, Rud Merriam wrote:
Hi guys,

Sounds like the RoboRama went well today. One of these times I will drive up with a robot.

I decided to try something new and got a SainSmart balancing robot. (http://www.sainsmart.com/sainsmart-balancing-robot-kit.html) One of the other guys I hang with got one so I thought it would be interesting to compare our experiences. The robot is not bad but it is not well documented. Building it required close examination of some Instructable photos and guesswork. This is set of parts for someone with experience. It uses an Arduino Uno processor and a custom sensor board from Sainsmart.

One problem is the shield pins do not always make contact with the Uno analog input connectors. Don't know which board is at fault. If you squeeze them together the right way they work. Also, one motor does not start up as quickly as the other so it rotates. There is a speed offset in the code for each motor that I need to play with.

The bigger problem is tuning the PID loop. There is little guidance besides the video. I cannot get mine to respond well. In particular what happens is it will lean in one direction and just take off as if the motors cannot get ahead of the center of gravity. Checking the serial output I can see the motors are running at top speed. I am using a 3200 mAh 3s LIPO which I suspect is too heavy. I will swing by the local shop and get a lighter one Sunday to try it out.

I'll let you know what happens but also, any other suggestions on tuning the PID? David, I know you have a balancing robot albeit much bigger than this one. Any ideas?

--


- 73 -
Rud Merriam K5RUD
Mystic Lake Software<http://mysticlakesoftware.com/>





_______________________________________________
DPRGlist mailing list
DPRGlist at dprg.org<mailto:DPRGlist at dprg.org>
http://list.dprg.org/mailman/listinfo/dprglist





_______________________________________________
DPRGlist mailing list
DPRGlist at dprg.org<mailto:DPRGlist at dprg.org>
http://list.dprg.org/mailman/listinfo/dprglist


_______________________________________________
DPRGlist mailing list
DPRGlist at dprg.org<mailto:DPRGlist at dprg.org>
http://list.dprg.org/mailman/listinfo/dprglist

More information about the DPRG mailing list