Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. ESCs
  3. VOXL ESC FPV 4-in-1 with Built-in Power Module (MDK-M0138) Issues

VOXL ESC FPV 4-in-1 with Built-in Power Module (MDK-M0138) Issues

Scheduled Pinned Locked Moved ESCs
12 Posts 3 Posters 186 Views 2 Watching
  • 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.
  • Eric KatzfeyE Eric Katzfey

    What software versions are you using? Can you please create a PX4 log and share that via https://logs.px4.io/? Since logging normally doesn't start until you arm the drone you can force the logger to start and stop. For example, from the adb shell you can use px4-logger on to start a log and then px4-logger off to stop the log. Can you also paste the outputs from the detect / scan? Also review this other post: https://forum.modalai.com/topic/4833/throttle-doesnt-work/7

    J Offline
    J Offline
    jbiscan21
    Contributor
    wrote last edited by
    #3

    @Eric-Katzfey Attached below. I misspoke, it appears detect fails.

    Here is the link: PX4 Logs

    voxl2-test-fixture (TF-M0054):/$ voxl-version 
    ────────────────────────────────────────────────────────────────────────────────
    system-image: 1.8.06-M0054-14.1a-perf
    kernel:       #1 SMP PREEMPT Wed Oct 22 04:13:18 UTC 2025 4.19.125
    ────────────────────────────────────────────────────────────────────────────────
    hw platform:  M0054
    mach.var:     1.0.1
    SKU:          TF-M0054-4-V1-C11
    ────────────────────────────────────────────────────────────────────────────────
    voxl-suite:   1.6.3
    ────────────────────────────────────────────────────────────────────────────────
    Packages:
    Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.6/binary-arm64/
    Last Updated: 2026-08-06 19:57:23
    List:
    libfc-sensor                   1.0.9
    libmodal-cv                    0.6.0
    libmodal-exposure              0.1.4
    libmodal-flow                  1.0.3
    libmodal-journal               0.2.7
    libmodal-json                  0.4.8
    libmodal-pipe                  2.14.11
    libqrb5165-io                  0.6.3
    libvoxl-cci-direct             0.3.3
    libvoxl-codec                  0.0.2
    libvoxl-cutils                 0.1.6
    modalai-slpi                   1.2.2
    mv-voxl                        0.1-r0
    qrb5165-bind                   0.1-r0
    qrb5165-dfs-server             0.2.0
    qrb5165-mini-tof-server        0.2.2
    qrb5165-rangefinder-server     0.1.6
    qrb5165-slpi-test-sig          01-r0
    qrb5165-tflite                 2.17.2
    voxl-bind-spektrum             0.1.1
    voxl-camera-calibration        0.6.1
    voxl-camera-server             2.2.19
    voxl-ceres-solver              2:2.0.0-2
    voxl-configurator              1.1.5
    voxl-cpu-monitor               0.7.7
    voxl-docker-support            1.3.1
    voxl-elrs                      1.1.0
    voxl-esc                       1.6.3
    voxl-esptool                   0.2.0
    voxl-feature-tracker           0.5.2
    voxl-flow-server               0.3.6
    voxl-gphoto2-server            0.0.10
    voxl-imu-server                2.0.1
    voxl-io-server                 0.0.8
    voxl-jpeg-turbo                2.1.3-7
    voxl-lepton-server             1.3.3
    voxl-lepton-tracker            0.0.4
    voxl-libgeographic             1.0.0
    voxl-libgphoto2                0.0.4
    voxl-libuvc                    1.0.7
    voxl-logger                    0.6.1
    voxl-mavcam-manager            0.6.0
    voxl-mavlink                   0.1.6
    voxl-mavlink-server            1.4.14
    voxl-modem                     1.2.3
    voxl-mongoose                  7.19.0
    voxl-mpa-to-ros                0.3.9
    voxl-mpa-tools                 1.5.6
    voxl-nano-tracker              0.1.7
    voxl-open-vins-server          0.6.0
    voxl-opencv                    4.5.5-3
    voxl-osd                       0.3.8
    voxl-portal                    0.8.7
    voxl-px4                       1.14.0-2.0.133
    voxl-px4-params                0.9.0
    voxl-qvio-server               1.2.3
    voxl-remote-id                 0.0.9
    voxl-reset-slpi                0.0.1
    voxl-state-estimator           0.0.6
    voxl-streamer                  0.8.0
    voxl-suite                     1.6.3
    voxl-tag-detector              0.1.0
    voxl-tflite-server             0.5.1
    voxl-utils                     2.0.2
    voxl-uvc-server                0.1.7
    voxl-vision-hub                1.9.21
    voxl-vtx                       2.0.2
    voxl-wavemux                   0.0.3
    voxl2-io                       0.0.3
    voxl2-security-hardening-utls  1.0-r0
    voxl2-system-image             1.8.06-r0
    voxl2-wlan                     1.0-r0
    ────────────────────────────────────────────────────────────────────────────────
    
    voxl2-test-fixture (TF-M0054):/$ voxl-esc scan
    enabling bridge
    detected voxl-px4 is enabled
    Removed /etc/systemd/system/multi-user.target.wants/voxl-px4.service.
    detected voxl-px4 is running, stopping it now
    Sending kill slpi command!
    bridge enabled
    Detected Python version : 3.6.9 (default, May 22 2025, 20:54:22) 
    [GCC 8.4.0]
    Found voxl-esc tools bin version: 1.10
    VOXL Platform: QRB5165
    INFO: Scanning for ESC firmware: /dev/slpi-uart-2, baud: 2000000
    Sending library name request: libslpi_qrb5165_io.so
    Sending initialization request
    INFO: ESC(s) detected on port: /dev/slpi-uart-2, baud rate: 2000000, protocol: firmware
    
    
    INFO: ESC Information:
    INFO: ---------------------
    	ID         : 0
    	Board      : version 42: ModalAi 4-in-1 ESC (M0138-1)
    	UID        : 0x203837304848570400440022
    	Firmware   : version  39.25, hash a58f5f6f
    	Bootloader : version    187, hash aad89d63
    
    	ID         : 1
    	Board      : version 42: ModalAi 4-in-1 ESC (M0138-1)
    	UID        : 0x203837304848570300310055
    	Firmware   : version  39.25, hash a58f5f6f
    	Bootloader : version    187, hash aad89d63
    
    	ID         : 2
    	Board      : version 42: ModalAi 4-in-1 ESC (M0138-1)
    	UID        : 0x2038373048485705003A003F
    	Firmware   : version  39.25, hash a58f5f6f
    	Bootloader : version    187, hash aad89d63
    
    	ID         : 3
    	Board      : version 42: ModalAi 4-in-1 ESC (M0138-1)
    	UID        : 0x203837304848570400440025
    	Firmware   : version  39.25, hash a58f5f6f
    	Bootloader : version    187, hash aad89d63
    
    ---------------------
    successfully pinged ESCs
    disabling bridge
    Sending kill slpi command!
    re-enabling voxl-px4
    Created symlink /etc/systemd/system/multi-user.target.wants/voxl-px4.service → /etc/systemd/system/voxl-px4.service.
    restarting voxl-px4
    bridge disabled
    voxl2-test-fixture (TF-M0054):/$ voxl-esc detect 
    enabling bridge
    detected voxl-px4 is enabled
    Removed /etc/systemd/system/multi-user.target.wants/voxl-px4.service.
    detected voxl-px4 is running, stopping it now
    Sending kill slpi command!
    bridge enabled
    Received standard error event SNS_STD_ERROR_NOT_SUPPORTED
    Couldn't configure flight_controller sensor
    ERROR:   fc_sensor_initialize failed
    ERROR:   Failed to initialize slpi
    ERROR:   Encountered error while initializing bus 12
    [ERROR] No ESCs detected
    disabling bridge
    Sending kill slpi command!
    re-enabling voxl-px4
    Created symlink /etc/systemd/system/multi-user.target.wants/voxl-px4.service → /etc/systemd/system/voxl-px4.service.
    restarting voxl-px4
    bridge disabled
    EXITING VOXL-ESC WITH ERROR
    voxl2-test-fixture (TF-M0054):/$ 
    
    1 Reply Last reply
    0
    • Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote last edited by
      #4

      @jbiscan21 , have you tried the actuator test feature in QGC? make sure to remove propellers for safety.

      Also, as px4 starts up, the voxl-esc px4 driver will detect the ESCs and print some information, similar to what the CLI tool does without PX4. You can run voxl-px4 in foreground and check. voxl-px4 -d

      Alex

      J 1 Reply Last reply
      0
      • Alex KushleyevA Offline
        Alex KushleyevA Offline
        Alex Kushleyev
        ModalAI Team
        wrote last edited by Alex Kushleyev
        #5

        example of voxl-px4 driver output when running voxl-px4 -d:

        ...
        Starting VOXL ESC driver
        INFO  [qshell] Send cmd: 'voxl_esc start'
        INFO  [muorb] [uORB] Marking DeviceNode(qshell_req) as advertised in process_remote_topic
        INFO  [muorb] [qshell] qshell gotten: voxl_esc start
        INFO  [muorb] [qshell]   arg0 = 'voxl_esc'
        INFO  [muorb] [qshell]   arg1 = 'start'
        INFO  [uORB] Advertising remote topic actuator_outputs
        INFO  [muorb] [voxl_esc] Starting VOXL ESC driver
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_CONFIG: 1
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_MODE: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_BAUD: 2000000
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC1: 102
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC2: 103
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC3: 101
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC4: 104
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR1: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR2: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR3: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR4: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_PWR_MIN: 0.050000
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_RPM_MIN: 2000
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_RPM_MAX: 12000
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_PERC: 90
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_DEAD: 20
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_EXPO: 35
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_MINF: 0.150000
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_COSP: 0.990000
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_VLOG: 1
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_PUB_BST: 1
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_WARN: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_OVER: 0
        INFO  [muorb] [voxl_esc] Params: GPIO_CTL_CH: 0
        INFO  [muorb] [voxl_esc] Params: VOXL_ESC_CMD: 0
        INFO  [muorb] [qshell] Ok executing command: voxl_esc start
        INFO  [muorb] [voxl_esc] Opening UART ESC device 2, baud rate 2000000
        INFO  [muorb] [voxl_esc] Successfully opened UART ESC device
        INFO  [muorb] [voxl_esc] Detecting ESCs...
        INFO  [muorb] [voxl_esc] 	ESC ID     : 0
        INFO  [muorb] [voxl_esc] 	Board Type : 40: ModalAi 4-in-1 ESC (M0129-3)
        INFO  [muorb] [voxl_esc] 	Unique ID  : 0x2039333557555313000F0036
        INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash 9c6233d6
        INFO  [muorb] [voxl_esc] 	Bootloader : version  184, hash 10bf24c8
        INFO  [muorb] [voxl_esc] 	Reply time : 735us
        INFO  [muorb] [voxl_esc] VOXL_ESC:
        INFO  [muorb] [voxl_esc] 	ESC ID     : 1
        INFO  [muorb] [voxl_esc] 	Board Type : 40: ModalAi 4-in-1 ESC (M0129-3)
        INFO  [muorb] [voxl_esc] 	Unique ID  : 0x2039333557555313000F0032
        INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash 9c6233d6
        INFO  [muorb] [voxl_esc] 	Bootloader : version  184, hash 10bf24c8
        INFO  [muorb] [voxl_esc] 	Reply time : 721us
        INFO  [muorb] [voxl_esc] VOXL_ESC:
        INFO  [muorb] [voxl_esc] 	ESC ID     : 2
        INFO  [muorb] [voxl_esc] 	Board Type : 40: ModalAi 4-in-1 ESC (M0129-3)
        INFO  [muorb] [voxl_esc] 	Unique ID  : 0x2039333557555313000F0034
        INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash 9c6233d6
        INFO  [muorb] [voxl_esc] 	Bootloader : version  184, hash 10bf24c8
        INFO  [muorb] [voxl_esc] 	Reply time : 104us
        INFO  [muorb] [voxl_esc] VOXL_ESC:
        INFO  [muorb] [voxl_esc] 	ESC ID     : 3
        INFO  [muorb] [voxl_esc] 	Board Type : 40: ModalAi 4-in-1 ESC (M0129-3)
        INFO  [muorb] [voxl_esc] 	Unique ID  : 0x2039333557555313000F0038
        INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash 9c6233d6
        INFO  [muorb] [voxl_esc] 	Bootloader : version  184, hash 10bf24c8
        INFO  [muorb] [voxl_esc] 	Reply time : 727us
        INFO  [muorb] [voxl_esc] VOXL_ESC:
        INFO  [muorb] [voxl_esc] Use extended rpm packet : 1
        INFO  [muorb] [voxl_esc] All ESCs successfully detected
        ...
        
        1 Reply Last reply
        0
        • Alex KushleyevA Alex Kushleyev

          @jbiscan21 , have you tried the actuator test feature in QGC? make sure to remove propellers for safety.

          Also, as px4 starts up, the voxl-esc px4 driver will detect the ESCs and print some information, similar to what the CLI tool does without PX4. You can run voxl-px4 in foreground and check. voxl-px4 -d

          Alex

          J Offline
          J Offline
          jbiscan21
          Contributor
          wrote last edited by
          #6

          @Alex-Kushleyev

          Hello, using the actuator sliders in QGC results in the same behavior. The motors just spin at the same constant (arming) speed. Here are the results of voxl-px4 -d

          Starting VOXL ESC driver
          INFO  [qshell] Send cmd: 'voxl_esc start'
          INFO  [muorb] [uORB] Marking DeviceNode(qshell_req) as advertised in process_remote_topic
          INFO  [muorb] [qshell] qshell gotten: voxl_esc start
          INFO  [muorb] [qshell]   arg0 = 'voxl_esc'
          INFO  [muorb] [qshell]   arg1 = 'start'
          INFO  [uORB] Advertising remote topic actuator_outputs
          INFO  [muorb] [voxl_esc] Starting VOXL ESC driver
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_CONFIG: 1
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_MODE: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_BAUD: 2000000
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC1: 101
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC2: 104
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC3: 102
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_FUNC4: 103
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR1: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR2: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR3: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_SDIR4: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_PWR_MIN: 0.050000
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_RPM_MIN: 3000
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_RPM_MAX: 30653
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_PERC: 90
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_DEAD: 20
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_EXPO: 35
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_MINF: 0.150000
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_COSP: 0.990000
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_VLOG: 1
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_PUB_BST: 1
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_WARN: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_T_OVER: 0
          INFO  [muorb] [voxl_esc] Params: GPIO_CTL_CH: 0
          INFO  [muorb] [voxl_esc] Params: VOXL_ESC_CMD: 0
          INFO  [muorb] [qshell] Ok executing command: voxl_esc start
          INFO  [muorb] [voxl_esc] Opening UART ESC device 2, baud rate 2000000
          INFO  [muorb] [voxl_esc] Successfully opened UART ESC device
          INFO  [muorb] [voxl_esc] Detecting ESCs...
          INFO  [muorb] [voxl_esc] 	ESC ID     : 0
          INFO  [muorb] [voxl_esc] 	Board Type : 42: ModalAi 4-in-1 ESC (M0138-1)
          INFO  [qshell] qshell return value timestamp: 299177998, local time: 299182990
          INFO  [muorb] [voxl_esc] 	Unique ID  : 0x203837304848570400440022
          INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash a58f5f6f
          INFO  [muorb] [voxl_esc] 	Bootloader : version  187, hash aad89d63
          INFO  [muorb] [voxl_esc] 	Reply time : 709us
          INFO  [muorb] [voxl_esc] VOXL_ESC:
          INFO  [muorb] [voxl_esc] 	ESC ID     : 1
          INFO  [muorb] [voxl_esc] 	Board Type : 42: ModalAi 4-in-1 ESC (M0138-1)
          INFO  [muorb] [voxl_esc] 	Unique ID  : 0x203837304848570300310055
          INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash a58f5f6f
          INFO  [muorb] [voxl_esc] 	Bootloader : version  187, hash aad89d63
          INFO  [muorb] [voxl_esc] 	Reply time : 724us
          INFO  [muorb] [voxl_esc] VOXL_ESC:
          INFO  [muorb] [voxl_esc] 	ESC ID     : 2
          Starting CRSF RC driver
          INFO  [muorb] [voxl_esc] 	Board Type : 42: ModalAi 4-in-1 ESC (M0138-1)
          INFO  [muorb] [voxl_esc] 	Unique ID  : 0x2038373048485705003A003F
          INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash a58f5f6f
          INFO  [muorb] [voxl_esc] 	Bootloader : version  187, hash aad89d63
          INFO  [muorb] [voxl_esc] 	Reply time : 716us
          INFO  [muorb] [voxl_esc] VOXL_ESC:
          INFO  [muorb] [voxl_esc] 	ESC ID     : 3
          INFO  [muorb] [voxl_esc] 	Board Type : 42: ModalAi 4-in-1 ESC (M0138-1)
          INFO  [muorb] [voxl_esc] 	Unique ID  : 0x203837304848570400440025
          INFO  [muorb] [voxl_esc] 	Firmware   : version   39, hash a58f5f6f
          INFO  [muorb] [voxl_esc] 	Bootloader : version  187, hash aad89d63
          INFO  [muorb] [voxl_esc] 	Reply time : 706us
          INFO  [muorb] [voxl_esc] VOXL_ESC:
          INFO  [muorb] [voxl_esc] Use extended rpm packet : 1
          INFO  [muorb] [voxl_esc] All ESCs successfully detected
          INFO  [uORB] Advertising remote topic actuator_outputs_debug
          INFO  [uORB] Advertising remote topic esc_status
          
          
          1 Reply Last reply
          0
          • J Offline
            J Offline
            jbiscan21
            Contributor
            wrote last edited by
            #7

            @alex-kushleyev @eric-katzfey
            One thing I noticed, if I change ESC Command Type from RPM to PWM in the actuators tab, then I can increase the motor speeds

            1 Reply Last reply
            0
            • Alex KushleyevA Offline
              Alex KushleyevA Offline
              Alex Kushleyev
              ModalAI Team
              wrote last edited by Alex Kushleyev
              #8

              @jbiscan21 , can you also share the esc params that you uploaded to the ESC after ESC calibration ? I am assuming you went through this procedure : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/calibration.md

              From the log I see that all 4 motors spun up but the rpm is capped at about 2200 rpm, which may mean you ESC tuning params are incorrect.

              Also note that after arming, your drone immediately commands about 10000 rpm, which is not great, because that would be a sudden jump.. you may want to check your flight mode to avoid this.

              1d5d52fc-2b98-4178-b5c9-0d66e79cbf78-image.jpeg

              a7217253-aca1-474e-ab18-a019bd517185-image.jpeg

              J 1 Reply Last reply
              0
              • J Offline
                J Offline
                jbiscan21
                Contributor
                wrote last edited by
                #9

                Quick side questions @alex-kushleyev @eric-katzfey

                Have you ever calibrated PWM control with these drones or is that not advised?

                I am a bit confused on the RPM calibration process. It appears to me that the RPM control is closed loop, but one thing that does not make sense to me is the testing with props on. I understand that props on will simulate aerodynamic load for calibration but wouldn't the load be different in flight too? Or is the idea that props on calibration is closer to flight load than props off?

                1 Reply Last reply
                0
                • Alex KushleyevA Alex Kushleyev

                  @jbiscan21 , can you also share the esc params that you uploaded to the ESC after ESC calibration ? I am assuming you went through this procedure : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/calibration.md

                  From the log I see that all 4 motors spun up but the rpm is capped at about 2200 rpm, which may mean you ESC tuning params are incorrect.

                  Also note that after arming, your drone immediately commands about 10000 rpm, which is not great, because that would be a sudden jump.. you may want to check your flight mode to avoid this.

                  1d5d52fc-2b98-4178-b5c9-0d66e79cbf78-image.jpeg

                  a7217253-aca1-474e-ab18-a019bd517185-image.jpeg

                  J Offline
                  J Offline
                  jbiscan21
                  Contributor
                  wrote last edited by
                  #10

                  @Alex-Kushleyev Yes I want through that procedure. Here are my params:

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <!-- Copyright (c) 2020 ModalAI Inc.
                  
                  Redistribution and use in source and binary forms, with or without
                  modification, are permitted provided that the following conditions are met:
                  
                  1. Redistributions of source code must retain the above copyright notice,
                     this list of conditions and the following disclaimer.
                  
                  2. Redistributions in binary form must reproduce the above copyright notice,
                     this list of conditions and the following disclaimer in the documentation
                     and/or other materials provided with the distribution.
                  
                  3. Neither the name of the copyright holder nor the names of its contributors
                     may be used to endorse or promote products derived from this software
                     without specific prior written permission.
                  
                  4. The Software is used solely in conjunction with devices provided by
                     ModalAI Inc.
                  
                  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
                  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
                  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                  POSSIBILITY OF SUCH DAMAGE.
                  
                  For a license to use on non-ModalAI hardware, please contact license@modalai.com -->
                  
                  <EscParameters>
                  
                    <IdParams>
                      <param name="id"              value="127"/>  <!-- 0-7 .. 127 means use hardware ID pins to read ID-->
                      <param name="dir"             value="2"/>    <!-- 0=fwd, 1=rev, 2=fwd id-based, 3=rev id-based -->
                    </IdParams>
                  
                    <UartParams>
                      <param name="protocol_version" value="2"/>          <!-- reserved for future use -->
                      <param name="input_mode"       value="0"/>          <!-- reserved for future use -->
                      <param name="baud_rate"        value="2000000"/>     <!-- communication bit rate -->
                      <param name="char_timeout_ns"  value="0"/>          <!-- not used -->
                      <param name="cmd_timeout_ns"   value="100000000"/>  <!-- timeout for incoming commands before ESC will stop the motor -->
                    </UartParams>
                  
                    <TuneParams>
                      <param name="pwm_frequency"       value="48000"/>  <!-- switching freqency of PWM signal going to motors. 24Khz and 48Khz are only options for now -->
                      <param name="vbat_nominal_mv"     value="22200"/>  <!-- used for sanity checking and limiting of voltage-dependent funcions -->
                      <param name="num_cycles_per_rev"  value="7"/>      <!-- number of pole pairs in the motor. used for converting electrical frequency to mechanical rpm -->
                      <param name="min_rpm"             value="3020"/>   <!-- WARNING: not tuned. minimum RPM that will be attempted, otherwise capped -->
                      <param name="max_rpm"             value="26311"/>   <!-- WARNING: not tuned. maximum RPM that will be attempted, otherwise capped -->
                      <param name="min_pwm"             value="75"/>     <!-- cap for minimum power to be ever applied. min is 75  -->
                      <param name="max_pwm"             value="9999"/>    <!-- cap for maximum power to be ever applied. max is 999 -->
                      <param name="pwm_vs_rpm_curve_a0" value="-92.6079829269"/>    <!-- this is actually motor_voltage vs rpm curve.. using legacy naming -->
                      <param name="pwm_vs_rpm_curve_a1" value="0.813657468926"/>    <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                      <param name="pwm_vs_rpm_curve_a2" value="2.69099700436e-06"/>    <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                      <param name="kp"                  value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                      <param name="ki"                  value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                      <param name="max_kpe"             value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                      <param name="max_kie"             value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                      <param name="max_rpm_delta"       value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                  
                      <param name="spinup_type"         value="1"/>      <!-- 0: traditional, 1: sinusoidal -->
                      <param name="spinup_power"        value="60"/>     <!-- power used to during spin-up procedure -->
                      <param name="latch_power"         value="60"/>    <!-- power used during latching stage of spin-up (out of 999)-->
                      <param name="spinup_power_ramp"   value="8"/>      <!-- it will take ( 4096 / (spinup_power_ramp*10000) ) seconds to ramp sinusoidal start-up power from 0 to spinup_power -->
                      <param name="spinup_rpm_target"   value="2000"/>   <!-- Desired RPM at the end of the sinusoidal spin-up procedure -->
                      <param name="spinup_time_ms"      value="500"/>   <!-- Duration of the sinusoidal spin-up procedure -->
                      <param name="spinup_bemf_comp"    value="1"/>      <!-- 0: disable, 1:enable back-emf compensation in sinusoidal spin-up procedure -->
                      <param name="motor_kv"            value="2300"/>   <!-- kV value of the motor. used in back-emf compensation during spin-up -->
                  
                      <param name="min_num_cross_for_closed_loop" value="10"/>  <!-- exit latching mode of fixed power after this number of zero crossings -->
                      <param name="protection_stall_check_rpm" value="1000"/> <!-- if motor spins below this RPM, stall check will trigger and stop / restart the motor -->
                  
                      <param name="brake_to_stop"       value="0"/>             <!-- apply brake when stopping motor (or not) -->
                      <param name="stall_timeout_ns"    value="20000000"/>      <!-- after spin-up, if no zero crossing is not detected for this amount of time, motor is considered stalled -->
                      <param name="require_reset_if_stalled"      value="0"/>   <!-- require sending an array of zero commands to reset before next spin-up, if motor stalled -->
                  
                      <param name="tone_freqs"          value="[200, 215, 225, 250, 0,0,0,0, 0,0,0,0]"/> <!-- 200 is 2000Hz, max 255 -->
                      <param name="tone_durations"      value="[3,     0,    0,  0,  0,0,0,0, 0,0,0,0]"/> <!-- duration of each tone in units of 10 milli-seconds. Poor naming!!! -->
                      <param name="tone_powers"         value="[20,    0,    0,  0,  0,0,0,0, 0,0,0,0]"/> <!-- max is 255 -->
                  
                      <param name="dt_threshold_ns"       value="150000"/>      <!-- during start up, ignore inter-commutation times less than this val, probably noise -->
                      <param name="max_dt_ns"             value="2500000"/>     <!-- min and max values for time between two commutations. these are used as caps -->
                      <param name="min_dt_ns"             value="10000"/>
                      <param name="dt_bootstrap_ns"       value="2000000"/>     <!-- filter bootstrap value for commutation dt during start up -->
                  
                      <param name="spinup_stall_dt_ns"    value="6000000"/>     <!-- during spin-up, if no zero crossing is not detected for this amount of time, motor is considered stalled -->
                      <param name="spinup_stall_check_ns" value="30000000"/>    <!-- time after beginning of spinup to start checking for spinup stall -->
                  
                      <param name="alignment_time_ns"     value="0"/>           <!-- alignment time before spin-up -->
                      <param name="timing_advance"        value="0"/>
                      <param name="sense_advance"         value="0"/>
                  
                      <param name="demag_timing"          value="0"/>       <!-- unused -->
                      <param name="led_config"            value="0"/>       <!-- 0: enable status LEDs in bootloader and firmware, 1: disable LEDs in boot and firmware: 2: disable LEDs only in firmware. need FW 39.25 or later -->
                  
                    </TuneParams>
                  </EscParameters>
                  
                  
                  J 1 Reply Last reply
                  0
                  • J jbiscan21

                    @Alex-Kushleyev Yes I want through that procedure. Here are my params:

                    <?xml version="1.0" encoding="UTF-8"?>
                    
                    <!-- Copyright (c) 2020 ModalAI Inc.
                    
                    Redistribution and use in source and binary forms, with or without
                    modification, are permitted provided that the following conditions are met:
                    
                    1. Redistributions of source code must retain the above copyright notice,
                       this list of conditions and the following disclaimer.
                    
                    2. Redistributions in binary form must reproduce the above copyright notice,
                       this list of conditions and the following disclaimer in the documentation
                       and/or other materials provided with the distribution.
                    
                    3. Neither the name of the copyright holder nor the names of its contributors
                       may be used to endorse or promote products derived from this software
                       without specific prior written permission.
                    
                    4. The Software is used solely in conjunction with devices provided by
                       ModalAI Inc.
                    
                    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
                    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
                    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                    POSSIBILITY OF SUCH DAMAGE.
                    
                    For a license to use on non-ModalAI hardware, please contact license@modalai.com -->
                    
                    <EscParameters>
                    
                      <IdParams>
                        <param name="id"              value="127"/>  <!-- 0-7 .. 127 means use hardware ID pins to read ID-->
                        <param name="dir"             value="2"/>    <!-- 0=fwd, 1=rev, 2=fwd id-based, 3=rev id-based -->
                      </IdParams>
                    
                      <UartParams>
                        <param name="protocol_version" value="2"/>          <!-- reserved for future use -->
                        <param name="input_mode"       value="0"/>          <!-- reserved for future use -->
                        <param name="baud_rate"        value="2000000"/>     <!-- communication bit rate -->
                        <param name="char_timeout_ns"  value="0"/>          <!-- not used -->
                        <param name="cmd_timeout_ns"   value="100000000"/>  <!-- timeout for incoming commands before ESC will stop the motor -->
                      </UartParams>
                    
                      <TuneParams>
                        <param name="pwm_frequency"       value="48000"/>  <!-- switching freqency of PWM signal going to motors. 24Khz and 48Khz are only options for now -->
                        <param name="vbat_nominal_mv"     value="22200"/>  <!-- used for sanity checking and limiting of voltage-dependent funcions -->
                        <param name="num_cycles_per_rev"  value="7"/>      <!-- number of pole pairs in the motor. used for converting electrical frequency to mechanical rpm -->
                        <param name="min_rpm"             value="3020"/>   <!-- WARNING: not tuned. minimum RPM that will be attempted, otherwise capped -->
                        <param name="max_rpm"             value="26311"/>   <!-- WARNING: not tuned. maximum RPM that will be attempted, otherwise capped -->
                        <param name="min_pwm"             value="75"/>     <!-- cap for minimum power to be ever applied. min is 75  -->
                        <param name="max_pwm"             value="9999"/>    <!-- cap for maximum power to be ever applied. max is 999 -->
                        <param name="pwm_vs_rpm_curve_a0" value="-92.6079829269"/>    <!-- this is actually motor_voltage vs rpm curve.. using legacy naming -->
                        <param name="pwm_vs_rpm_curve_a1" value="0.813657468926"/>    <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                        <param name="pwm_vs_rpm_curve_a2" value="2.69099700436e-06"/>    <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                        <param name="kp"                  value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                        <param name="ki"                  value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                        <param name="max_kpe"             value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                        <param name="max_kie"             value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                        <param name="max_rpm_delta"       value="0"/>      <!-- WARNING: RPM controller params are disabled since motor is not tuned -->
                    
                        <param name="spinup_type"         value="1"/>      <!-- 0: traditional, 1: sinusoidal -->
                        <param name="spinup_power"        value="60"/>     <!-- power used to during spin-up procedure -->
                        <param name="latch_power"         value="60"/>    <!-- power used during latching stage of spin-up (out of 999)-->
                        <param name="spinup_power_ramp"   value="8"/>      <!-- it will take ( 4096 / (spinup_power_ramp*10000) ) seconds to ramp sinusoidal start-up power from 0 to spinup_power -->
                        <param name="spinup_rpm_target"   value="2000"/>   <!-- Desired RPM at the end of the sinusoidal spin-up procedure -->
                        <param name="spinup_time_ms"      value="500"/>   <!-- Duration of the sinusoidal spin-up procedure -->
                        <param name="spinup_bemf_comp"    value="1"/>      <!-- 0: disable, 1:enable back-emf compensation in sinusoidal spin-up procedure -->
                        <param name="motor_kv"            value="2300"/>   <!-- kV value of the motor. used in back-emf compensation during spin-up -->
                    
                        <param name="min_num_cross_for_closed_loop" value="10"/>  <!-- exit latching mode of fixed power after this number of zero crossings -->
                        <param name="protection_stall_check_rpm" value="1000"/> <!-- if motor spins below this RPM, stall check will trigger and stop / restart the motor -->
                    
                        <param name="brake_to_stop"       value="0"/>             <!-- apply brake when stopping motor (or not) -->
                        <param name="stall_timeout_ns"    value="20000000"/>      <!-- after spin-up, if no zero crossing is not detected for this amount of time, motor is considered stalled -->
                        <param name="require_reset_if_stalled"      value="0"/>   <!-- require sending an array of zero commands to reset before next spin-up, if motor stalled -->
                    
                        <param name="tone_freqs"          value="[200, 215, 225, 250, 0,0,0,0, 0,0,0,0]"/> <!-- 200 is 2000Hz, max 255 -->
                        <param name="tone_durations"      value="[3,     0,    0,  0,  0,0,0,0, 0,0,0,0]"/> <!-- duration of each tone in units of 10 milli-seconds. Poor naming!!! -->
                        <param name="tone_powers"         value="[20,    0,    0,  0,  0,0,0,0, 0,0,0,0]"/> <!-- max is 255 -->
                    
                        <param name="dt_threshold_ns"       value="150000"/>      <!-- during start up, ignore inter-commutation times less than this val, probably noise -->
                        <param name="max_dt_ns"             value="2500000"/>     <!-- min and max values for time between two commutations. these are used as caps -->
                        <param name="min_dt_ns"             value="10000"/>
                        <param name="dt_bootstrap_ns"       value="2000000"/>     <!-- filter bootstrap value for commutation dt during start up -->
                    
                        <param name="spinup_stall_dt_ns"    value="6000000"/>     <!-- during spin-up, if no zero crossing is not detected for this amount of time, motor is considered stalled -->
                        <param name="spinup_stall_check_ns" value="30000000"/>    <!-- time after beginning of spinup to start checking for spinup stall -->
                    
                        <param name="alignment_time_ns"     value="0"/>           <!-- alignment time before spin-up -->
                        <param name="timing_advance"        value="0"/>
                        <param name="sense_advance"         value="0"/>
                    
                        <param name="demag_timing"          value="0"/>       <!-- unused -->
                        <param name="led_config"            value="0"/>       <!-- 0: enable status LEDs in bootloader and firmware, 1: disable LEDs in boot and firmware: 2: disable LEDs only in firmware. need FW 39.25 or later -->
                    
                      </TuneParams>
                    </EscParameters>
                    
                    
                    J Offline
                    J Offline
                    jbiscan21
                    Contributor
                    wrote last edited by
                    #11

                    @alex-kushleyev Alright I feel pretty dumb. But it is because the PID gains were zero in my config file...

                    1 Reply Last reply
                    0
                    • Alex KushleyevA Offline
                      Alex KushleyevA Offline
                      Alex Kushleyev
                      ModalAI Team
                      wrote last edited by
                      #12

                      Hi @jbiscan21 ,

                      The main issue was that the max_rpm_delta was set to zero. Even with PI gains (and max errors) set to zero, you could have had it working with non-zero max_rpm_delta. Let me explain.

                      max_rpm_delta term is used to cap the target rpm relative to the current rpm. This is done to prevent very aggressive motor behavior, especially if motor is spinning very slowly because it is tangled in grass, etc, allowing unlimited max_rpm_delta could cause motor to burn out or de-sync.

                      The RPM controller has a feed-forward term and feedback terms.

                      • feedback terms are Proportional and Integral with corresponding gains and error terms (k * e).
                      • feed-forward term comes from the calibration : for desired RPM, the calibration tells the ESC what PWM (duty cycle) to apply
                      • there is also battery voltage compensation, so that even if voltage is changing, the feed-forward curve will still be accurate.

                      The rpm error is computed like so : rpm_error = rpm_desired - rpm_current, which standard. But then it is capped with the max_rpm_delta, so if that is equal to zero, then rpm_error will be zero. One subtle detail is that the rpm_error is also used to look up the desired rpm feed_forward : rpm_for_feed_forward_term = rpm_current + rpm_error (roughly speaking), so having the max_rpm_delta set to zero, caused the motor to be always stuck at minimum rpm.

                      So you could still have zero P and I terms and the motor would use a feed forward term with voltage compensation and it would provide a nice and soft response (similar to traditional ESC). Adding P and I will make the response better than a traditional ESC.

                      In fact when using a new motor + prop, you should start off with P and I gains zero, just use a feed forward term to test at first and then you can increase the ESC's responsiveness by giving it more max_rpm_delta and also P and I terms. However, that is more advanced tuning should be done using voxl-esc tools first in order ensure ESC response stability (we could discuss that in another thread).

                      To answer your earlier questions:

                      • You could use pwm (power) control, but i have never used it with PX4. Perhaps @eric-katzfey can comment about that
                      • the ESC calibration for modalai ESCs calibrates the feed-forward term (as described above), and has to be done with a propeller. Yes, in flight, the air dynamics will change due to many factors such as air pressure, temperature, air speed, etc, etc, but the job of RPM controller is to keep a desired rpm. A higher level controller could potentially estimate the thrust vs rpm is changing due to air temperature or pressure difference from the calibrated response (outside of the scope of ESC's rpm controller).

                      Alex

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      ModalAI
                      Categories Recent Tags ModalAI.com Docs
                      © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups