-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EXPERIMENTAL] Feature/jamming protection #180
base: v0.20.1
Are you sure you want to change the base?
Conversation
…gs and cut power ASAP Optimized:
…N_THROTTLE_THRESHOLD in t1 int Otherwise enable it if period <= JAMMING_PROTECTION_PERIOD_HI_ENGAGE If enabled force a full resync if period <= JAMMING_PROTECTION_PERIOD_LO_RESYNC JAMMING_PROTECTION_THROTTLE_THRESHOLD EQU 55h ; 33% throttle JAMMING_PROTECTION_PERIOD_LO_RESYNC EQU 8h ; 2857rpm disable esc if protection is enabled JAMMING_PROTECTION_PERIOD_HI_ENGAGE EQU 7h ; 3500rpm engage jamming protection
…t being reversed (turtle mode) Restored default DEFAULT_PGM_SAFETY_ARM setting
@hyp0dermik-code I have tested this in my workbench with the PSU set to 8V 5A. |
I would prefer to add this to a later version - 0.21.x preferably, and not to a bugfix version. This is too much of a change IMHO. |
Totally agree. I slated It for now to 0.22. Edit: also converted to draft |
Can you confirm the test conditions: Is this what I should be testing? |
@hyp0dermik-code yes |
0.20.1 XR1 Test:
|
- Throttle > 33% - RPM > 4000 - 24 consecutive eturns
0.20.1 XR2 Test:
|
I've been running this on a couple of 1S whoops - 0802, different KV's and had no issues. BUT, I am wondering if we could/should introduce motor poles as a setting and change thresholds accordingly, or if there are values that would be a good approximation for both (12 & 14 pole) variants? Or maybe hide it behind a "Micro motor jamming protection" setting? |
With props motors spin at 45000rpm as much, so the code tries to take advantage of the low end part of rpm that cannot allow the kwad to fly to enable the protection. I think that there is no exact number of rpm but approximate ones so for now I would like to make the code as exact rpm agnostic as possible. |
Perfect, sounds good to me. |
0.20.1 XR2 seems to be working fine on my side. Please, could you try it and report back? |
WARNING. NOT FOR PRODUCTION USE.
This pr is created to have a space to test jamming protection feature.
How it works
Jamming protection engages when throttle is above 33% and RPM is over 3500. It disengages when throttle is lower or equal to 33%. If jamming protection is engaged and RPM goes below 2800 the ESC disables and triggers an startup process after 100ms. All throttle values are calculated for 14 pole motors.
How it was tested
It has been tested in the workbench with the PSU set to 8V 5A.
In kwads (several flights with snap rolls and flips).
With no jamming protection
In the image below it can be seen that the voltage in PSU drops in 0.20.1 with no jamming protection.
With jamming protection
In the image below it can be seen that the voltage in PSU barely drops in 0.20.1 with jamming protection.