How do I scale and limit PWM for motor?

Hi,

I’d like to make sure my motor never gets more than 8 Volts.

I’m running ArduPlane on a Matek F405-Wing FC. I can determine the throttle PWM which gives me 8 Volts at the output of the ESC.

What is the best way to scale and limit THR in Mission Planner so that

  1. I get the full control stick range in manual flight mode (bottom = THR off, top = THR maximum = PPM for 8 V), and

  2. no matter which flight mode (e.g. Return To Launch, Fly by Wire, Manual) the THR PPM never goes above the limit for 8 V?

Many thanks for any help
Jenny

servo3_min and servo3_max to the pwm values you want is the easiest way. If your throttle output isn’t on channel 3, use whatever channel number it is on.

1 Like

Thank you James :slight_smile:

Unfortunately this only limits maximum THR, but it does not scale it. At about 50 % of stick movement from bottom to top, I get maximum THR. Any additional stick movement does not change anything, it stays at the maximum THR value of 1600 PPM.

Instead, I’d like to have:

THR stick at bottom = zero throttle
THR stick at top = maximum throttle at 1600 PPM
Everything in between = linear proportional PPM to stick movement

In other words, I’d like the THR stick to behave like usual, just with a lower PPM range, not from 1100 to 1900, but from 1100 to 1600.

What else can I do so that I get the full stick movement range from bottom to top?

Many thanks
Jenny

That’s a transmitter function, not something that the flight controller or ground station software can set.

1 Like

Ok, thanks!

So on the transmitter I scale stick movement linear from 1100 to 1600, and additionally on the ground station software I limit maximum to 1600 via servoN_max, right?

Am I safe that way, to never get more than 1600 PWM, no matter which flight mode is selected?

Yes, but if you want to be super sure and have the equipment to test, I’d suggest also setting the thr_max param (which limits the throttle to a percentage of servoN_max, but only for assisted modes - manual modes is simply pass through) and increment it up from say 60% to 100% in steps, with the plane in fbwa.

1 Like