I haven’t had time to fly for a while so I’ve forgot some of the details about this problem. But I would really like to “debug” my copter today. So what I’m looking for is some advice on how to do it, and what more information I can supply here.
I’m using the MB1200 XL-MaxSonar. It was working great for a while then suddenly it stopped. I’ve tried it over multiple versions of the firmware still nothing. When I turn on the altitude hold it just stops and falls out of the sky. No clue way.
I’m also having a lot of problems with the compass, it looks like it forgets what’s north, some kind of disturbance. So no chance of loitering. I’ve tried to get help before but not yet solved it
That’s the problem I’ve had it so long i forget stuff, but I will try:
It’s old so APM 1. Version of code I don’t remember but I’ll upload the latest when I test it tonight.
TX is Turnigy 9x I have XBee but not using it right now. If I’m not mistaking the APM is powered from one of the ESC’s.
I’ll check the details when I have it in front of me.
I see I have an discussion from a year back, were i have the same problems (compass). but no solution
It's an original, one of the first ones :)
Thanks thats greate, i don’t need help with the setup it all works greate except altitude hold and everything invold with the compass. So for now it’s just FPV flying.
I tested it yesterday, I’m flying with firmware v2.5 the APM1 did not have enough space for the newest version. It’s powered from one of the ESC’s trough the power distribution board.
It stills falls out of the sky when I turn altitude hold on, so still have problems. And therefor I can’t test the loiter function. Simple mode still loses it’s bearing by as much as 40 deg now and again, which makes it scary to fly.
As you can see in the test I did in a former post the compass still shows error without the motors running. So it’s not disturbance form them I’m seeing. It’s mounted on top of the APM as recommended. I am considering replacing it to see if that helps, any ideas would be greatly appreciated…
I tested the sonar with CLI inside and it looks like it’s working ok so it’s strange that it does not work outside. It’s mounted about 10 cm from the center on a plastic arm I made. Connection is done with a shielded USB cable where the shield is connected to GND. Only thing I can think of is vibration killing it, but it’s strange that it worked so well for as long as It did.
Did you wait for a solid GPS lock before you armed the motors?
Do you have a magnetometer connected? If not, remove the GPS immediately, before you fly again.
Is the magnetometer configured, as Monroe asked? Did you test it?
It sounds like you have an APM1280 and not an APM2560. The APM1 based on the 2560 chip, has enough space, so you might consider upgrading (you can keep the same Oilpan)
Can you take a closeup photo of how your compass is mounted and cabled?
Did you read this: "Now change batteries and try the auto modes. First, try Alt Hold at an altitude of about 20 meters. Your actual current throttle position is recorded as the "hovering point" when you switch to an altitude holding mode so it is important that you are not ascending or descending when you switch to Alt Hold. You should be able to fly around with the copter maintaining the same altitude, plus or minus a meter or so." Follow the flight test procedures, read the tweaks and troubleshooting sections.
Thanks for your helpful input so far
Compass is setup, I have CLI in terminal, and I have tested with both setting declination and not.
Yes I have magnetometer, and I got the GPS lock.
I’m using the APM1280. I am considering an upgrade, but I would like to find the problem first.
I’ve tested altitude hold at different heights and it always falls out of the sky
I toke some pitchers of my setup yesterday, so you can see if there is some obvious problems.
the servo connection you can see is for the range finder
Is there enough space between the magnetometer and the oilpan pins? Is there an risk of causing a short?
Some people have reported problems with the i2c bus getting affected by RF from their RX, Telemetry radio, or VTX, resulting in bizarre gyro or magnetometer readings, but I have no reason to think that is the case here. I'm sorry that it is hard to diagnose when you cannot use the CLI to run tests.
For magnetometer, I think it is usually a problem with boot up procedures, or RF/magnetic fields from ESCs, RX, VTX or Telemetry TX, or a cold solder joint on the magnetometer, or the magnetometer being upside down (your's looks fine) or it needs a better calibration or has the wrong declination. Most of these will have consistently wrong results, but the RF/magnetic fields, and the cold solder joint can be jumpy/sporadic. Those are my best guesses, without data, and ideas you can maybe test. Mine have almost all worked perfectly (had some at-boot magnetic field problems once... I moved some gear farther away, and it was fine. In that case, I'd get a one time 90 degree shift sometime after boot.
Regarding the sonar. I am willing to bet a solder connection to the board from your connection cable is bad.
The reason why I am suggesting this is where to look is the holes are so small and the wire is real thin.
I did a good solder job on mine but the wires are thin, I flowed the proper amount of solder but I not only used permanent double sided tape to fasten the sensor to a leg of the quad, but also I used small zip ties through the pcb screw holes and around the arm, nice and tight, also zip ties around the sonar cable at the base of the pcb.
I'll test for noise. When the motors are not running it looks clean. I have used autoland mode to get out of a bind and it worked, but I have not fired up the motors while looking at sonar. hmm.. I'm going to do that tonight since my props are not mounted right now.
Regarding the compass, do you have GPS ? It's only going to be reliable outside.
If you are referring the the magnetometer then make sure all your signal wires and motor wires are zip tied, neat and away from any sensors.
Ok so I re-soldered the sonar, still did not work. Then i disconnected it and turned it off in CLI. T ought I would try with only baro, but to my amazement the same thing happened, so it looks like it's not the sonar!!!
Any ideas what can cause this???
Have not done more tests on the mag yet, did not get time
Nothing? I was hoping this discovery would make it easier to find the problem, I’m going flying tomorrow and will try to fix it then
Sorry, I was out with the wife.. I didn't get a chance to respond. Check to be sure there are no shorts on your APM anywhere. update the flash, reboot and try one more time with the sonar disconnected.
Also I know this is a dumb question but did you double check to be sure that the sonar and barometer were enabled ? Double check. Also when testing just the barometer, be sure to disable the sonar. You can enable/disable in the CLI setup menu.
If you are not getting good values from the barometer indeed something else is wrong. First check for shorts, if you don't see any call the vendor that you got the board from. It could be a defective board.
When researching always refer to the Arducopter Wiki too. There''s a lot of good information there.
Finally had some time to work on my copter, and it got even more confusing.
As you guys suggested I resoldered all the connections for the sonar, still same problem.
I also replaced the magnetometer with a new one and resolderd the connections. But still have the same problems.
Everything else is working great no problems at all. Checked for shorts could not find any after visual inspection