VOXL 2 ESC Calibration Custom motors and battery
-
thanks for your reply @Alex-Kushleyev, ive looked at the gitlab link youve sent and ive begun using setting the software prerequisites, although i am already stuck in the first part.
ive also included my voxl2 program versions below
please let me know how to move forward, thank you -
after encountering the error shown above, i found a gitlab link. https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc after installing voxl-esc, i then tried running through the calibration.md file mentioned previously.
i am now at the phase where the uart bridge attempts to download and install. it appears that the link is longer being used, has anyone encountered this issue? thank you in advance
-
Hello,
On voxl2, you can now install everything using:
apt-get update apt-get install voxl-esc voxl-slpi-uart-bridge
After running these commands, voxl-esc tools will be installed to
/usr/share/modalai/voxl-esc-tools
and params to/usr/share/modalai/voxl-esc-params
.there will also now be a
voxl-esc
wrapper script you can run:voxl-esc scan
additionally, you can use the voxl ESC scripts directly from
/usr/share/modalai/voxl-esc-tools
or the location of your git repository that you checked out. Just make sure that before you use the tools, you runvoxl-esc enable_bridge
which will disable PX4 .. and to re-enable PX4 runvoxl-esc disable_bridge
. voxl-esc and PX4 cannot run at the same time.Just one note - I need to double check this, but i believe that after running
voxl-esc enable_bridge
you need to reboot VOXL2, because if PX4 was already running at this point, there is some low-level caching happening on DSP that will need to be reset.So you should follow the following:
- install voxl-esc and bridge using the
apt-get
command above - run
voxl-esc enable_bridge
- reboot voxl2
- test ESC using voxl-esc tools
- run
voxl-esc disable_bridge
and reboot voxl2 to restore PX4
We will update the documentation on gitlab.
- install voxl-esc and bridge using the
-
@Alex-Kushleyev thank you for your reply, it seems as though i might be using the wrong voxl-esc? the wrapper youve mentioned is having issues working, as well as the slpi-bridge is having trouble locating the voxl-esc package. what is the best course of action? would reflashing the firmware on the board help at all? thank you in advance
-
this is interesting. @James-Strawson do you know why apt-get is not finding voxl-esc and voxl-slpi-uart-bridge? It works for me.
This probably has something to do with package sourced, for me i had the following:
Ign:9 http://voxl-packages.modalai.com qrb5165 InRelease Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB] Get:11 http://packages.ros.org/ros/ubuntu bionic/main arm64 Packages [786 kB] Get:12 http://voxl-packages.modalai.com qrb5165 Release [6132 B] Ign:13 http://voxl-packages.modalai.com qrb5165 Release.gpg Get:14 http://voxl-packages.modalai.com qrb5165/staging arm64 Packages [16.4 kB]
I think this means the packages did not make it into the SDK yet, so if you update your source to use qrb5165 staging or you could download them directly from here and install manually : http://voxl-packages.modalai.com/dists/qrb5165/staging/binary-arm64/
-
To get on the staging repo you'd have to modify the following file as seen below:
voxl2:/$ cat /etc/apt/sources.list.d/modalai.list deb [trusted=yes] http://voxl-packages.modalai.com/ qrb5165 staging
and then run an
apt-get update
-
#esc v2 #VOXL-ESC @Alex-Kushleyev @tom success! thank you both so much, that repo addition helped, now the tools are working. i successfully scanned and detected all the escs
i was also able to calibrate each motor using the calibration script using this command,
./voxl-esc-calibrate.py --id 3 --pwm-min 10 --pwm-max 95as for the uploading them, im trying to find the xml files as suggested in the gitlab. these are the directories ive checked, maybe im looking in the wrong place?
let me know,
thank you again in advance -
If you can share the motor type, propeller, battery voltage, i can point you to a good esc param xml file to start with.
-
@Alex-Kushleyev thank you, its a 4s battery, XING2 3310 1600kv, 8 inch propeller
-
@Luis-Fernando-Landivar said in VOXL 2 ESC Calibration Custom motors and battery:
XING2 3310 1600kv
Based on your calibration screenshot, you calibrated the motor without the propeller attached. It seems at 95%, you only had 2.7A of current. Calibration needs to be done with attached propeller.
However, I also checked the specifications of your motor, with 8 inch prop, there could be significant current flow. Before proceeding, i would recommend to perform the following few tests with one motor and check the current consumption (with propeller attached).
./voxl-esc-spin.py --id 0 --power 50 --ramp-time 3 --timeout 4
this will spin the motor up slowly to 50% power and stop the test after 4 seconds. We can see what current the motor pulls.The ESC has been tested to about 20A continuous per channel, but it could do more with appropriate cooling. if your test at 50% power shows less than 20A current, you can test at 60, 70 % and so on, but if current goes much above 25A when you get close to 100% power, this ESC may not be the best choice for this motor / propeller.
If you are able to share the data from the few spin tests, I can advise further.
-
@Alex-Kushleyev said in VOXL 2 ESC Calibration Custom motors and battery:
./voxl-esc-spin.py --id 0 --power 50 --ramp-time 3 --timeout 4
this is what i received, this is at 70% i think if i go any higher it fly away... we dont plan to use this much power, i think the most we will use is 60%, its for close to ground flights and indoor testing. what are your thoughts?
also we chose these motors and propellers so it could have a clean takeoff and hover easily, weve tried with lower sizes and 7 inch propellers and found that this size and propeller would be better for our use cases. i can definitely add more cooling if necessary
-
OK, that looks like it is reasonable. To be safe, you should perform the calibration with maximum pwm 70 instead of 95 which is the default (using
--pwm-max 70
option). Also in the esc param file, you can limit your rpm to about 14000, so that ESC will not try to go over 14000.So you should follow these steps:
- calibrate the motor with propeller with max power 70
- use the following xml file as starting point: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/dev/voxl-esc-params/old/esc_params_modalai_4_in_1_revb_holybro2216_880_half_kp.xml
- update the rpm curve from your calibration results
- set max rpm to 14000 for safety (for now)
- set min rpm to whatever RPM the motor spins at about 10% power with propeller
- set kp and ki to 0 for now to make the controller softer so that you dont have large current spikes
- set max_rpm_delta to 1500 or so (this kind of a slew rate limit on how fast the motor should jump from one rpm to another).
- save xml and upload it to the ESC
- perform a few rpm-based tests (voxl-esc-spin.py --rpm <desired_rpm>).
- note that if you use the
--timeout
feature and--enable-plot
, the rpms will be be plotted usingplotly
- may need to install it usingpip3 install plotly
Once you have done basic tests, spin up all 4 motors and test ESC temperature at different rpms. The MCU is rated to 105C internal temperature, but you should not push it. I would say 80-90C is a good maximum to try to achieve. With good cooling, hopefully that wont be an issue. ESC temperature is printed by the test script, as you have probably seen already. To check steady-state ESC temps at different motor rpm, you should run it for 1 minute or so, if you see ESC temp going above 100C, probabaly should terminate the test and evaluate results.
If you command high rpm in the spin script, maybe use
--ramp-time
option to avoid all 4 motors just jumping to like 14000 rpm which could draw huge currents (probabaly over 100A total for a short period of time, if all 4 motors are spinning)To spin all 4 ESCs at the same time, use
voxl-esc-spin.py --id 255 --rpm <desired_rpm>
, then all 4 motors should spin and feedback from all 4 will be printed -
Note that in the xml param file, you keep the 7 pole pairs, as already set in this param file, because your motor has 14 poles (7 pole pairs):
-
@Alex-Kushleyev thank you! im going to follow your instructions and will update you when finished
-
This post is deleted! -
@Alex-Kushleyev Update: it looks as though during my testing, 2 mosfets unsoldered themselves. I think it may be best to try something else, im glad we went through this, as we plan on getting a second voxl2 and plan on making very small and compact compared to this one.
We want to try again with calibration, but it looks like we will need the voxl2 i/o if we want to use these motors with 40 amp escs. Is there setup necessary? And Do you have a gitlab link for esc calibration steps regarding voxl 2 i/o?
And Once again, thank you
-
Hello @Luis-Fernando-Landivar ,
Sorry to hear that the ESC overheated. It must be due to the high currents. Usually in this condition you would want direct airflow from propellers over the mosfets. Out of curiosity, can you share what test you ran, for how long and what temperature and currents did ESC report?
I will check regarding status of voxl 2 I/O board. What protocol will your ESC use? Standard PWM / OneShot125, Dshot, etc..
Alex
-
@Alex-Kushleyev we ran 70%, had a 12v cooling fan attached, 50% and 60% went well temperature was below 80c for full minute runs. 10 seconds in for 70%, 130c , it unsoldered itself, i knew it was a possibility and these things happen so no harm at all, simply means we must try another approach. As for the data you were asking, is there a log somewhere, so i can give you detailed information? and we plan on using standard pwm.
-
in the folder where you ran the
voxl-esc-spin.py
command, there should be a logs folder with txt logs. You should be able to find your log by looking at 9th column which is temperature in deg C, look for 130 :). If you are able to provide, the log, it would be great, i can use it to check if the ESC performed as expected. Please email the log file to me (email address in my profile. thanks!) -
By the way, you mentioned that you used 12V cooling fan.. That is not typically how the ESC cooling is done for high current applications on drones. The ESC is usually placed near direct airflow from propellers, which provide a huge amount of air flow, so ESC can be cooled effectively. Maybe this will help in the future..