Tilt Sensors
Trezitorul
Posts: 68
I am building an inverted pendulum device. I am wondering if there is something cheaper than the traditional accelerometer, Gyro, kalman filter combination. Since these cost about $60 together.
Comments
-Phil
Others have done this kind of thing with even less expensive IR emitter-receiver pairs.
/John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Asking not to use distance, acceleration or rotational sensors on this type of robot is like asking for a car without an engine: sure, it might work in certain instances (going downhill with the car, square wheels with the bot), but there are certain essential features that make it possible.
By the way, at a minimum you can get by with a gyro (for short periods).
The question boils down to: how to I tell if I'm falling. I can:
See how far away the ground is and compare it to how far it should be.
Feel a tilt (gyro)
Feel a change in the direction of a pull (gravity, acceleration).
Look at the horizon and keep it in the middle of my view.
I'm sure there are other schemes, but they can get pretty complicated for poor results...
Let's think about this for a moment. Suppose I'm standing. To make it more challenging, assume that I'm blindfolded and the nerves from my inner ear have been surgically cut.
Will I be able to stand without falling? The answer is yes, because I'm getting feedback from my feet telling me that I have a certain weight distribution between heel and toes. If I feel the weight on my toes too much -- especially if it's increasing -- I know that I'm soon going to be falling forward. So I apply more pressure to my toes to make myself lean backwards a bit. I'll stabilize in a position such that the weight is balanced. Ditto for side-to-side balance. If I sense more weight on one foot than the other, I'll apply even more pressure to bring myself back to equilibrium.
Now, what if the floor is not level? It doesn't matter. My toes may be higher or lower than my heels, but I still want the weight to be evenly distributed.
Now let's make it more interesting. Suppose that I'm not standing on the floor, but in the aisle of a stationary train. Now suppose that the train starts moving. Assuming that it doesn't accelerate too fast -- that its acceleration doesn't exceed the control authority of my toes -- it's still no problem. As good ol' doctor Einstein has taught us, the acceleration is relative. Gravity or acceleration, it makes no difference. I'll still adjust my position so that my weight feels evenly distributed.
So on the basis of this thought process, I think you don't need any tilt sensors at all. Just strain gauges, either on the "post" of the Segway-bot, or on some movable joint.
This doesn't necessarily mean that the overall control of the bot doesn't need other sensors. I may need, for example, tachometers to tell me that I'm moving, speeding up, or slowing down. Or a pot to tell me that the "post" is inclined relative to the chassis (assuming that it's got a pivot at all, which need not be the case). But in the end, I just want to keep my center of gravity aligned with the acceleration vector, and strain gauges or toes are all I need to do that.
Jack
I don't think that will work for a robot. First off, it will probably use wheels (that's what I assumed). Sure, robots like the penguin and the toddler don't fall over and they don't have any of these types of sensors, but that is because they use feet instead of wheels. With wheels, you quite obviously have only one point of contact (in a perfect world) with the ground, while a foot will have an area. I suppose you might be able to make a wheeled robot with a large weight on a pole, and measure the deflection, but you will have to be constantly rolling about and have some very sensitive measurement devices I'd think.
http://www.memsic.com/data/pdfs/an-00mx-012.pdf
Please post Pbasic math if you use this approach to help others like myself.
cheers, David
You miss my point. The discussion was not about feet and toes, but about sensing where down is. I was trying to explain, by analogy, that you (or your robot) don't need gyros or accelerometers to know that you're falling. Sensing the distribution of forces -- and the way they are changing with time -- is enough.
Jack
This is a great thought experiment, but I'm not sure your suggestion eliminates accelerometers, it just invents a new type. An accelerometer works by measuring a physical change caused by acceleration. The Memsic 2125 works by measuring the position of a heated bubble in a liquid. The Crenshaw Heelerometer measures changes in pressure of objects pressed together by forces of acceleration.
Ultimately all accelerometers are confounded by the fact that gravity is a form of acceleration. If you are standing blindfolded in the aisle of a train and the train begins to accelerate very smoothly in the direction you are standing, neither a Memsic or Heelerometer could determine whether the sensor reading is because you are starting to lean backward or the train is accelerating forward. But the corrections are different - if the train is accelerating, the balance point puts more pressure on the toes.
Or maybe I'm not looking at it right. But I'm not convinced we've found an alternative for Trezitorul.
/John
Well, that's a good point. I suppose that, in the case of the human, we've turned the whole body into an accelerometer. Point taken.
But that's precisely the point.
This discussion has migrated a bit as we learned more about Trezitorul's needs. He originally said he wanted a "tilt sensor" without using a full-up, 6-d navigation system. Some of us interpreted the question differently, based on what we thought he wanted to do. Some thought that he was looking for an absolute, gyro-horizon type of level. IOW, tilt relative to the surface of the earth. Others, I think, were thinking in terms of his more immediate need, which seems to be to decide whether to speed up or slow down the base of the bot. Put me in the latter camp.
In retrospect, I think we should have asked him the control-system question: Once you know the "tilt," what do you plan to do with it? If the goal is just to keep the bot from falling over, I'm claiming that you don't really need to know which direction the center of the earth is. You don't NEED to distinguish between gravitational and vehicle acceleration, and a much simpler set of sensors will do.
Can we please drop the obsession with toes? http://forums.parallax.com/forums/emoticons/smile.gif
??? Why the difference??? The only point, seems to me, is that you need to stay on top of the combined acceleration vector. i.e., keep the center of gravity aligned with this vector. Under constant acceleration, the best balance strategy is exactly the same as if you're standing still. So saith Einstein. If you want to "put more pressure on the toes," it's because you anticipate more acceleration yet.
Can we please drop the obsession with toes? I'm starting to get athlete's foot. http://forums.parallax.com/forums/emoticons/smile.gif
Jack
Are you trying to damp the oscillations you mention? Trying to balance a segway-like robot with just an accelerometer leads to a rapid oscillation of the wheels as lateral motion and tilt keep telling the wheels to go in the opposite direction. This water-damped accelerometer slows everything down, but I don't think it solves the underlying problem.
By the way, another approach might be to use an accelerometer plus a wheel encoder. If the encoder tells the processor what lateral motion to expect, it might be possible to cancel it out. And a wheel encoder might be cheaper than rate gyro.
/John
I agree with JohnBF -- not sure what your resistance is to purchasing a $30 accelerometer and/or a $30 gyro -- the complexity of what you are describing building yourself will surely take much more time and $$ then these tried-and-true solutions. You can also purchase ready-to-go IMUs (which contain several axes of accelerometers and gyros) on one board for less than $80 or so. Just something to consider.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Say you are standing still on your balancing machine. It starts to tilt forward. Your float, if it works properly, will try to remain standing up which will tell the wheels to go forward. Now that the wheels are moving the acceleration will cause your float to move further rearward and you would soon be on your butt. Now if your container was full of a very dense gas and your float was a helium balloon on a graphite rod - the acceleration would cause the float to move forward - the dense gas would be moving rearward. Just like what happens when you have a helium ballon in a vehicle. When you brake, the balloon moves rearward.
Like has been said, you would be better off just buying the sensors. On the other hand, building something like a Segway using such DIY sensors definitely has value.
Rich H
Thanks,
Trezitorul
/John
Rich H
/John
I stuck a ping pong ball on a 4" string and stuck the string to the bottom of a jar. The jar was filled with with water and capped. There remained a jellybean size bubble of air in the jar because my sink isn't deep enough to assemble fully submerged.
Results - shove the jar to the right, the ping pong ball goes right, then oscillates for ten to twelve seconds before becoming motionless, JohnBF is correct. I would have expected better dampening. Air space in the jar doesn't affect dampening as much as I would have thought but it does alter the oscillations. Also, a shorter string increases the time for the oscillations to stop.
So, no big news here!
Rich H
With a capacitor in the loop you can damp out the oscilations pretty easilly.
It's the December 2005 issue.
Jim-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
This is not a good strategy for a segway-like robot, because a high center of gravity is necessary so that the wheels effectively get themselves under the top of the robot, instead of just pushing the whole thing around without changing tilt.
HOWEVER... another approach would be to use a servo to move a mass attached to the robot - like a person swinging arms to stay in balance. This would not require a high center of gravity, and there would be no constant motion of the wheels to confuse an accelerometer. A low-slung robot like this might work using just an accelerometer. Or might not - just a thought.
/John
humanoido
A cheap tilt sensor (that works) is 2 HM55B mounted
orthogonally to form a 3-axis magnetometer. A cheap
microcontroller, like the Propeller, can calculate the
Earth's magnetic field vector at the given location using,
for example, the WMM2005 or the IGRF-10 mathematical models.
These are free. Tilt can be figured out (+- 2.5 deg)
comparing the measured and the actual vector. If you combine
this with a H48C 3-axis accelerometer with low-pass filtered
signals and Fuzzy logic, the 'Triad' algorithm can yield a
+-1 deg accurate attitude even then when the device is
accelerating. The sensors can be mounted in one cubic inch
in rugged form + the PCB for the Propeller. You put in less
than 50 mA and get out digitized attitude data.
By the way, how much does your robot cost?
- Istvan·