ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    PWM ESC calibration for VOXL ESC 4-in-1 Mini and QGroundControl

    Flight Core v2
    3
    6
    125
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Martin LukacM
      Martin Lukac
      last edited by

      Hello!

      I have a FCv2 running px4 1.14 and 2.0.109. The VOXL ESC 4-in-1 mini is connected via J5 on the FCv2.

      The FCv2 is powered by a separate step down to 5V from the battery (not the modal power harness). I can power the ESC and the FCv2 separately.

      I'm able to control the motors with my RC so I know everything is working. I'm also able to test the motors through the actuators message in QGroundControl.

      The problem I have is that when I arm, the motors immediately start spinning.

      I think this means I need to do PWM ESC Calibration through QGroundControl, correct? With individual ESC, I think this is the equivalent step where you power them on with the throttle all the way up, they beep, and then you slide the throttle down.

      So my question is, what is the proper procedure to do this PWM ESC Calibration (no props) with QGroundControl with the FCv2 and ESC Mini?

      I get two error messages from QGC.

      The first error: 'calibration failed: battery unavailable'. This happens when:

      • The FCv2 powered only via USB and there is no power to the ESC

      The second error: 'battery must be disconnected. disconnect the battery and try again'. This happens when:

      • if I have power to the FC2 from the battery, USB connected to the FCv2, and NO POWER to the ESC.

      I've tried various combinations of powering the FCv2 separate from the ESC - e.g. with the modal power harness (so it is reporting battery voltage) and with my own harness that is providing just 5v (since the ESC is providing the power data to the FCv2).

      I've tried various combinations of all this and I get one of the two messages above.

      Is there some other way to perform the ESC calibraiton or adjust parameters so I the motors don't spin when I arm?

      Thank you!

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @Martin Lukac
        last edited by

        @Martin-Lukac , the ModalAI ESCs are not (typically) controlled via PWM signal, so the calibration of the PWM range is not supported for these ESCs.

        Instead, a one-time calibration (for a new motor/ prop/ voltage combination) needs to be done and a new ESC config file uploaded to the ESCs, as described here :https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/calibration.md . We recommend that you perform this calibration while your ESC is connected to a Linux PC, so you can verify the results using the data plots that our tools (voxl-esc) generate.

        Regarding arming / disarming.. The ModalAI ESC, while PX4 is running, is always armed and ready to spin. PX4 sends commands to the ESC and tells the ESC to not spin (stop). Whenever you are ready to fly, you send the takeoff command (or arm command) and the motors start spinning (at idle rpm if you are in manual control and your thrust is at minimum).

        Please note that after calibrating the ESC configuration using the procedure above, you also need to tell PX4 the new RPM range of your motor, so that the motor control is applied correctly. Please see the following doc with more information : https://docs.modalai.com/modal-esc-px4-user-guide/#px4-114-and-newer-eg-voxl2-using-voxl-esc

        You can think of armed stated is the state then the vehicle is ready to fly. When the propellers are not spinning, the vehicle is not ready to fly (disarmed).

        Please let me know if you have any other questions.

        Alex

        Martin LukacM 1 Reply Last reply Reply Quote 0
        • Martin LukacM
          Martin Lukac @Alex Kushleyev
          last edited by Martin Lukac

          @Alex-Kushleyev ,

          Thank you! We'll test this out and let you know if there are any issues.

          Just as a FYI, I found two issues with the documentation (I'm happy to send/post these elsewhere too).

          1. "Configure the Bitrate if needed (#3). For VOXL2, the default is 2000000, for FCv1/v2, use 250000." -> The motors would not spin at all UNLESS I had the bitrate set to 2000000 with my FCv2->VOXL-ESC-Mini. I spent a good couple hours trying to figure out why the motors would not spin with the actuator sliders and decided to try the higher bitrate at a whim and it worked.

          2. On this page, I think the diagram is wrong , it shows ground going to the second to last pin (pin 5) on the FCv2 and it should be the last pin (pin 6).

          Thanks again!

          Martin.

          Alex KushleyevA 1 Reply Last reply Reply Quote 0
          • Alex KushleyevA
            Alex Kushleyev ModalAI Team @Martin Lukac
            last edited by

            @Martin-Lukac ,

            The diagram for this variant of the ESC is correct : https://docs.modalai.com/modal-esc-datasheet/#connector-information-and-pin-outs. This applies to M0049, M0117 and M0134 ESCs.

            If you are using the M0129 mini ESC, it has a different connector : https://docs.modalai.com/voxl-mini-esc-datasheet/#connector-information-and-pin-outs

            Regarding the baud rate.. Your ESC probably came already set up to use 2Mbit baud rate in the ESC params. You have to make sure that the PX4 uses the baud rate that the ESC params are set to, otherwise there will be a baud rate mismatch. It looks like everything is working as expected.

            Alex

            Martin LukacM 1 Reply Last reply Reply Quote 0
            • Martin LukacM
              Martin Lukac @Alex Kushleyev
              last edited by

              @Alex-Kushleyev Thanks again!

              For the diagram I was referring to the FCv2 side. I attached a screenshot with what I think are the discrepancies highlighted. pin6 is ground and the table shows that, but the diagram shows pin 5 as ground. Apologies if I'm misunderstanding!

              M.

              71f35387-b817-4d57-bbaa-9b9888231ffa-image.png

              VinnyV 1 Reply Last reply Reply Quote 0
              • VinnyV
                Vinny ModalAI Team @Martin Lukac
                last edited by

                Hi @Martin-Lukac
                Good catch on the pin swap. The Table is correct, with Pin 6 = GND.

                The one thing I was wondering is related to this comment:
                " I can power the ESC and the FCv2 separately."
                That is not necessarily a good thing, and likely to lead to problems if you are powered up or down at different times. If one output (TX) is driving an unpowered input (RX), it could put the HW in a bad state. Please make sure to have them synced for ON and OFF.
                Thanks.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB | Contributors