ESC Calibration and Potential Motor Failure
-
Background
We are seeing some issues with one of four motors on a Starling 2 Max not spinning at the same rate (very low RPMs). We've run a few troubleshooting steps by attempting to arm and using thevoxl-esc-spin.py
script.Our initial diagnosis is that the motor may need to be replaced since the voltage being passed through is comparable to the voltage passed through to other motors. However, there is no visible damage to the motor or any wires.
We also attempted to run the
px4-esc-cal-tool-v1-11.py
according to the instructions here: https://docs.modalai.com/flight-core-pwm-esc-calibration/. We ran into some issues running the script here during the interactive prompts:No Serial Connection Found for px4-esc-cal-tool-v1-11.py
We were using the provided MCBL-00009-1 JST-to-USB Female A connector, but were unable to establish a serial connection to our machine. See attached image
We used multiple different connectors along with USB A to C cords to attempt the connection to rule out a cable issue.
Our development machines are Apple M4 Max MacBook Pros running MacOS Sequoia 15.3.2Request(s)
Do you have any additional troubleshooting steps?
Any guidance on getting thepx4-esc-cal-tool
to work?
Is our diagnosis on the right track and the next steps would be to replace the motors? If so, is there a guide to replacing motors on a Starling 2 Max?Attachments
Output and relevant VOXL version information is attached or pasted below.VOXL Version:
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 4.19.125 aarch64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro This system has been minimized by removing packages and content that are not required on a system that users do not log into. To restore this content, you can run the 'unminimize' command. ▂▂▂▂▂▂▂▂▂▂▂▂▂ ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂ ███╗ ███╗ ██████╗ ██████╗ █████╗ ██╗ ▗▆████▀▔ ▔▔▀▀▀▀▚▄ ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║ ▗▟████▀ ▗██▖ ▐█ ▝▀▆▄▄▄ ██╔████╔██║██║ ██║██║ ██║███████║██║ ▟████▀ ▗█▘▝█▖ ▐█ ▜█▀█▄ ██║╚██╔╝██║██║ ██║██║ ██║██╔══██║██║ █▌ ▐█▌ ▗█▘ ▝█▖ ▐█ ▐▄ ▄█ ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║ ██║███████╗ ▀████ ▗█▘ ▝█▖ ▐█ ▂▄███▀ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ▀▀██▄▄ ▂▆███▀ ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘ -------------------------------------------------------------------------------- system-image: 1.7.8-M0054-14.1a-perf kernel: #1 SMP PREEMPT Sat May 18 00:10:25 UTC 2024 4.19.125 -------------------------------------------------------------------------------- hw platform: M0054 mach.var: 1.0.1 -------------------------------------------------------------------------------- voxl-suite: 1.3.2 -------------------------------------------------------------------------------- current IP: tun0: 10.8.0.7 --------------------------------------------------------------------------------
voxl-esc-spin.py
output (trimmed in the middle because values are more or less consistent):./voxl-esc-spin.py --id 255 --power 60 --ramp-time 3.0 --timeout 4.0 --enable-plot 1 Detected Python version : 3.6.9 (default, Mar 10 2023, 16:46:00) [GCC 8.4.0] Found voxl-esc tools bin version: 1.9 VOXL Platform: M0054 Detected RB5 Flight, VOXL2 M0054 or M0104! 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 ID : 0 Board : version 40: ModalAi 4-in-1 ESC (M0129-3) UID : 0x2039333557555313002A002D Firmware : version 39, hash eb6fb500 Bootloader : version 184, hash 10bf24c8 ID : 1 Board : version 40: ModalAi 4-in-1 ESC (M0129-3) UID : 0x2039333557555313002A0022 Firmware : version 39, hash eb6fb500 Bootloader : version 184, hash 10bf24c8 ID : 2 Board : version 40: ModalAi 4-in-1 ESC (M0129-3) UID : 0x2039333557555313002A002B Firmware : version 39, hash eb6fb500 Bootloader : version 184, hash 10bf24c8 ID : 3 Board : version 40: ModalAi 4-in-1 ESC (M0129-3) UID : 0x2039333557555313002A002C Firmware : version 39, hash eb6fb500 Bootloader : version 184, hash 10bf24c8 --------------------- WARNING: This test requires motors to spin at high speeds with propellers attached. Please ensure that appropriate protective equipment is being worn at all times and that the motor and propeller are adequately isolated from all persons. For best results, please perform this test at the nominal voltage for the battery used. Type "Yes" to continue: yes [0.017] (0) RPM: 0, PWR: 0, VOLTAGE: 0.000V, TEMPERATURE: 0.00C, CURRENT: 0.000A [0.017] (1) RPM: 0, PWR: 0, VOLTAGE: 0.000V, TEMPERATURE: 0.00C, CURRENT: 0.000A [0.017] (2) RPM: 0, PWR: 0, VOLTAGE: 0.000V, TEMPERATURE: 0.00C, CURRENT: 0.000A [0.017] (3) RPM: 0, PWR: 0, VOLTAGE: 0.000V, TEMPERATURE: 0.00C, CURRENT: 0.000A [0.037] (0) RPM: 0, PWR: 0, VOLTAGE: 0.000V, TEMPERATURE: 0.00C, CURRENT: 0.000A [0.037] (1) RPM: 0, PWR: 0, VOLTAGE: 16.178V, TEMPERATURE: 45.11C, CURRENT: 0.000A [0.037] (2) RPM: 19, PWR: 1, VOLTAGE: 16.160V, TEMPERATURE: 45.97C, CURRENT: 0.000A [0.037] (3) RPM: 0, PWR: 0, VOLTAGE: 0.000V, TEMPERATURE: 0.00C, CURRENT: 0.000A [0.062] (0) RPM: 68, PWR: 6, VOLTAGE: 16.130V, TEMPERATURE: 46.55C, CURRENT: 0.000A, BOARD_VOLTAGE: 16.153V, BOARD_CURRENT: 0.400A [0.062] (1) RPM: 0, PWR: 0, VOLTAGE: 16.178V, TEMPERATURE: 45.11C, CURRENT: 0.000A, BOARD_VOLTAGE: 16.153V, BOARD_CURRENT: 0.400A [0.062] (2) RPM: 19, PWR: 1, VOLTAGE: 16.160V, TEMPERATURE: 45.97C, CURRENT: 0.000A, BOARD_VOLTAGE: 16.153V, BOARD_CURRENT: 0.400A [0.062] (3) RPM: 50, PWR: 4, VOLTAGE: 16.153V, TEMPERATURE: 48.16C, CURRENT: 0.000A, BOARD_VOLTAGE: 16.153V, BOARD_CURRENT: 0.400A [0.076] (0) RPM: 68, PWR: 6, VOLTAGE: 16.130V, TEMPERATURE: 46.55C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.076] (1) RPM: 85, PWR: 8, VOLTAGE: 16.022V, TEMPERATURE: 45.22C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.076] (2) RPM: 118, PWR: 11, VOLTAGE: 15.954V, TEMPERATURE: 46.01C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.076] (3) RPM: 140, PWR: 11, VOLTAGE: 15.874V, TEMPERATURE: 48.30C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.092] (0) RPM: 155, PWR: 11, VOLTAGE: 15.868V, TEMPERATURE: 46.51C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.092] (1) RPM: 85, PWR: 8, VOLTAGE: 16.022V, TEMPERATURE: 45.22C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.092] (2) RPM: 118, PWR: 11, VOLTAGE: 15.954V, TEMPERATURE: 46.01C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.092] (3) RPM: 140, PWR: 11, VOLTAGE: 15.874V, TEMPERATURE: 48.30C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A [0.119] (0) RPM: 155, PWR: 11, VOLTAGE: 15.868V, TEMPERATURE: 46.51C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.874V, BOARD_CURRENT: 2.408A ... [3.816] (0) RPM: 15173, PWR: 60, VOLTAGE: 15.986V, TEMPERATURE: 48.44C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.816] (1) RPM: 745, PWR: 60, VOLTAGE: 15.985V, TEMPERATURE: 46.30C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.816] (2) RPM: 15240, PWR: 60, VOLTAGE: 15.972V, TEMPERATURE: 48.39C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.816] (3) RPM: 15233, PWR: 60, VOLTAGE: 15.980V, TEMPERATURE: 49.93C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.838] (0) RPM: 15173, PWR: 60, VOLTAGE: 15.986V, TEMPERATURE: 48.44C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.838] (1) RPM: 798, PWR: 60, VOLTAGE: 15.992V, TEMPERATURE: 46.36C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.838] (2) RPM: 15223, PWR: 60, VOLTAGE: 15.970V, TEMPERATURE: 48.39C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.838] (3) RPM: 15252, PWR: 60, VOLTAGE: 15.979V, TEMPERATURE: 49.96C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.980V, BOARD_CURRENT: 1.104A [3.854] (0) RPM: 15159, PWR: 60, VOLTAGE: 15.991V, TEMPERATURE: 48.43C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.854] (1) RPM: 798, PWR: 60, VOLTAGE: 15.992V, TEMPERATURE: 46.36C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.854] (2) RPM: 15223, PWR: 60, VOLTAGE: 15.970V, TEMPERATURE: 48.39C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.854] (3) RPM: 15252, PWR: 60, VOLTAGE: 15.979V, TEMPERATURE: 49.96C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.876] (0) RPM: 15159, PWR: 60, VOLTAGE: 15.991V, TEMPERATURE: 48.43C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.876] (1) RPM: 816, PWR: 60, VOLTAGE: 15.990V, TEMPERATURE: 46.32C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.876] (2) RPM: 15223, PWR: 60, VOLTAGE: 15.970V, TEMPERATURE: 48.39C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.876] (3) RPM: 15252, PWR: 60, VOLTAGE: 15.979V, TEMPERATURE: 49.96C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.979V, BOARD_CURRENT: 1.144A [3.892] (0) RPM: 15171, PWR: 60, VOLTAGE: 15.982V, TEMPERATURE: 48.42C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.892] (1) RPM: 855, PWR: 60, VOLTAGE: 15.986V, TEMPERATURE: 46.36C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.892] (2) RPM: 15269, PWR: 60, VOLTAGE: 15.965V, TEMPERATURE: 48.41C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.892] (3) RPM: 15252, PWR: 60, VOLTAGE: 15.981V, TEMPERATURE: 49.97C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.914] (0) RPM: 15171, PWR: 60, VOLTAGE: 15.982V, TEMPERATURE: 48.42C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.914] (1) RPM: 855, PWR: 60, VOLTAGE: 15.986V, TEMPERATURE: 46.36C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.914] (2) RPM: 15261, PWR: 60, VOLTAGE: 15.973V, TEMPERATURE: 48.43C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.914] (3) RPM: 15252, PWR: 60, VOLTAGE: 15.981V, TEMPERATURE: 49.97C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.981V, BOARD_CURRENT: 1.144A [3.935] (0) RPM: 15170, PWR: 60, VOLTAGE: 15.987V, TEMPERATURE: 48.40C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.935] (1) RPM: 855, PWR: 60, VOLTAGE: 15.986V, TEMPERATURE: 46.36C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.935] (2) RPM: 15261, PWR: 60, VOLTAGE: 15.973V, TEMPERATURE: 48.43C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.935] (3) RPM: 15244, PWR: 60, VOLTAGE: 15.976V, TEMPERATURE: 49.98C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.960] (0) RPM: 15170, PWR: 60, VOLTAGE: 15.987V, TEMPERATURE: 48.40C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.960] (1) RPM: 750, PWR: 60, VOLTAGE: 15.989V, TEMPERATURE: 46.32C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.960] (2) RPM: 15290, PWR: 60, VOLTAGE: 15.973V, TEMPERATURE: 48.41C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.960] (3) RPM: 15244, PWR: 60, VOLTAGE: 15.976V, TEMPERATURE: 49.98C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.976V, BOARD_CURRENT: 1.192A [3.976] (0) RPM: 15170, PWR: 60, VOLTAGE: 15.987V, TEMPERATURE: 48.40C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.976] (1) RPM: 750, PWR: 60, VOLTAGE: 15.989V, TEMPERATURE: 46.32C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.976] (2) RPM: 15290, PWR: 60, VOLTAGE: 15.973V, TEMPERATURE: 48.41C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.976] (3) RPM: 15245, PWR: 60, VOLTAGE: 15.974V, TEMPERATURE: 49.98C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.994] (0) RPM: 15169, PWR: 60, VOLTAGE: 15.986V, TEMPERATURE: 48.46C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.994] (1) RPM: 700, PWR: 60, VOLTAGE: 16.000V, TEMPERATURE: 46.28C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.994] (2) RPM: 15261, PWR: 60, VOLTAGE: 15.981V, TEMPERATURE: 48.48C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A [3.994] (3) RPM: 15245, PWR: 60, VOLTAGE: 15.974V, TEMPERATURE: 49.98C, CURRENT: 0.000A, BOARD_VOLTAGE: 15.974V, BOARD_CURRENT: 1.248A Finished! [3.994172] TX=404, RX=501 packets, RX CRC ERRORS=0 Average RPMs: 15155.23 1018.99 15249.99 15239.80 Average RPM deviation between ESCs : 14231.00 WARNING: In order to plot the results, install the Python "plotly" module: pip3 install plotly --upgrade
-
Hello @dan64,
The
px4-esc-cal-tool
does not apply to ModalAI uart-based ESCs. That tool was used for calibrating ESC response to PWM control signal for old-style ESCs.There is no need to re-calibrate the ModalAI ESC if you use a stock configuration, such as the motor + propeller that comes with Starling 2 MAX.
The ESC parameters for this motor + propeller are located here : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-params/D0012_Starling_MAX/esc_params_m0129_f2203_5_1500kv_7x3.7x3.xml
You could use
voxl-esc
tools to verify this. Since you already ran the spin test usingvoxl-esc
tools, this should be somewhat familiar../voxl-esc-verify-params.py
This should query all the params on your ESC and they should match the same param file (which is also stored in
/usr/share/modalai/voxl-esc-params/
folder.From the test spin results, it does appear that a motor may be faulty. I am assuming this behavior happens every time you run the test. However, you can never know for sure that the motor is at fault - it could be an ESC issue. In such case, the best thing to do is to do a similar test with another motor attached to the ESC channel in question. The ESC with the correct params is tuned for this motor + propeller and has been thoroughly tested, so I do not recommend trying to fix this by modifying ESC parameters (this will most likely result in a wasted effort).
You can purchase the Starling 2 Max replacement motor here : https://www.modalai.com/products/starling-2-max-replacement-parts?variant=49704826896688 . It looks like the image for the motor has the wrong kV (2850), but the actual motor kV will be 1500.
The motor used on Starling 2 Max very similar to Tmotor 2203.5 1500kv, you could also replace it with this one without changing any parameters.
Testing a replacement motor should be relatively easy if you cut the motor leads on the motor arm and not disassemble the drone to get access to the ESC. Remove the old motor and solder and heat shrink the connections for the new motor and repeat the spin test (in order to make sure that the spin direction of the new motor matches the old motor, you can mark the wires before cutting and solder the new motor in the same wire order). If you wanted to not cut the motor wires along the arm, then you would need to do some disassembly to gain access to the ESC solder pads. (instructions outlined here : https://forum.modalai.com/topic/4023/motor-replacement-instructions-starling-2-max).
I am curious what the motor spinning actually looks / sounds like, so if you are able to record a short video of the motor spinning, starting from the spin-up (just the faulty ID), that could be helpful:
./voxl-esc-spin.py --id 1 --power 15
Alex