Home        Store        Learn        Blog

ArduSub PWM issue

Hello everyone,
I’ve got ver 4.2.0 of ArduSub and I’m using QGC.
I have an ESC that works between 800-2200 PWM.
I have defined my rc max/min to work in 2012/987us as my controller sends. I have changed the Servo(Motor) Max/Min params to 2200/800 and MOT_PWM_MIN/MAX to 1100/1900 BUT in the analyze tools the servo_raw output shows me that the values are still between 1900/1100.
I have checked in the analyze tools the rc input as well to see if there is something wrong with the values that the rc sends but they seem to be working as expected(2012/987).
It seems like the ardusub code overrides the servox_max/min parameters to always stay between 1900/1100.
My servo outputs defined as they should (Motor1,motor2,motor3… and so on and Im using the bluerov2/vectored frame)
Can you help me to solve this?

Thanks in advance for the help!


The PWMs are additionally constrained to RCx_MIN/MAX. Check here.

Changing RCx_MIN/MAX should allow you to get the PWM values you want.

1 Like

Well, this values are set to 800-2200 as well as on the controller’s rc and still, my rail output pwm values are not changed…

Right. After double-checking it, I can see why. The issue is already filed. The core issue is the “400” in the function I’ve shared before.
thrust_in is constrained between -1.0 and 1.0, so that is never going to generate anything beyond 1900.

Thank you so much, that had really helped me to solve this!
Can you help me to find/make a rc “kill switch” for the motors?
I’d like to send pwm (if > 1900us put motors to 1100 else do nothing) to a rc channel that is unused and turn all motors to their minimun (lets say 1100).
Do you have any idea about how can I do it? Or if it already exist?

Thanks in advance!