I completely re-mounted the compass far, far from the frame. I used a standard carbon fiber mount.
I recalibrated the compass using live calibration. My z offset was > 150 though, which I remember reading somewhere that was a bad sign.
The copter still rotates in Yaw badly. Sometimes it will hold, but then do as much as a 90 degree turn over a 2-4 second period. I’ve attached a second log of it drifting in Stabilize, Alt-Hold and even Loiter modes.
And a parting observation… it drifts counterclockwise. And after disarming I noticed that all the counterclockwise motors were pretty warm (not “hot” – just really warm) but the clockwise motors we practically room temperature.
Could my all-in-one calibration have missed one ore more ESCs? What if one of the ESCs weren’t properly calibrated and the other motors were compensating for a single motor’s lack of thrust?
I could really use some help here. I’m not excited about digging the receiver out of the copter and manually calibrating each ESC.
Does anyone have any experience with this problem?
If not, it could be a bad compass, it doesn’t sound like it’s picking up a reading at all based on what you’ve described. Could also be a bad connection from the compass to receiver. might have to open up your receiver and check the solder points, make certain all wires have contact.
In the mean time go through your parameter list and look at anything compass related to make sure you didn’t accidentally mess with one of those, find someone who you can compare with and check to make sure that you parameters are correct, but that’s a long shot. I’m not certain that’s going to fix it. It honestly sounds like a hardware issue or a magnetic field issue, the likely hardware at fault here is either the compass or the receiver itself. Did you happen to add any more metal to the compass mount?
It worked perfectly at first, but I did a vertical speed test and it wasn’t moving as quickly nor drawing as much current as it should. Instead of drawing about 90 amps at full throttle, it was drawing 20 amps.
So I thought it might be due to the ESC’s being miscalibrated. Once I did an all-in-one ESC calibration, I began noticing the yaw rotation.
And here’s where it gets interesting. After the calibration, it then draws 50 amps at full throttle. That’s a drastic improvement, but it’s still not the 90 amps I’d expect. But also remember that only every other motor gets warm – the CCW ones.
It’s almost like one or two motors still aren’t calibrated, which is introducing rotation into the copter’s thrust. Then the motors that would need to counter that thrust all work extra hard to stop the rotation. I could see the mixer slowing-down half the motors to stop the yaw, which would explain why I only see about a 50% current draw at full throttle.
The other theory you’ve touched on. Maybe the compass went bad. I may just try another compass with it and see if that helps. I wish someone would look at my logs and see if the compass looks unusually noisy or otherwise “off”.
Also, I know there is a motor test in CLI mode. But is there a test where I could run-up each motor individually and look at the current output? What would be great is to fixture the copter, then run each motor separately at 0, 25%, 50% and 100% throttle, just to see how much current it’s using. That would answer the ESC calibration question but would also answer a number of questions about wiring, motor status, solder joints, etc. etc.
I got it off the ground and put it into Loiter. No stick input was provided whatsoever. It was supposed to just hover in a fixed location. It stayed perfectly in the XYZ location (no toilet-bowling, no drift). But over a couple of minutes, it did almost two complete rotations CCW in yaw. It isn’t a super-fast drift; I’d estimate it takes about 60-90 seconds to make a full turn.
I’ve attached the compass readings from the test and the full log file.
Did another all-in-one recalibration of the ESCs. Then I confirmed that all the ESCs turned on at exactly the same point. While I couldn’t measure the full throttle endpoint, every motor turned on exactly two “clicks” from zero on the throttle. Then once throttle was removed, they all stopped at roughly the same time.
They X and Y mag values are almost perfect sine waves, with a one-minute period and 90 degrees out of phase with each other (as you would expect).
The MAG parameters are correct: The copter is fully aware that it’s doing circles. I’m impressed at how non-noisy the compass is.
I have COMPASS_USE set to 1, which should direct it to use the compass. On a Pixhawk, the GPS and Magnatometer are inside the same device (albeit connected with different cables). Should I turn COMPASS_USE off? Is it using some other, less reliable compass?
I’ve also attached my latest log file. Any help would be appreciated – surely someone has seen this before.
So all old vales should be blown away. Did complete re-setup. Got the same rotation, but the sinusinusoidal waves from magx and magy weren’t quite as perfect. It knows for sure that it’s rotating – it just won’t do anything about it.
So next I’ve fixtured it so the copter can’t move. Then I went full throttle to no throttle just to see if there’s any noise on the compass.
Here’s a plot of magX, magY and magZ over a wide range of throttle input. Sometimes I went max, sometimes I went to zero: dropbox.com/s/o3zmtpfotv9ky … ixture.png
The mag readings are dead steady, regardless of throttle input and regardless of how fast the throttle input rate changes.
And I also attached a log file for those who are interested.
Could I have a bad z-axis gyro? Would that explain the drift?
So months ago I removed the two rear landing rubbers because I lost one and I finally got the replacements that I ordered from Bangood and put them on and guess what!? My copter now rotates in CCW reverse. So I remembered this post and went to a RCgroups forum, nothing too helpful. However, I went ahead and recalibrated the compass once with everything was off and again with battery plugged in and all external hardware (GoPro, gimbal, video tx) was turned on to see if I saw any distortion in the screen which would indicate magnetic interference… Results, NADA.
Back to the drawing board, went through my parameters, nothing really stood out, so I figured, “What the heck, let’s calibrate accelerometers” I found a flat table took the props off and placed the motor numbs against the bottom to make sure that it’s flat calibrated accels probably three times because I screwed it up bad the first time. Flies even better than before now. Don’t know if it will work for you and I can’t remember if you’ve already done it, but go ahead recalibrate both compass and accelerometers using mission planner. Hopefully that fixes it.
Your motor order is almost completely certain to be wrong, or you have motors spinning the wrong way, or you have props mounted upside down. The copter is flying with huge motor offsets - four of them are nearly maximum, four are nearly minimum. This is not normal for an octo.
Ensure all your props have the concave side down
Ensure all motors are spinning in the correct direction per the diagrams linked below
Ensure all motors are connected to the correct output on PIXHAWK per the diagrams linked below
Check carefully, I will eat my hat if none of these things turn out to be wrong. Don’t waste your time recalibrating your accels or playing with your compass. You can do the compassmot procedure if you want your compass to be even better.
[quote=“jschall”]Your motor order is almost completely certain to be wrong, or you have motors spinning the wrong way, or you have props mounted upside down. The copter is flying with huge motor offsets - four of them are nearly maximum, four are nearly minimum. This is not normal for an octo.
Ensure all your props have the concave side down
Ensure all motors are spinning in the correct direction per the diagrams linked below
Ensure all motors are connected to the correct output on PIXHAWK per the diagrams linked below
Check carefully, I will eat my hat if none of these things turn out to be wrong. Don’t waste your time recalibrating your accels or playing with your compass. You can do the compassmot procedure if you want your compass to be even better.[/quote]
First and foremost, thank you so much for the assistance. I waited forever for help and finally figured-out my problem. It’s gratifying to see any sort of qualified response, which your ideas clearly fit.
As to eating your hat, it’s going to be a close call. My motors were mounted on carbon fiber tubes, but the mounts were drilled – not clamped. As it turns out, the holes that mounted to the body of the copter and the holes mounted to the engine mounts were all systematically about 1-2 degrees off – barely perceptible to the naked eye. I put a couple of pieces of electrical tape underneath the motor mounts on one side of most motors, and it trued them right up. Instead of having 300+ msec differentials in motor pulse width between the CCW and CW motors, the gap is now closer to 50-100 msec.
Again, I thank you for your input. Present company excepted, I’m a little underwhelmed with the community-based support I find for APM and Pixhawk. And it’s ironic, since I’m an absolute open-source nut and would like nothing better than to see this platform succeed. My octo flies like a charm now.
Should be able to get that offset to zero… Did you check your ESC signal wires? A single pair being reversed on the same arm will double the offset without causing any other symptoms.
I got exactly the same problem, that my quadcopter rotates CCW during takeoff. I cannot effectively takeoff!
It worked before , then I installed a camera, but now it does not work anymore
I replaced all ESC’s, balanced all propellers, but still no luck.
did you solve your problem ?
[quote=“bcdebusk”]Update:
Did another all-in-one recalibration of the ESCs. Then I confirmed that all the ESCs turned on at exactly the same point. While I couldn’t measure the full throttle endpoint, every motor turned on exactly two “clicks” from zero on the throttle. Then once throttle was removed, they all stopped at roughly the same time.
They X and Y mag values are almost perfect sine waves, with a one-minute period and 90 degrees out of phase with each other (as you would expect).
The MAG parameters are correct: The copter is fully aware that it’s doing circles. I’m impressed at how non-noisy the compass is.
I have COMPASS_USE set to 1, which should direct it to use the compass. On a Pixhawk, the GPS and Magnatometer are inside the same device (albeit connected with different cables). Should I turn COMPASS_USE off? Is it using some other, less reliable compass?
I’ve also attached my latest log file. Any help would be appreciated – surely someone has seen this before.
I had a similar problem. It would always rotate slowly CCW no matter what I did. Mag etc all fine, and RC just calibrated. In autonomous mode it also rotated, so I tried hitting “pause mission” and it did just that, hovering perfectly.
I disconnected the radio control and flying in autonomous mode, it then flew with no rotation . A re-calibration of the RC unit, using qgroundcontrol rather than of APM mission planner, and now it’s good as gold.