Closed damosvil closed 1 year ago
This is pretty awesome! I think we should rename this to "dynamic" instead of variable - what do you think?
We have variable PWM that can be set to either a fixed value (24, 48, 96) or dynamic.
What I am also wondering is: How did you arrive at those thresholds? You think it would make sense to allow the user to set those themselves? I am particularly thinking about people here who use throttle limits in their FC firmware. This would mean, that they might never go above 60% throttle and thus not benefit from the dynamics at all...
@stylesuxx I have thinking on these thresholds based on my experience, but I would also like the idea of allow the user to decide. Should I add then 2 more settings, at the end of the existing ones?
I think it would make sense to give the users a way to tinker with it a bit - maybe we decide later on, that there is a perfect value, but for starting out, let's add two more settings.
We should also consider the side effects though - can we properly safeguard it? I don't want to run issues that might be dangerous because the user set some "stupid" value...
I think that we could allow them to choose between [20-60] for the 96/48 low throttle threshold (Thres1) and [30-90] for the 48/24 high throttle threshold (Thres2), always constraining them to Thres1 + 10% <= Thres2, or something like that, allowing them to choose in steps of 5 or 10%. What do you think?
With AM32 the concept of linking PWM to RPM instead of throttle was introduced, and seems to be preferred as a means of dynamic PWM. Should this be considered here?
AM32 has more means to set eRPM into perspective (and actually get RPM) - kv, pole count and such - Bluejay does not have this - at least not yet - I am not entirely sure if it would make sense to couple this to eRPM. But it is definitive something worth investigating.
Right now this is purely a POC with unclear outcome. We have also discussed more discrete scaling, not just in steps. But the steps and throttle values would be a first step to play around with things and see if it's worth the effort.
DISCLAIMER: should you attempt to test this, please only do so with a current limited (200mA) power supply for now.
I made more flights abusing pretty hard my Meteor 65 and extracted several logs. There were no problems and no smoke. Please, use this blackbox viewer branch if you want to inspect the logs (there you can find a compiled version): https://github.com/betaflight/blackbox-log-viewer/pull/625
More testing on a 5 inch kwad. Betaflightf4 target with 4 individual LANRC 32A 3-6S ESCs: BTFL_BLACKBOX_LOG_Galaga_20230220_00.zip
Build artifacts:
Tests flawed because of flashing with old esc-configurator tool so no dynamic pwm has been tested. This pr has been superseeded by https://github.com/bird-sanctuary/bluejay/pull/73. Cancelled
This pr uses a 4th pwm setting value DYNAMIC besides, 24, 48, and 96 to implement dynamic pwm frequency. Thresholds are configurable, but the default ones are: