ESC Modes
« on: July 29, 2015, 10:24:07 am »
Hi,

Just come across something to might be improvable in the GCS, or more specifically the Vehicle Setup wizard.

I accidentally set my ESC outputs to PWMSync at 490Hz when I recently setup up my new Hex and I think that was the cause of a fairly big crash I suffered. I made this mistake partly because I didn't see 400Hz listed (granted, my own fault) and partly because I couldn't remember exactly what my quad was set to as it was a while ago. I also note there's a step in the Vehicle Setup wizard that asks about Rapid ESCs etc. Maybe this could be amended with a more significant check. Instead of asking whether the ESCs are rapid etc, maybe ask what firmware you are using on them: Stock, SimonK, BLHeli. Then, if the user chooses Stock the PWMSync and OneShot125 options are disabled on the Output page of the GCS?

Just a little protection from the mistake I made because, if this is the cause of my crash, I was flying happily for a good 10 minutes before this caused a problem, so it's easy to miss it as everything seems fine.

Just a thought, would welcome your opinions. :)

liftbag

  • *****
  • 215
    • LibrePilot
Re: ESC Modes
« Reply #1 on: July 29, 2015, 12:22:27 pm »
Hi,

Just come across something to might be improvable in the GCS, or more specifically the Vehicle Setup wizard.

I accidentally set my ESC outputs to PWMSync at 490Hz when I recently setup up my new Hex and I think that was the cause of a fairly big crash I suffered. I made this mistake partly because I didn't see 400Hz listed (granted, my own fault) and partly because I couldn't remember exactly what my quad was set to as it was a while ago. I also note there's a step in the Vehicle Setup wizard that asks about Rapid ESCs etc. Maybe this could be amended with a more significant check. Instead of asking whether the ESCs are rapid etc, maybe ask what firmware you are using on them: Stock, SimonK, BLHeli. Then, if the user chooses Stock the PWMSync and OneShot125 options are disabled on the Output page of the GCS?

Just a little protection from the mistake I made because, if this is the cause of my crash, I was flying happily for a good 10 minutes before this caused a problem, so it's easy to miss it as everything seems fine.

Just a thought, would welcome your opinions. :)
Mmm, you can choose PWMSync instead of RapidESC il the FW doesn't support oneshot125, without any issue (unless your ESCs are limited in input frequency).
Actually RapidESC is mandatory on CC based boards when you use a PWM receiver.
If you use S_Bus/DSM/PPM receiver with CC or you use a revolution, there is no reason to use RapidESC with no-oneshot ESCs. PWMSync allows to set PIDs about 10% higher than RapidESC.

P.S.
What board are you using? Some precaution must be taken to use PWMSync/oneshot  with a CC3D equipped hex.

Re: ESC Modes
« Reply #2 on: July 29, 2015, 12:33:15 pm »
Hi Liftbag,

I'm using a Revo board and Hobbywing Platinum Pro Opto 30A ESCs. I read up on them and understood that they can take BLHeli firmware, but I also read that SimonK and possibly BLHeli sometimes have issues with larger/high pole count motors and that the stock firmware on these ESCs is quite good, so I left them stock. I then set up the Revo and it defaulted to PWMSync (490Hz) and not remembering very clearly (I could remember they should 400-and-something) presumed that was the number.

Following the crash I investigated and found that the ESCs only accept 50-432Hz, so the blame is squarely on me but I was just wondering if there is possibly a better way of making sure the user has thought about this properly. Now I realise there is a line when it comes to "user error" and you could complicated it 4736-fold trying to make it idiot-proof, but I think this is something that others might fall for.

Maybe it's just my lack of understanding regarding ESC control..

liftbag

  • *****
  • 215
    • LibrePilot
Re: ESC Modes
« Reply #3 on: July 29, 2015, 01:42:08 pm »
Hi Liftbag,

I'm using a Revo board and Hobbywing Platinum Pro Opto 30A ESCs. I read up on them and understood that they can take BLHeli firmware, but I also read that SimonK and possibly BLHeli sometimes have issues with larger/high pole count motors and that the stock firmware on these ESCs is quite good, so I left them stock. I then set up the Revo and it defaulted to PWMSync (490Hz) and not remembering very clearly (I could remember they should 400-and-something) presumed that was the number.

Following the crash I investigated and found that the ESCs only accept 50-432Hz, so the blame is squarely on me but I was just wondering if there is possibly a better way of making sure the user has thought about this properly. Now I realise there is a line when it comes to "user error" and you could complicated it 4736-fold trying to make it idiot-proof, but I think this is something that others might fall for.

Maybe it's just my lack of understanding regarding ESC control..
Ok, 50-432Hz makes sense.
PWMSync works at frequencies around 500 Hz. But you are not safe even with RapidESC, which is set to 490Hz by default.
I agree that some measures can be taken to avoid such problems, but I think further guidance in the configuration wizard can be a better solution than to choose the FW installed on ESCs.
For example, clearly indicate the frequency that will be set, and invited to check that it is supported by the ESC.
Being understood that that PWMSync requires that ESCs must be working at 500Hz, setting the working frequency may be be added in the wizard when you choose RapidESC.

What do you think about?

Re: ESC Modes
« Reply #4 on: July 29, 2015, 01:55:55 pm »
Yeah, that sounds good. Even if it's just a warning that state something along the lines of "This mode operates at 490Hz, which is faster than standard multirotor ESCs. Please check that your ESCs support this refresh rate." as you suggest would be good. Choosing the frequency as a separate step in the wizard and making it a bigger thing for the user to think about/check would be really good.

I suppose my main concern is that the wizard set the ESC mode to PWMSync as a default, which uses what I understand to be a frequency that is higher than normal. I guess this may be my mistake, I've never properly understood normal and Rapid ESCs. Obviously I've only got my ESCs as a benchmark, but if it's too high for mine then it might be too high for others. For the wizard to automatically set it to a speed that is incompatible seems dangerous to me. I realise it's up to me to know what I'm doing too, but I think there's room for improvement. Maybe I'm just biased 'cos I stacked my shiny new Hex into the ground potentially because of this! Lol.

It definitely seems to have got a lot more complicated regarding ESC control methods from back when I started when it was pretty much: "Choose Rapid in the wizard, set it to 400Hz"! Maybe I'm just doing it all wrong! :P