HexaXL flip on take off

I have an interesting problem.  I recently put my MK Hexa XL together with the MK power distribution board and BL-CTRL v2.0 ESCs.  I'm running an Arducopter Mega system with oilpan and I modified the code to run the controllers on I2C.  All that seems to run well.  I've been working on setting the PID values and its getting fairly stable.  I have one problem though.  When I run the first battery, everything is fine.  When I switch to the second battery, it does a backflip on takeoff.  I relevel multiple times and no joy.  It's almost like the direction of the gyro is getting flipped.  I do tend to run the battery down if that has a contributing factor.  I'm new to hexacopters, but I've been flying RC Helis for 35+ years.  Any guesses as to what is wrong?

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

Join diydrones

Email me when people reply –

Replies

  • Mike do you mind sharing your code to get the Hexa flying, I have one a s well that Ive been trying to intergrate for a while now with no luck. Im using Bl-Ctrl v 1.2.

    Thanks

  •  

    Maybe what you are seeing:

    1st battery starts to go flat, you remove it: charges in the Ecaps support the Microcontroller, as the Ecaps drain the various devices get a fake idea of where the + rail is, the eeprom is 'normally'  locked out by a reference to its power rails, and the same for the other telemetry devices, you have move the power rails relative to where they should be.

     

    Slap on another battery, the + rail jumps back to above where it used to be, the chips have not fully reset and the first crap that flaps around on the I/O pins gets stuffed into the devices.

     

    Number of ways to sort this out, power off longer, a shunt resistor, or an audit of the micro controller code/ PCB design to ensure the rails come down and devices reset faster, and that all I/O is locked out for a couple of hundred ms (if you watch a scope when someone connects a battery, it is very rarely a 'single' connection but rather a collection of bounces until everything is charged up and the connector is correctly seated)

     

  • Developer

     

    Seems like you have an EEPROM corruption. I suppose that it does work again with a first battery if you reset the EEPROM and redo the settings ?

     

    Perhaps you could connect through the ISP port, download the EEPROM content, and compare before and after the problem did occur.

     

    Eventually your ESCs could send a perturbating signal to the main AVR during boot up explaining the corruption. Can you try to disconnect your ESCs before to switch to the second battery, and connect them only after bootup ?

     

    I would try to disconnect the battery monitor temporarily to be sure just in case.

     

    Perhaps it would be simpler and safer to use the well tested APM PWM signals. I think there is a jumper on BL-CTRL v2.0 ESCs to switch them to PWM mode.

     

     

     

     

  • Developer

     

    "When I switch to the second battery"

     

    Can you explain how you do this and give some details about your powering method (BEC, separate battery for APM...)

     

    Seems like you have a power spike somewhere or a ground loop creating a corruption in the APM.

     

    You should power off / on the APM after connecting your second battery.

     

     

This reply was deleted.

Activity