Problem with my DCM need some help.

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?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • T3

    Hi,

    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,

    Bill

This reply was deleted.

Activity