Tether drone magnetometer problem

I am not familiar with your model so not sure how fast electronic switch inside the drone switches to internal battery. It could be the switch to battery causing ms glitch to the power source?

Is the onboard battery connected in parallel to the tether wires?

How about you begin flying with battery. Does it fly ok?

If both drones have exact same hardware and firmware etc. the above is the only thing I think off unless you have some defective components in the 2nd drone.

You can upload your logs and bins for others to review.

In mission planner you can compare the good drone parameters with the 2nd drone parameter file to see if you find any differences.

Post some pics of your drone. Just curious what you got.

I am traveling so I can’t really view any logs at this point.

Also turn off Pixhawk internal compasses. Compass 2 and 3 via mission planner. Pixhawk internal compasses cause a lot of problems.

What type of external GPS you have?

Ill post a pictures tomorrow.

  1. Well. the switch to battery can be at max few ms. however, the magnetometer and cube itself is powered via mauch_PL. So i guess capacitors on mauch should be able to withstand few ms. The switching itself is very fast.
    However the magnetometer is NOT powered from cube, but directly from mauch. So teoretically if mauch drops voltage for few ms, the cube could stay alive and mag not. (the voltage drop on cube is not visible in logs.)
  2. Yes, with battery it flies ok.
  3. The internall compasses are disabled.
  4. The GPS is Drotek F9P , but mag is separate as RM3100 by drotek also.

Meanwhile i am working on another soultions :slight_smile:

Mauch makes good products and I use them for commercial drones and they can handle power cut over without a problem. “hall Sensors”.

You have already troubleshoot the problem. If the drone is fine on battery than its the power source cut over issue.

As I suggested, check parameter files between two drones.

You can also contact Mauch, he is very responsive to see if you got a defective module…

No surprise but there’s a pretty big current spike that I’m guessing is the moment you switched power supplies. Before then the compass is pretty happy, but after that you can the compass performance is poor. To me this suggests that either the compass has issue with the transition from tether to battery, or there is an issue with the battery connections to the system.

I agree with @UAVSkies comment above that given you have two drones that should be the same (and one is working) then you should also consider that there is a mechanical fault with this one. By that I mean something like a bad filter capacitor, poor solder joint, poor ground, etc.

Leonard did a great write-up on grounding issues. There might be a nugget in here that will help you.

I think he has a defective Mauch board.

After seeing your graph, its for sure the issue.

Can’t be the grounding issue else the drone would not fly over tether either.

Why would you think the Mauch is faulty? The spike in current is understendable, because the battery goes from 0 to 40a instantly.
I did suspect the grounding issues, but i havent found anything different from the one that works well.

There is one more thing in the logs. Right after the power peak, the drone yaws to the left approximately 90°. However, if you look at ATT-YAW It looks like it’s pointing the same direction. You can only see when the operator rotated it back approx. 90° to the right.

The mauch power systems uses different techniques to monitor current and voltage to handle the switch over.

Before I can comment further, I would need to know exactly what power module you are using and what is the hardware/electrical design, else its just a guess work.

Just think about it, drone is fine when on battery. Drone is fine when on tether. What’s left to troubleshoot here besides Mauch system? I could be wrong, but this is what I think.

High current draw from the battery is normal as prior to the switch over. I am talking about a voltage spike that makes your GPS/Compass to go haywire. That’s the only reason comes to my mind.

p.s. have you done a parameter comparison between the two drones yet?

There is one more thing you can try, but please answer and troubleshoot the above. How about take off on battery and switch to tether. Too much guess work here as we don’t your power design not sure if that is even technically possible.

Is the compass mounted far enough away from the power distribution and battery?
Is it a LiIon battery and has been mounted differently? Or just Lipo? (parameters suggest Lipo)

I would definitely set all the battery failsafe levels and actions correctly. Use MissionPlanner Initial Parameters section.

I would upgrade to Arducopter ver 4.2.3 at least, or latest stable ver 4.3.x

I would say do a flight running from the tether, and a separate flight running solely from battery.
Include as much yaw and maneuvering as the tether will allow in both flights.
Run both those .bin logs through MavExplorer Magfit utility and select the compass motor compensation setting.
Compare the results from each Magfit run to determine if new values can be used.

Maybe you will need to do a third test flight with the voltage source switch-over in flight and run that through Magfit. Remember to do plenty of yaw in each flight.

Unless space is really limited, it would be nice to have a current and voltage sensor each for tether and battery.

There’s other tuning that can be done too - better tuning can make a difference to current consumption and potentially flight times. Start a new thread for that if you need help.

Ill try to respond to all your questions :slight_smile:-)

  1. Mauch sensor: 100A / 200A Hall Sensor PM for Pixhawk / APM - PL-xxx Sensor Boards (mauch-electronic.com)

  2. Mauch PM: 100A / 200A Hall Sensor PM for Pixhawk / APM - PL 2-6S BEC (mauch-electronic.com) (version 4-6s/ x)

  3. Actually there are three people right now here, trying to find whats the problem.

  4. The potential voltage spike on 5v I2C we tried to reduce by putting a capacitor close to the RM3100. Didnt help-

  5. Yes, i have done a comparison between the two drones, and apart from the the calibration generated parameters, there are the same.

  6. Unfortunatelly there is no option for me to try to take off on battery and then switch to tether.

  7. Yets its liPo

  8. We will upgrade today and make more tests

  9. Ill do the maveplorer related hints from you today.

  10. Unfortunatelly i cannot place another sensor there :frowning:

  11. Yes, tuning might help, but i was worried by better tunning actually there is chance ill increase the spike

  12. Meanwhile we are still focusing on the fact, why in the logs you dont see, that the drone rotated to the left. My only explanation is, that because of the spike on mag data, some “filter decided” they are wrong and ignored them?

  13. The internall compass was never set to 0. Therefore is not calibrated. However when i see the release logs from 4.2.0 there was a bug in 4.1.5, which doesnt ignore data from internall compass while doing midflight “calibration?” “yaw aligment?”. But upgrading to 4.2.3 or 4.3.x should cross out this possible cause. So ill see today.

We will do more tests today, so ill definitelly let you know my new “discoveries” :slight_smile:
Meanwhile, thank you very much.

This might be a crazy idea but do you have an oscilloscope with storage, high Mhz?

If yes, can you remove the props, and connect the Oscilloscope to primary output of the Mauch, arm the quad using tether source let the motors spin and then switch to battery while on the ground.

Check for any voltage spikes or drops below 3.5V. If this happens well we got a problem.

Once you eliminate the power source issues, well then as others suggested you have some software issue going on.

Its not a crazy idea at all.
Actually it is a great idea.
And what is more, i have an option to secure the drone and do this with propellers on safely. (so there will be an actuall load)

Awesome, you really have to eliminate electronic hardware issues first to isolate the problem.

Measure each output of Mauch. One by one or if your scope has multiple inputs check all simultaneously.

Try it…i am still curious to see your drone pics :slight_smile:

Here I am with more test results.

  1. The problem with mauch is propably ruled out. We tested with osciloscope under load, and on the output of the mauch there is no voltage drop during switch.None at all. We also tested it near compass, and its also very good.
  2. We also ruled out faulty magnetometer, because we changed it with the one from working system.
  3. We also updated to 4.2.3, recalibrated everything, but it didnt help also.
  4. We had no time yet to “do” Magfit procedure. (it will be done next week)
  5. Please look at the logs from last flight. As you can see the Magnetometer sense correctly on X axis (M0 is external one) that the drone rotates when switched to battery (number 1 on graph) (even though its not desired): however, when you look at ATT_YAW it doesn’t changes. It looks like some filter ignored mag data, because of the spike on Z axis? (Maybe?)
  6. The moment 2 is when pilot rotated the drone back to its orginal position in altitude hold.
  7. Here is the drone we are talking about. The mag. is placed right under the GPS antenna.In the same cover. The GPS mount is a little bit different now, but places on the same location.

    The radio on top is not used, when doing this tests
  8. Also i have done again compass motor calibration, now on batteries. The interference was higher, than on tether, but still around 30. So that should be acceptable.
  9. The drone starts to do undesired movements after switching the power supply, but yet it can fly on batteries, when takes off from batteries. Therefore we are focusing on what changes during switch. And apart from sudden magfield change (on graph Mag_z), nothing else changes. So we are going to move the compass elsewhere. But it still doesn’t explain, why it works on the second drone. Even the cables are placed exactly the same way

Can you provide that log? or one with more yaw activity?

The log i described is in this folder.
Unfortunately I don’t have a log with more yaw movement.

Did you figured out the problem? Just curious…

I think the compass is too close to the source of interference, clearly the X and Z axis Mag readings are seriously affected when the change-over happens.
You’ll have to use a mast for that GPS unit with the compass in it, to get it further away.
Also maybe a couple of Low ESR capacitors somewhere might help reduce the spike. Maybe even a TVS diode like 1.5KE33A-TP , SMCJ28A or SMCJ30A - do some research if needed and check the specifications your self.