PX4 & OneShot125

According to @LorenzMeier’s post Pixracer Feedback Thread to enable Oneshot125 PWM_MIN should be 125us and PWM_MAX should be 250us.

Is that correct?

What about PWM_DISARMED value? Should I keep 900us?

Hi @marimach77,

Oneshot works fine for me with

PWM_DISARMED = 125
PWM_MIN = 125
PWM_MAX = 250

I had first tested to set PWM_DISARMED to a lower value (90 I think) but that yielded weird results. With the above I have been flying several batteries.

Have fun,
Daniel

Hi Daniel,

Thanks for sharing info from you. I will try with PWM_DISARMED = 125 then. Did you do ESC callibration before enabling OneShot125 or after?

Brgds,
Mariusz

Hi Mariusz,

I did it afterwards.

But, to be honest, the whole ESC calibration thing with PX4/QGC is a bit confusing to me, I am running LittleBees with BLHeli and I never heard any feedback sounds from the ESCs during the calibration process so far (neither in OneShot mode nor with classic PWM mode)… Then again, when testing them via the nsh console they react just fine and in sync…

Have fun,
Daniel

Fyi - Lorenz just wrote on Gitter that PWM_DISARMED should be set to 100, not the 125 I had.

Hi Daniel,

Thanks for sharing this info. I will try to play with it this weekend finally.

Rgds,
Mariusz

Could you quickly tel me how you do that? I’m also confused with oneshot and esc calibration.
I also have bheli oneshot125 esc’s.

Thanks

@Sn0west, please look here http://dev.px4.io/advanced-system-console.html

I’m not sure this is a right place but seems to be.

Hi @Sn0west / @marimach77,

it’s quite easy once figured out…

The connection is described in @marimach77’s link but you don’t have to worry about the first part as you don’t need to access the actual console port to get the shell.
Just remove your SD card from the flight controller, this stops it from sending heartbeat info via the USB port.

Then, connect via USB and use a console program as described on the linked page and open the serial port corresponding to the USB port with 57600 8N1.

Now, you should be seeing a nsh> prompt.

Here, you can first type (make sure to remove the props before doing that!!!)

pwm arm

followed by

pwm test -c 12 -p 1200

this would send a 1200us pulse on channels 1 and 2. Another example:

pwm test -c 1234 -p 200

would send a 200us (OneShot) pulse to all four channels.

The pulse is sent until you cancel via Ctrl+C.

By the way: using this test mode was the only way for me to calibrate my ESCs for standard operation - send a 1950 pulse to all channels, apply power, cancel the command --> the sound of success from the ESC :slight_smile: - never works with QGC).

Hope this helps,
Daniel

Edit: For those of you who read this post and want to use the same procedure - it seems that at least with some master build states, the pwm test command would conflict with the output of the mc_att_controller (effectively causing jumping PWM values). This can be avoided by setting “mc_att_control stop” prior to the above sequence.

Hey there, I’m using a Pixhawk with latest master firmware and latest master qgroundcontrol build. When I try to change PWM_MIN I get this:


Any idea what I’m doing wrong?

Check “Force save” and then save.

Thanks, that worked.
However I’m getting really weird motor response.

I’m running LitteBees 30A with unchanged BLHeli 14.5 settings (damped light is now enabled by default, mind you)

I have set PWM_MIN to 125, PWM_MAX to 250 and PWM_DISARMED at 100.

When I arm with throttle at zero, some motors will spin, while the other ones will either stand still, or stutter randomly. If I give throttle and return to 0, some motors will still spin, some will stutter, some will stop completely. However the motors that are affected are random each time.

I did a sucessful ESC calibration after each PWM parameter change. I also tried PWM_DISARMED at 100 and 125.

Resetting the PWM parameters above to standard and performing a calibration - everything works. However it’s not using OneShot anymore of course.

Any ideas?

Can you try to raise PWM_MIN and PWM_DISARMED to 130/140 and see if that fixes it?

Getting even more wierd results with that.
I after setting to 130 and 140, doing a calibration again, motors will randomly rotate a tiny bit even when not armed :open_mouth:

This is all on a Pixhawk btw.

@thedevleon What you need to understand is that when you set DISARMED == MIN there is no clear definition of on and off for the motor. You need to set DISARMED to a value significantly lower than MIN. Please read up in the BLHeli docs what it expects.

Please can someone assist me I have a PixRacer fc with emax nano onshot 12amp esc’s I have followed the instruction on this forum on setting up oneshot esc’s. Using the pwm_max 250 PWM_min 125 and PWM_Disarmed of 100. when I arm the quad the motors spool up then shut down and nothing else. Powering up will not start the motors even if the throttle is moved to full. I have tried to use the connect using the system console but either Putty will not work in windows 10 or there is another issue also tried a different serial terminal called coolterm and that to did not produce any readable information and the key strokes and enter key were a little strange.
So my first point is can the emax nano oneshot escs work with the pixracer and if not what would the reccomend esc be for emax mt2204 motors.
Kind regards

@snooper_ace It should work. I will take a look now at the signals. Do you have some documentation for your ESCs? What is the min, max and disarmed default they need to see?

You must please excuse me as I am very new to this rc stuff all I can find is the user manual that can be found here http://www.emaxmodel.com/upload/index.php/s/2OifPvldyARQ25U

if you change the pwm_rate to under 300hz you will hear feed back from the calibration process

for blheli oneshot125 ,in qgc px4 calibation “sry for the broken response”