-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Send PWM_MIN value after a PWM_MAX value while calibrating ESCs #11663
Conversation
e21b14a
to
82cb33a
Compare
Thanks! I have a couple of questions:
|
Yes, you are right, they dont' spin with min pwm, you would have to increase the throttle just a bit to make them spin. So probably something smaller should be sent as a min pwm, like 0.9*min_pwm. Regarding the driver changes, I didnt change the way it is used. It already checks if the calibration is active and sends the pwm max signal. I just added sending the pwm min signal next to that, depending on the calibration phase. Perhaps instead we should use set min and set max pwm ioctl definitions, and remove any calibration logic from the driver. |
82cb33a
to
e3d5df1
Compare
With the latest change, there is a small range of pwm values between the one sent to the ESC and the PWM MIN value, to allow the motors to spin when armed with PWM MIN setting. |
Hi @dusan19 , if you can resolve merge conflicts here and rebase I would be happy to take a look at your code! |
Hi @mcsauder, I could do that, but check out the discussion here #12759 If you still think this change is worth pursuing, I could solve the conflicts, rebase and push |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
I assume this is superseded by #21711 |
When the ESC calibration is performed through QGC, the PWM_MIN value is not written appropriately. This can be verified by connecting to the ESC directly through BlHeli Suite.
ESC calibration should be done using the following procedure: Send PWM_MAX value for at least 3 seconds, followed by the PWM_MIN value for at least 3 more seconds. Instead the current implementation sends PWM_MAX value followed by the PWM_DISARMED value.
On the ESCs that I tested, this results in setting the PWM_MIN esc setting to 1012 regardless of the PX4's PWM_MIN value.
The following fix is proposed. Note: PWM values are being sent for 5 seconds, since 3 second long signals weren't detected reliably.
Using this fix, the values written in the ESC (checked with BlHeli Suite) matched PX4 PWM_MIN and PWM_MAX parameter values.
Following plots provide PWM output values during calibration, before and after the fix