Hi,
our aircraft have several actuators that are relatively dangerous if it spins. (In our case it is prerotator that spins up the large rotor). This output is connected to AUX input by the mixer.
And if we need to restart the autopilot, it will start spin when IO boots, which is very dangerous.
Is there any ‘systematic’ way to prevent this problem? It would be best to turn off PWM output when it is disarmed, just as it is done with the motor (throttle).
For our use, I have modified the autopilot code (code of IO processor). But these edits are unmergeable with master.
Would it be possible to create some parameters where it would be possible to set off (no signal) any aux input when it is disarmed?
today we control it directly from the RC because we don’t yet have a PX4 application for automatic rotor spinning. Therefore this channel is mapped as AUX input and in main mixer it is mixed to some (main) PWM output.
In future, this should be solved by PX4 application which will very slowly increase the RPM to the operating speed. And than it will hold target speed.
This happens when we had the rotor spinning and then we need to restart the autopilot using the SW (due to another error - “accel inconsistent”, “high avionic voltage” (avionic voltage was OK), … ). So click the restart button and after restarting the rotor motor starts to spin. It’s dangerous. In that time autopilot was disarmed and safety-safety.
As I read from code, this feature is fixed (hard-coded) for the motor (throttle). I would extend this feature for selectable actuators. What is the best way to do this?
In parameter list (from log) I can’t see parameter ‘PWM_DISARM’, ‘PWM_MIN’ and ’ and ‘PWM_MAX’. Is possible that these parameters are missing in our configuration? I assume that the default values are used?
I don’t have autopilot with me. So when I get to it, I’ll try to set up port-related parameters (PWM_MAIN_xxx6) or I’ll try to use AUX outputs.
But I still don’t understand why this feature for the throttle is hardcoded?
Why there is this code, PX4/Firmware/…/px4iofirmware/mixer.cpp#L490-L499, when it should be possible to set it with parameters.
After many attempts of setting up parameters, there has always been an option to get motor spinning. Which is very dangerous in our case of spinning rotor on full (or half) of power.
It start to spin in cases - SW restart of autopilot (ESC is without any spin protection), pressing safety button in ARMed state, … It was a little vary depends on parameters and main/aux port.
I suggest to do it more systematically. After looking into code, I have found part where is ‘safety-safety’ mode solved for use with the throttle. And this precaution is based, if mixer input contains throttle mixer input…
The suggested solution is to add new parameters. Something like PWM_MAIN_DANGER1 = 1, which will set NAN to the corresponding output. After this adjustment, it should be as safe as the throttle output. (where it works reliably)
Outputs that are defined (correctly) as motors should not lead to motors spinning up, otherwise that’s a bug!
Could you describe how this can be reproduced: PX4 version, airframe chosen/mixer loaded, other param configuration, and which output is not working correctly?
Yes, outputs were defined as the output of AUX input. And I suppose that it was not marked as motor output. Is there some way how to mark mixer with aux input it as motor output?
In code, I can see, that motor output is defined as mixer output with input from group 0 input 3 or group 1 input 1.
Our setup: GitHub master (around 1 month old), tested with multiple older master versions.
Airframe: Standard airplane, our AutoG2 airframe.
The mixer of problematic output is a simple thought-pass mixer from aux input. On this output is standard ESC.
With standard airplane (2100) it was connected to AUX2 port. And the same behaviour.
At output MAIN5 it was connected at our autogyro. The new mixer is not yet merged. And it stayed on the SD card. So I will able to send full mixer after the end of this coronavirus session…
So, then I will be able to send more information… Thanks.