I was originally going to use an accelerometer to detect lean angle on a motorbike but then actually thought about it and realised it was not going to work, at least not while cornering!
So I have been thinking about using a gyroscope. But will it measure absolute angle or the rate of change of angle? I have searched the net but have not found an answer (at least not one definitive enough for me to understand).
The usual purpose - The usual - Pure interest! My days of dragging anything while cornering (especially on the old British bikes I ride) are long gone.
@Terry
I looked at that project some time ago. He uses an accelerometer and has found that the readings were less than accurate.
Before I get hold of a gyro I was just wondering whether they gave out a reading of angle or rate of change of angle (I suspect the latter)
sbright33:
It is not possible to measure lean angle with an accelerometer. Did I spell that right? Because the force is always down, no matter how far you lean while riding. I mean with respect to the motorcycle it's the same. By definition! A cheap gyroscope also does not work. I've tried many models. I can explain if you like. I have had success with a model costing nearly $100K used to guide missiles. There is a better way. All you need is GPS! If you can calculate the radius of the curve it's easy to derive lean angle accurately. This was verified with the expensive gyroscope. More samples, more frequent updates.
It is very useful for racing. Also to compare tires on different road surfaces. You can see which one leans the most before sliding. This is the quality you are looking for in a racing tire. It is related to my post about measuring a line thru a curve while racing...
I'm surprised. If we say the accelerometer is oriented with the y axis front to back, x side to side, and z up, won't the z and x change in absolute value if you lean the bike regardless of the curve? Or does the x continue to read 0G? And wouldn't the z axis reading tell you how hard the bike was turning?
The usual purpose - The usual - Pure interest! My days of dragging anything while cornering (especially on the old British bikes I ride) are long gone.
So, you're going to measure how far you can lean (statically, I presume), and program an Arduino with LCD and additional hardware, and measure and display how far you are currently leaning. Then, in the middle of a curve, you'll be looking at the display to see if you can lean further. Well, OK.
Me? I just angle my foot out a little. When my foot brushes the ground, I know hard parts aren't far behind.
sbright33:
If I understand your axes correctly... The X will always read 0 statically, even during a steep banked curve.
Ok, I'll just shut up and assume this is correct - i wasn't even thinking of a banked turn which would, obviously complicate the lean angle thing even for a gyroscope.
sbright33:
Z CAN be used to measure lean angle combined with speed, in theory. It's like that feeling you have when you spin as a kid pushing you outward. In reality it doesn't work accurately. Too much vibration and bumps in the road? How accurate is the accelerometer?
Assuming a car which does not have shocks... It's still difficult to measure accurately! In this case the X axis. Let's say you want to measure cornering forces. Drive the same corner over and over. Each time the measured results are different. Every reading 100x/sec fluctuates when it should be nearly constant. Multiply this error by 10x when you are not able to measure X using Z instead.
Probably need to establish what the lean angle is in relation to, gravity, the surface of the track, or other. If it is the surface of the track, then maybe the balancing bot approaches might be worth studying.
This fellow JanSpace.com is for sale | HugeDomains by the way, calmly uses the x accelerator reading to calculate and display the lean angle(found this from the 1st reply above). - i'm still not convinced this is hopeless.
My understanding from reading diydrones.com and (many) years ago working for Norden, is that the semiconductor process based gyros are RATE gyros, showing the rate of change of angle. Usually used with systems that are calculating the rotation based on the rate.
In an F4 (which I'm more familiar with) or an F16 there are XYZ attitude measurement mechanical gyros that are used for various calculations like bombing. But when the pilot does a violent maneuver all those gyros "dump" and only after things settle down again is the data from the rate gyro used to reorient the XYand Z gyros.
I worked on the "Gyro Centering Amplifiers" and we found they often failed after a gyro was "dumped" and the (servo) amplifier tried to recenter the gyro. After a bunch of experiments in the White Room at Norden I decided the germanium! diodes used in a reference bridge were being overloaded during the dump, and built 3 amplifiers using NewFangled SILICON diodes. 1N645s. 1960. After a big fight with the original designer who had apparently previously been infallible, all of them were reworked.
But I don't think you asked me THAT
I bet some airplane type guys could explain all this...
I think the bottom line is that all the solid state "gyroscopes" can be affected by forces that are in play beyond those from axis rotation. The old mechanical rotating gyroscopes are somewhat more immune to external forces by being allowed to remain in the position in which they want to remain. I think the solidstate units are probably based on a "quartz tuning fork" setup.
bill2009:
... calmly uses the x accelerator reading to calculate and display the lean angle(found this from the 1st reply above). - i'm still not convinced this is hopeless.
if the bike is stationary an accelerometer would work, but when the bike is moving the accelerometer won't work because it senses the same force as the rider, i.e. the rider feels his own weight pressing down into the seat, not down towards center of the planet earth. This is because the centrifugal force generated by going around a bend is exactly balanced by the bikes lean angle.