I want to get it to work, that the pwm output pulsewidth is zero, when ardupilot wants the motor not to run and that the pwm pulsewidth is max (the duty cycle is 100%) when ardupilot wants the motor to run at full speed. I didn’t get it to work by my own.
Additional information:
The goal is that the pwm output is driving a MOSFET transistor, which is driving the motor.
On the page it says that ardupilot supports this duty cycle mode but there are no instructions telling me how to set the duty cycle range to 0-100$. Please show me where I can find those instructions.
I haven’t used that output mode myself, but you should find that SERVOn_MIN corresponds to 0% and _MAX to 100% duty cycle for the brushed motor type. Probably best to leave those parameters at the default values for brushed mode.
Most of the code is written to generate motor outputs in the range PWM_MIN to PWM_MAX, which is nominally from 1000 to 2000 usec for output to ESCs. If you select brushed motor type, this range is converted to the appropriate duty cycle. So think of 1000 usec (PWM_MIN) as 0% duty cycle and 2000 usec (PWM_MAX) as 100% and give it a try.
If you are interested in the code that does the translation, it is here: