I am running APM Mission Planner 04.37 with ArducopterMega 2.0.18 on out of the box jDrones kit.  I have calibrated the leveling, radio, motors and ESCs.  I have enabled the magnetometer.  The radio Tx is turned off.  While testing the raw sensors based on these instructions, I cannot figure out what the yaw results are telling me.  Roll and pitch make sense to me.  If I put the quad on a table, the roll and pitch are zero but yaw is 90.  When I rotate the orientation of the quad on the table, what should I expect?  I thought I would see changes similar to roll and pitch when I hold it up and tilt the quad appropriately.

 

The current yaw results change when I rotated the quad, but they drift and I cannot figure out the pattern.

 

Thoughts?

Thanks,

Mike

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

Join diydrones

Email me when people reply –

Replies

  • I have solved my issues with yaw testing! 

     

    I noticed that the raw Gyro Z data (from the graph on the Mission Planner) was not bouncing around 0, but around 5.  I did a setup erase and reset and now the yaw results are dead on.  I had the incorrect magnetometer orientation configured at first and I suspect the quad established some sort of calibration in memory.  Once I changed the magnetometer orientation, it continued to use the old values until I did the erase/reset.

     

    Thanks for all your help.

     

    Mike

  • I assembled the PDB and twisted the wires together as they come out of the center hole as described by Pbreed, ESC's are mounted on the booms, tie-wrapped to the vertical supports per the assembly photos.

     

    After reading this thread,  connectecd the copter to my PC and ran AC2 sensor. When I point the front of the copter to North, the yaw dial reads 0 degrees, I turn it to east, it reads about 95 to 105 degrees, turn to south, it's right on 180, turn it all the way back around to west (to untwist the usb cord) and I get 270, so seems mine is working OK.

  • I found two things, but yaw still does not seem right in the mission planner.  I reseated the I2C connector and also discovered that the magnetometer install instructions for the cable option has the wrong #define statement.  The instructions use MAGORIENTATION but it should be MAG_ORIENTATION.

    Now the yaw approximately moves as I expect, however it seems to over compensate and get stuck far beyond the angle it should be at.  For example, it is 0 when pointing north.  When I turn the quad to face east, the yaw swings past 90 to about 120 and then stays there.  Turning the quad back to north, the yaw swings past 0 and settles in at around 293.

    It also seems to react to roll and pitch movements, so I am not sure if the yaw is relative to the quad or the world.  I assumed the yaw would be relative to the quad so that pure roll or pitch changes should not change the yaw.

    I confirmed this behavior with the compass test where the quad is facing approximately north and I turn the quad to face east.  See the attached file for the compass test results.

    I am not sure what do at this point.

    Mike

    compass-test.txt

  • Yes, I have a DIYDrones magnetometer connected via cable. I have also configured the magnetometer installation orientation (components up, pins forward) and loaded the code into the quad. I have used the CLI setup to enable the compass. I will double check the connections and reseat the connector.
  • Developer

    The yaw value is 0 = north, 90 = east, 180, south, 270 west.

    Do you have a compass? The compass is needed to correct for yaw drift. Also, make sure your APM is very stable at startup for calibration.

This reply was deleted.

Activity