I am working on integrating a Pixhawk 2 into a tilt-wing VTOL aircraft. Below is a picture of the layout. I am wondering how to determine the value of the Q_TILT_MASK parameter. I am running Arduplane 3.8.4 firmware.
As the image shows, motors 1 and 2 do not rotate (they are permanently mounted vertically), motors 3 through 8 all rotate between 0 degrees angle of attack and 90 degrees angle of attack. Motors 1 and 2 are on a single channel, motors 3 and 4 are on a single channel, motors 5 and 6 are on a single channel, and motors 7 and 8 are on a single channel. This essentially forms a Quad+ type frame when in the vertical flight configuration. Currently, here are my channel layouts:
Also, the orange 1, 2, 3, and 4 represent a Y-harness between motors. I chose the Quad+ layout to drop all 8 of my motors to 4 channels so I have the option to test the KK2.1.5 flight controller as well since it can only output 8 channels. Although, I am not 100% sure if the Quad+ layout is the best choice, but it is an option I decided I could try.
The number on the left is the APM motor inside the Motor Order Diagram. The number on the right is the bit weight (or position) in the mask. So in Nathan’s example, he showing how the bit weights get added up.
That is taken care of in the APM Plane firmware when you have the QuadPlane feature enabled (Q_ENABLE=1) and simply change flight modes from a copter mode like QSTABILIZE to a plane mode like FBWA.
Ok, so hopefully these will be simple questions, and the last two!
Now, how would one go about assigning SERVO2_FUNCTION to both elevator AND wing tilt? So far I have the parameter SERVO9_FUNCTION = 41 as the main wing rotation mechanism. However, my horizontal stabilizer doubles as an all moving stabilator and rotates 90 degrees for VTOL operations. I could do some mixing in the Futaba 14SG and have that mixing be on the same switch as the mode change switch, but i think that it would be difficult to get the timing right on the speed of rotation, whereas the Pixhawk might have an easier time with it.
Second question: on the Futaba side of things, channels 5 through 8, what should I assign them in the Futaba FUNCTION menu? I know the Pixhawk Parameter side of things (SERVO5_FUNCTION = 33, etc…but would it simply be:
Channel 5: aileron
Channel 6: elevator
Channel 7: throttle
Channel 8: rudder
As if it were setting up a quadcopter on the first four channels on a Futaba radio?
I picked the second question first as it is easier to answer in a short time before work.
No need to set up anything on the Futaba other than maybe mixing a few switches for more than 2 or 3 flight modes. The channels are already reserved so you simply do a radio calibration in Mission Planner. Follow the Wiki’s step-by-step setup from frame choice to flight modes.
Many of us use the FrSky Taranis X9D+ or newer models with OpenTX firmware. There is a 6-position knob switch on top of the transmitter used for changing flight modes.
With the current ardupilot code, your current proposal won’t work the best for a number of reasons.
You cannot assign multiple functions to a servo based on flight mode - motor tilt during vtol, but elevator during fixed-wing mode.
During your transition, your tail may be providing a very strong pitch down torque until the transition is complete. Considering your wings are also pivoting, it may help your case, but it will be difficult to control.
Stabilators typically need relatively fine, precise movement. By having it pitch 90 degrees or more, you’ll probably run into a challenge with finite pitch tuning/control.
Manual control from a transmitter will be difficult with a dynamically changing system
Considering the above factors, I would recommend adding a separately controlled elevator surface to your tail stabilator if you intend to use it with ardupilot.
Dang, ok, so I can easily add the extra elevator channel. The servos for the elevator (as well as the control surface itself) are already in the aircraft, I just have them disabled. I did, however fly the aircraft in the CTOL configuration and performed STOL testing by manually rotating the wing in increments (before the Pixhawk was installed), and the whole moving stabilator controlled the aircraft fine when I limited it’s throw, and used about 30% expo. But if the code doesn’t allow this double function, then I will have to scratch the dual purpose thing anyway.
Additionally, I tried some static testing last night, and I was able to get my motors to arm and spin up in the manual configuration (except for the permanently mounted motors, of course), but when i switched the aircraft to QHOVER mode, the motors would turn off and the wing would not rotate. the parameters I have entered (changed from default) are as follow:
Q_ENABLE = 1
Q_FRAME_CLASS = 1
Q_FRAME_TYPE = 0
Q_THR_MD = 500
Q_RTL_MODE = 1
Q_TILT_TYPE = 0
SERVO9_FUNCTION = 41 (this is my wing tilting mechanism (one linear actuator that uses PWM input)
SERVO9_MIN = 1000
SERVO9_MAX = 2000
Q_TILT_RATE_DN = 0
Q_TILT_RATE_UP = 40
Q_TILT_MASK = 11
ARMING_RUDDER = 0 (have also tried 2 with no luck)
I also setup the mode switch to channel 10 (and have confirmed it actually switches modes). The modes I have assigned (in order) are: QHOVER, FWBA, MANUAL.
I have also disabled all available arming checks. Basically, I made it so it will allow the aircraft to arm no matter what.
I’m assuming there’s probably something simple that I’m missing, but I’m just not sure what. I followed all of the steps in the quadplane setup and the tilt-rotor/wing setup on this website.
Use QSTABILIZE instead of QHOVER for your initial tests. This eliminates issues due to the BARO and GPS. Once the craft hovers and controls nicely, then you can test QHOVER and QLOITER before your first transition to forward flight. Also, when testing QHOVER and QLOITER, make sure your Arming checks are enabled.
Here is what I am thinking your setup should be. Did you mention that your rear motors (M5 and M6) had a yaw tilt mechanism on them? If so, it is not needed as the wings motors will be used for yaw control when hovering.
Thanks for the reply, but I’m not so sure I’ve successfully described the aircraft quite right. Both of the wings rotate together one the same actuator (cannot be controlled separately for yaw), and the whole horizontal stabilizer rotates together (the motors on the stabilizer cannot be pitched differently from each other).
Unless I’m just not reading your reply correctly.
I will post a youtube link as soon as I get a chance. That may clear up some confusion on how things rotate.
Ok, I see now. This is not a typical setup and I do not think you will have yaw control during hover.
I see that Q_TILT_TYPE should be 0 (Continuous) now. What is missing is either individual tilt capability on each wing or a rear motor that can move left or right like on the CL-84 R/C VTOL.
Also, there seems to be added complexity from the front motor. It does not need to be a quad frame but rather a tri-copter. Although either frame should work, it seems that the front motor could be removed and replaced with a larger battery or camera.
So the two front motors were boomed out for added stability and for CG purposes. Since the motors are too small to lift the extra nose weight needed to balance the aircraft. Keeping in mind this is only a first rev concept. Not quite where I want the plane to be (nor enough time to change the design concept).
As for yaw control, I don’t care about that as much, but 2 possibilities are the ailerons for yaw control or just the differential in torque as with a typical multirotor.
So given this information, any ideas why I can’t get the wing to rotate automatically?