Fumes

  • *
  • 20
Output ch4 produces lower PWM in ESC
« on: February 11, 2017, 11:27:50 pm »
When calibrating the ESCs my CH4 always produces lower PWM values in the ESC, compared to CH1-CH3.
CH1-CH3 produces the exact same values in BLHeli but CH4 is a bit lower, probably resulting in strange behavior when throttle is low as that motor always turns slower then the rest. If I swap ESCs, CH4 still produces the lower values so its not on the ESC side of it.
I use a Sparky2 from China so it's probably a clone with cheap components and the reason for the variation.
Does anybody else have this problem?
Btw, I'm using MultiShot but the problem exists even if I select PWM as output, the variation is less though.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Output ch4 produces lower PWM in ESC
« Reply #1 on: February 12, 2017, 11:37:17 am »
There is no components between CPU and outputs, just connected directly.

Post your config file : File > Export UAV Settings.

Fumes

  • *
  • 20
Re: Output ch4 produces lower PWM in ESC
« Reply #2 on: February 12, 2017, 11:45:43 am »
Allright, then it should be in the software. I'll post my config.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Output ch4 produces lower PWM in ESC
« Reply #3 on: February 12, 2017, 11:54:55 am »
Tested with you config file and all outputs are the same using oscilloscope.

Whats the difference from BLHeli values ?

For OneShot/MultiShot range the GCS values should be 1000 - 2000

Fumes

  • *
  • 20
Re: Output ch4 produces lower PWM in ESC
« Reply #4 on: February 12, 2017, 12:11:53 pm »
I changed to 1000-2000 in GCS and recalibrated. Now the difference in BLheli is smaller than when i first started. I had something like 970-2020 in GCS and a diffrence of 12 units at the top in BLHeli. Now its down to 4 units at the top. Not much but you could still see the props moving at different speeds when at low RPM. Thank you.  :)

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Output ch4 produces lower PWM in ESC
« Reply #5 on: February 12, 2017, 12:46:46 pm »
You may just set all Esc with same limits and adjust neutrals so all motors start almost the same.

From board, the 5 - 25µs Multishot range has 240 steps.
If you divide 1000 / 240 you found ~4 so the "big" difference is in fact one output unit.


Fumes

  • *
  • 20
Re: Output ch4 produces lower PWM in ESC
« Reply #6 on: February 12, 2017, 01:18:55 pm »
One step truly isn't much, I just like to know why things happens. It makes sense to set equal values in the ESCs and tweak the ouputs from the board to get "perfect" if I want to. Thank you for the support!

Re: Output ch4 produces lower PWM in ESC
« Reply #7 on: February 14, 2017, 07:17:05 pm »
If you are using PWMSync when using PWM, I think you should not use 2000 for max output pulse width.  2000 does not leave room for the inactive part of the pulse when running at the 500Hz of PWMSync.  Use 1900 in that case.  It is safe to use 1900 even if not running PWMSync.

I had a similar issue before getting everything completely set up.  I recall that it went away once I got "input" set up and basically had it ready to fly.

Fumes

  • *
  • 20
Re: Output ch4 produces lower PWM in ESC
« Reply #8 on: February 14, 2017, 07:51:07 pm »
I will try that in the weekend when I have a bit more time. Thank you for the tip!

And by PWMSync you mean OneShot and MultiShot also?
« Last Edit: February 14, 2017, 07:54:25 pm by Fumes »

Re: Output ch4 produces lower PWM in ESC
« Reply #9 on: February 15, 2017, 06:23:05 pm »
Specifically 1900 is required for PWMSync, but it doesn't really hurt for other modes.

Actually, it does reduce the resolution; makes the steps from one throttle setting to the next higher or lower bigger by about 10%, so if you only had 25 steps from low throttle to high throttle, then using 1900 you would only have 22 steps.  I recall that MultiShot is the one that has fairly low resolution to start with.

I think that worrying about this resolution issue isn't worth it, but I could be wrong.  I would love to see / hear a video with someone using MultiShot or even OneShot42 if there is anything (mainly sound) noticeable.

Fumes

  • *
  • 20
Re: Output ch4 produces lower PWM in ESC
« Reply #10 on: February 15, 2017, 07:37:43 pm »
Can't promise anything, the weather is a bit unstable here at the moment. But if it's okay weather this weakend I might post a video with sound. LOS or FPV?
Btw, I'm running S.bus as input, so we are clear about that part. But I assume that it doesn't affect anything related to this topic.
Is it possible to increase resolution for MultiShot if we come to a conclusion that it affects performance?

Re: Output ch4 produces lower PWM in ESC
« Reply #11 on: February 16, 2017, 12:55:26 am »
That's a good question.  The issue is that the timers are graduated in microseconds, and MultiShot uses 5-25us IIRC.  We would have to use timers graduated in shorter intervals than microseconds and I don't know if the hardware supports it, and if it does, what performance hits it would cause, and also the compatibility issues with 1us timer res.

If I ruled the world, I would say it's not worth it.  DShot would be better.

Either LOS or FPV would be fine as long as it has audio.  I don't think you will be able to tell visually or from feel, but it might be possible to hear the ESC's switching back and forth between say 11us and 12us in a motionless hover.

mr_w

  • *
  • 207
    • LibrePilot
Re: Output ch4 produces lower PWM in ESC
« Reply #12 on: February 16, 2017, 01:41:51 am »
Just to jump in with one correction - the timers in *Shot modes are run at 12Mhz, so the resolution is 1/12 of a uS there. Only PWM and PWMSync modes have 1uS resolution.

Re: Output ch4 produces lower PWM in ESC
« Reply #13 on: February 16, 2017, 08:24:20 am »
So that means the worst resolution is 240 steps and it reduces to 216 if you use "1900 max" instead of "2000 max".

I doubt that you could detect the fact that you were running 216 steps vs some much higher resolution in normal flight.  If it's noticeable at all, I imagine it would be in Rate mode, trying to maintain a motionless hover where it would be found.

It would be interesting to reduce the resolution lower and lower until some effects were seen to know what the effects were and what resolution was required to make them detectable.