Vehicle Tilt Control?
I am building a three wheel electric vehicle which has the ability to tilt with·mechanical input on corners but·I want it to be able to do so automatically. I understand that it will require both gyro and accelerometer sensing, a control circut, a controller, software and input, plus a servo motor. This will all drive a jackshaft forward and reverse. I have done the mechanical stuff but the electronics are·beyond my ability. Any suggestions or help would be greatly appreciated.
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
The only way to do it reliably is to include a gyroscope. An accelerometer will only work on static or very low-G applications. Once you get something moving, such as a trike, the acceleration (which you were using to sense position while static) will give you a false reading (due to the G-forces induced while turning). A gyroscope will give you your tilt, which you would then use to "remove" that much acceleration from the accelerometer reading, giving you your absolute acceleration (aka the amount of G-force your servo's need to compensate for).
I think you could do it with only an accelerometer if you integrated over time, but you'd end up with error stack-up which I think would lead to a diverging control system.
-Parsko
Motorcycles are inherently stable during cornering because cornering G forces are experienced by the suspension almost completely as "down" forces instead of lateral load on the suspension due to the bike being leaned over the in corner. Whatever angle a 2 wheeled vehichle is to the ground during normal striaght line or cornering operation the subjective "down" is nearly always straight through the vertical centerline of the chassis, with very little angular offset.
Sooo all that being said.... From my point of view, the important thing to your app is "subjective" down... Subjective because it has very little to do with what is actually down, other than the fact that a combination of gravity and lateral cornering forces combine to alter the perception or target angle to compensate. An accelerometer with sufficient damping or filtering algorythms may be possible, another approach may be to look into RC helicopter solid state gyros to more accurately determine proper lean angle.
With a gyro, it should be simple.. Just have your servo system react in an opposite fashion to your gyro's swing from calibrated vertical to maintain an upright position. As lateral cornering forces build your gyro will think its leaning over and the servo system will lean your chassis in an attempt to maintain a vertical position.
All in theory, and lots easier said than done but should work just fine.
I wouldn't touch a heli-gyro - except with a big stick....! I bought one thinking that'd be ok - dunno whether its just mine but couldn't get anything usefull out of it.
Look at Sensors->IMU category at www.sparkfun.com
Bought some of their stuff recently - really good.
James