gyro stabalised platform

Gidday all,

Just new to the forum, arduino and the infinite volume of information about. This is probably a silly question, however I'm having trouble understanding the control of a 2 axis bracket with a 6 dof input using a itg3200 gyro and lis331 accelerometer. Both are connected to the I2C bus and after a few false starts I am now getting the relative x,y,z information from both. I'm trying to create a stabalised platform, but for a start i'm trying to make the mount follow the movement of the gyro+accel. Q: if the gyro+acc are at rest when I start, then move them through a random pattern of movement back to the resting position, the mount should follow and the finish back at the starting position?

The gyro measures the angular rate of movement and the accel the speed at which this occurs?

Therefore if the calcs are correct then as long as the gyro+accel are back in the same position as when they started, the mount should also be - Yes?

I take the rate from the gyro (deg/sec)and the inertial force from the acc (g's) Apply this through a kalman filterto provide smoothing - how do you then apply this to the servo's.... I assume that u then use these figures to calculate a future position and apply this to the servo.

I've read through a number of excellent articles, but my physics is a little rusty.

Additionally has anyone had experience with the lis331- taken me a while to get its sorted( updated the library) but still feel that it is this area that my calcs might be out.


Any Kalman filter or other attitude calculation code should have the attitude state available to query - either as DCM or quaternion or Euler angles - you need to extract Euler angles for the 2D bracket control. Do you have a library in mind, people may be able to help more with that information. Or are you looking for recomendations for a library?


Thanks for the prompt reply ... see that I have more research to do on the angles that u named... I like to try to understand things that im doing - the next goal is to try to build my own autopilot and although I know there is a brilliant product in ardupilot I want to learn. Just trying to learn to walk before I run .. getting past the crawl stage is a challenge .. enjoyable though I've been tinkering with libraries for the lis331 and have the majority running, but must admit some spec sheets are not to helpful. At the moment I am taking the rates from the filters and combining with the current servo value, but finding that the angle of the platform is out from expected ... more testing and playing with scale factors I guess.. Cheers

We here try to solve similar problem with L3G4200D and LIS331DL; both via I2C to Arduino Uno. Shield is homemade one. Now we get dump on serial monitor from these two good guys. So we’re just in the very beginning of the long way… Any questions about our small experience will be answered in broken English almost immediately! ))