ESC cuts out on high RPM
-
Can you please clarify which ESC board you are using? (Mxxxx number)I see, it is the mini ESC (M0129)The current UART protocol uses a signed int16 type to transmit the RPM information. One bit is used for the sign, so the range of RPM supported by this command is -2^15..+2^15, which is 32768 RPM in either direction. The ESC itself is capable of spinning faster (for example, using the PWM command) but the limitation in this case is the packet that is transmitted to the ESC.
I understand that this is an issue for you. If you really need to command RPMs higher than 32K, I can create a new packet that will have a larger range (lets say up to 65K in either direction).
Regarding RPM accuracy, please double check that the number of pole pairs in your motor is correctly specified in the param
<param name="num_cycles_per_rev" value="6"/>
, i double checked the model of your motor, it is 9N12P, so that is 12 poles (6 pole pairs - that seems correct). I would suggest using a optical tachometer with reflective tape on the motor to verify the RPM in real time. I believe the RPM should be within 1% accurate. You can check the RPM with your tachometer at several speeds, like 5k, 15k 30k RPM.In your test, where your maximum rpm was 31300, it is possible that a lower battery voltage was used, so the ESC could not achieve that high RPM. Maximum RPM depends on the battery voltage applied to the ESC.
Alex
-
@Alex-Kushleyev Thank you for your thorough answer!
It would be great, if you could send us a new packet with command RPMs up to 65K.
We will check the physical RPMs again with a optical tachometer. But the battery voltage was the same across all tests.
Best regards
Tom -
@TheRealKaufmann , we have another option to resolve this.
Since in the params we have the param for number of pole pairs (in your case 6), if we fake that param, say, we set it to 7, the ESC will think that the motor has more pole pairs and the ESC will think that the motor will spin slower than it actually is. Since the ESC does not really ever care about the number of pole pairs (it is only used to convert the electrical RPM to mechanical RPM), there will not be a performance issue. So if we do this, if you command 32768 rpm, the motor will try to spin at that rpm, but the motor will actually spin at 32768/67= 37333 RPM. So you could think of this as if we change the number of pole pairs in the ESC config, the ESC calibration and thrust to RPM curve will be different, where RPM* is the new rpm that is lower than actual.
If you look at how traditional ESCs are used, there is no notion whatsoever about commanding an RPM. With the proposed "hack" i am suggesting to simply change the mapping between the "pretend rpm" and actual rpm in order to increase the commanded RPM range.
There would be no changes in ESC firmware or PX4 code for this to work, which means you can use it immediately. However, you would need to do the following:
- change number of pole pairs in ESC params from 6 to 7
- perform new esc calibration of the feed forward term with propeller attached (our standard esc calibration)
- if you use thrust to rpm calibration curve anywhere, you would simply need to multiply your old rpm by 6/7 in order to get the lower "pretend rpm".
Let me know if you would like to try this approach. Otherwise, will need to wait a bit in order for us to update the ESC firmware with the new packet and PX4 firmware to make use of new packet.
Alex
-
@Alex-Kushleyev I apologise for my late answer. Thank you first of all for the quick solution! I actually modified the PX4 Firmware to give PWM commands instead of RPM, but your method seems way better. An actual fix would still be nice though
I could not test your RPM method until now. We actually had to order a new ESC (and are still waiting for it), because when spinning motor id 3 to around 80%, the ESC would cut out and currents of up to 30A were indicated in the current measurement. We tried to swap the motor, but that did not help. The weird thing is that at lower power settings (eg. 50%), the motor spins just fine. The other motor id's do not have that problem. I assume that ESC is no longer usable? Do you know what the cause could be? Temperature was always around 40 deg C.
Best regards
Tom -
what is the RPM and current draw of the ID3 right before it cuts out at 80% (in normal operating range)?
Are you commanding 80% right away or slowly ramping up to that power?
you could run a test where you slowly ramp to 80% with
--ramp-time 5.0
when usingvoxl-esc-spin.py
command. This will take 5 seconds to ramp up to the desired power. -
I am going to try to replicate your setup, can you please confirm motors and props you are using @TheRealKaufmann :
https://www.getfpv.com/t-motor-f1404-2900kv-3800kv-4600kv-motor-gray-red.html (2900kV)
https://www.getfpv.com/gemfan-windancer-3028-propeller-set-of-4.htmlthank you!
Alex
-
@TheRealKaufmann , i just discussed with the team and we will add a new packet that will allow +/- 65K RPM control of the ESC. The change will happen in two places, the ESC firmware itself and we will also update PX4 to send out the new packet..
I believe we also need to add a check of the outgoing RPM to make sure you don't send a negative RPM by overflowing int16 (in the current packet and the new packet). This is what you experienced, if I understood correctly.
For now, it's best that you set the RPM limit in PX4 to 32700 in order to avoid reversing motors in flight . I hope to provide an update later this week.
Alex
-
@Alex-Kushleyev said in ESC cuts out on high RPM:
what is the RPM and current draw of the ID3 right before it cuts out at 80% (in normal operating range)?
Are you commanding 80% right away or slowly ramping up to that power?
you could run a test where you slowly ramp to 80% with
--ramp-time 5.0
when usingvoxl-esc-spin.py
command. This will take 5 seconds to ramp up to the desired power.Hi Alex! We have tried both. It did not seem to have an effect on the outcome. Before the high current draw, everything seemed normal (I think it was 2-3A).
@Alex-Kushleyev said in ESC cuts out on high RPM:
I am going to try to replicate your setup, can you please confirm motors and props you are using @TheRealKaufmann :
https://www.getfpv.com/t-motor-f1404-2900kv-3800kv-4600kv-motor-gray-red.html (2900kV)
https://www.getfpv.com/gemfan-windancer-3028-propeller-set-of-4.htmlthank you!
Alex
Yes, that would be awesome. The setup is correct. Motors are 2900 KV, GF-3028 Props and 4S Battery.
@Alex-Kushleyev said in ESC cuts out on high RPM:
@TheRealKaufmann , i just discussed with the team and we will add a new packet that will allow +/- 65K RPM control of the ESC. The change will happen in two places, the ESC firmware itself and we will also update PX4 to send out the new packet..
I believe we also need to add a check of the outgoing RPM to make sure you don't send a negative RPM by overflowing int16 (in the current packet and the new packet). This is what you experienced, if I understood correctly.
For now, it's best that you set the RPM limit in PX4 to 32700 in order to avoid reversing motors in flight . I hope to provide an update later this week.
Alex
Thank you very much, that sounds nice. Yes, I believe a sanity check for the outgoing RPM be a good thing for the exact behaviour that we have noticed. When you provide the update, we will test right away. Our new ESC has also arrived
-
@TheRealKaufmann , I just received the motors and propellers and will begin testing today.
Can you please confirm that you are using 4S battery for testing? It seems so based on the params you initially provided.
Here what my test plan roughly looks like:
ESC
- perform basic tests in open loop across the whole range of 0-100%
- verify accuracy of RPM via optical tachometer (can be done in open loop mode)
- double check performance on ID3 at power > 80%
- perform calibration for RPM control
- limit the max rpm to 32700 in params for now and test RPM response in this range, adjust tuning params if necessary
- add a new packet to the ESC for +/- 65K RPM control input and update
voxl-esc
tools to allow this. Note that the feedback packet from esc contains unsigned RPM, so it is already supporting up to 65K
PX4
- add rpm limits to avoid reversing if rpm is exceeded (in case PX4 max rpm param is greater than 2^15)
- integrate new esc packet with PX4 (will take a bit more time)
I will keep you posted, hopefully first part will be pretty quick to at least unblock your testing with RPM limited to 32700.
Alex
-
OK, quick update..
I did a quick test.. ramp from 0 to 100% power runs fine on ID3, see image below.
optical encoder test was good, i did 3 measurements : ESC: 8040, 11800, 1850rpm, tachometer 8035, 11810, 18500. (rounded to closest 100rpm). The optical tachometer was very very close to reported rpm of the ESC.
I used the following command to do a quick ramp test:
./voxl-esc-spin.py --id 3 --power 100 --ramp-time 4.0 --timeout 5.0 --enable-plot 1
(btw, i just updated
voxl-esc
on dev branch to plot the total current, since M0129 does not have individual current measurement, but if you test one motor at a time, you will get current for one motor)got to about 33000 rpm at 100% power, 14.8V, about 5.8A current..
More details will follow as I tune for RPM control.