Hi there,

I have been implementing the DCM algorithm for use with an LPC1769 board in the LPCXpresso environment and so far it has been going smoothly and this forum has been a great help, however I've run into a problem.

I'm just starting to use the pitch of my imu to control a servo. Unless I am mistaken I believe the Rzx element is used to control pitch. Right now i use that element and a setpoint of zero in my PID loop to control a single servo.  When I first start the code it seems to work perfectly, when the imu is level the servo is centered, pitch one direction and the servo goes that direction. However, after a while it begins to stop responding as much to pitch and suddenly it begins to react to yaw rotations and no longer pitch. What is causing this? I don't have drift corrections on right now but i cant explain why it would switch axes the way it does.

The IMU I am using is sparkfun's SEN-10010 I heard the gyro's aren't great but drift and noise still doesn't explain my issue. Can anyone give me some insight on what is happening here?

Views: 219

Reply to This

Replies to This Discussion


How long is "after a while"?

Without drift compensation, the axes will seem to switch. I have seen it quite often during my work.

What is probably happening is the estimated orientation is slowly tumbling. This makes it feel like the axes have switched, because the IMU estimate of the axes of the earth frame no longer align with the physical axes of the gyros.

It could be a lot of other things as well, you need to implement roll-pitch drift compensation using an accelerometer before you can proceed much further.

Best regards,


The transition begins to occur after about 10 seconds, and the transition itself only takes about 10 seconds as well.  I will finish coding my roll and pitch drift correction and see if that fixes the problem.  I'll be back if it does not fix the problem. Thank you for the help.

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service