Oh you raise a valid point that I didn't think of.
A dissertation is necessary to get this done, but if you were willing and able to tackle the code, this should be much easier; all setup and no code changes
Caveats and Warnings:This setup will
really bend your
mind, and I can't guarantee it work, and you will need to use it with "always armed". I can't think of a reason that it won't work, but throttle is a special channel that is handled differently than the others. This may be more true for multicopters where throttle neutral is really throttle idle speed, not half speed.
Be aware that sometimes you need to unplug and replug the FC for the mixing table to e.g. change from fixed wing to custom. I may tell you to save and reboot the FC more than needed. It might only need to be rebooted when you change mixer type (e.g. from fixed wing to custom). I may not tell you each time you need to save...
Typical programmable settings ESCs start the settings change process with throttle stick high at power on. It is possible that you could accidentally program your ESC settings inadvertently. If you want to be really safe, you can plug the ESC signal connector into an unused output. No signal to start the motor (still take the prop off) and it still provides power to the FC and receiver. Then plugging a normal servo in the throttle channel will give good feedback about that working as expected too.
Brief Description:There are two curves available for throttle in the mixer table. You don't really even need a single one for fixed wing. Those curves can be made to go backwards or stop moving on one side or the other side of neutral stick. This is exactly what we want for rudder. We will set it up with these two sticks (throttle and yaw) swapped around so that we can use the curves on yaw.
Detailed Instructions:Start by getting it set up as a simple 2 servo flying wing without rudder by:
- take your prop(s) off!!! really! we will be doing stuff with a throttle stick that has a spring that returns to the middle. IN ADDITION can also unplug the 3 ESC to motor wires but make sure nothing can short out.
- disconnect the linkage from top left and top right servos, leaving just the bottom servos working. Do this so nothing jams during this initial setup.
- I assume you have the transmitter (Input page) set up properly. It gets set up when you run the setup wizard and it has you wiggle the sticks to match the transmitter animation on the computer screen.
- do NOT set it to "always armed" yet. it won't let you make changes if it is armed.
- leave the vehicle type as fixed wing - elevon (and Saved) during this part of setup. do not go to the Vehicle Custom tab yet.
- you will need to go to the Output page and set the 2 currently defined servos (but not the throttle) up to be Min=1000 Neutral=1500 Max=2000 if they are not at least close to that already.
- throttle can be 1000, 1500, 2000 also. If you have working values for throttle, those are fine.
- get it working with aileron and elevator moving the 2 bottom servos in the correct direction as if you were going to fly it this way as a normal 2 servo flying wing.
- from this point on do not change the transmitter servo reversing or GCS Input page reversing (except where noted) or you will break what you already have working.
- make sure you save the working configuration and maybe reboot the FC and verify it
- go into the Input page. make a screen capture so you have all the numbers.
- swap everything (channel number, min, neutral, max, and reversed) on the throttle line with everything on the yaw line (and yaw with throttle). thus the throttle Neutral should be about (Min+Max)/2, that is usually about 1500, and the yaw Neutral should be about Min+40.
- we have not used those sticks yet.
- beware that everything in the GCS will have yaw for throttle and throttle for yaw from now on.
- props off!!!
- (this is where you could reprogram ESC settings accidentally when wiggling the sticks) if you Save, switch the transmitter on, and reboot the FC / receiver with both battery and USB plugged in, you can go to the Input page and see the values as you wiggle the sticks. There may be a time lag (up to 10 seconds) between moving and holding the stick at a new location, and it showing up on the Input page. The important thing here is that your transmitter trims are neutral, and that the number you see for real live transmitter channel value when the transmitter rudder stick is neutral (as seen on the GCS <Throttle> channel) is the same as the value set as the GCS <Throttle> Neutral setting. GCS has the same number for the throttle Neutral setting as is coming from the transmitter.
Set vehicle type to custom on the Vehicle page (and save and reboot the FC) so you can see the mixer table.
Looking in the mixer table (it shows as a raw number table when you have a custom mixer), you will see that each of the two servo outputs (columns) has both aileron and elevator mixed in, but there are plus and minus numbers. Start with taking a screen shot of this working mixer table. I think you will only have 3 active mixer table columns. Say that Ch1 is throttle, Ch2 is left (bottom) elevon and Ch3 is right (bottom) elevon.
- duplicate (hand type) the left elevon servo mixer table column (2) onto the 4th (first unused) column (set as type=servo). If needed we will handle the fact that this all needs to be reversed by reversing the servo on the Output page.
- duplicate the right elevon servo mixer table column (3) onto the 5th column.
- save it and reboot the FC.
- go to the Output page and make sure these new servos (should be listed as Servo 3 and 4 on the Output page, but columns 4 and 5 in the mixer table) have the same values for Min, Neutral, Max, and Reversed as for the original servos. Basically Servo3 should be the exact same as Servo1, (and 4 the same as 2).
- do not change anything in Servo1 or Servo2 since they are both working correctly.
- now, do these top servos need to be in the same or opposite directions as the bottom ones? consider the two left wing servos. does the splined output arm shaft point out (toward that wing tip) on one and in (towards the center) on the other? if so, change the Reversed check box for the new servo (e.g. Servo3). If both servo output shafts point in the same direction, then both Reversed boxes (Servo1 with Servo3 and Servo2 with Servo4) must match.
- that assumes your output shafts point in to center or out to tip and that the servo arm points away from the wing. if these are not true or too confusing, just try it as it (the Reversed box on the newly configured servo output) is. Leave it alone if it is correct, change the Reversed box if it is not correct and that should make it work.
- note that when you change the Reversed check box, it swaps Min and Max.
- save and reboot the FC
- convince yourself that the top servos are moving in the correct direction for elevator and aileron stick motions by watching the top left servo arm and the left connected control surface (same for right), but don't connect the top servo linkages yet.
Phew!!! Now we do some surgery on the curves in the mixer table:
- the throttle values are different than other channels, so the graphs will look funny, but the numbers will be correct? I hope there isn't some offset / scale coded for the throttle channel.
- set Curve1 Advanced to be 0.0, 0.0, 0.0, 0.5, 1.0 (these both are bottom to top, Min to Max)
- set Curve2 Advanced to be -1.0, -0.5, 0.0, 0.0, 0.0 (Source = Throttle)
- save and reboot the FC
And finally we change the mixer table throttle and yaw. Are you cross-eyed yet? :
- So assuming Ch2 is the bottom left wing servo, it must spread (downward=apart) on left rudder stick and stay centered on right rudder stick.
- Ch2, you have 4 options. Choose which ONE works to make your rudder stick work correctly for that wing servo. +127 on Curve1, -127 on Curve1, +127 on Curve2, -127 on Curve2. I think it will be Curve2 since Curve2 moves on the left side but is centered on the right side. Another wild guess is that the sign of the number will be the same as the sign of the aileron mixer table number for that servo. whatever. just pick the one that works for that servo.
- do the same for Ch3, Ch4, and Ch5 to get all the wing servos working as desired.
- wow, do all servo functions now work the way you need them to work? ? ? aileron, elevator, and rudder?
- connect the top servo linkages and adjust in enough slop so the servos don't fight each other at any stick positions.
To get the motor running:
- REMOVE THE PROP
- Mixer table column "Ch1" (type=Motor) is your motor output? so set the whole column to zeros except for Yaw=127 and Save.
- Understand that after the next line, the motor is always actively controlled by the throttle stick!!! Depending on your ESC brand, you must be careful that the throttle stick is low when getting ready to fly ... just like a normal airplane. I think the motor will not start up if the battery is plugged in with the transmitter powered off, but you should check this yourself (with prop off). Check all the careless scenarios you might do to understand what happens.
- set Input page Arming Settings, to Always Armed. Save.
- Turn transmitter on. Understand that you should unplug the battery and not wiggle sticks if the motor beeps as discussed below... By "beeps" I mean the "I am going into programming mode beeps" as opposed to the normal startup beeps. Unplug all power to FC / receiver. power the FC with a battery, and verify that throttle stick controls the throttle. If throttle is backwards (motor starts beeping), unplug the battery without moving the throttle stick, plug in USB only, set to "Always Disarmed", reboot FC, go to Output Page and change the Reversed box for <<<YAW>>> and Save and set it back to Always Armed, and try that.
I would start with a configuration that reduces the amount of rudder. One way is by cutting rudder throw in half at the transmitter, but read on for a better way that sets smaller numbers in the mixer table.
I have found that flying wings need generally small amounts of aileron and larger amounts of elevator.
Beware that if the servo is at it's limit because of the rudder, that you won't get any more out of it when aileron asks for even more on that servo in that direction. For that reason, you may want to change all the 127's associated with servos in the mixer table to something smaller. Leave the motor yaw value at +-127. For instance 3 42's only add up to 126. I would probably start with 42's and determine which channels need to be more or less than that. Maybe you need a lot of rudder, very little aileron, and medium elevator, then use say 63's for curve1 and curve2 (where rudder is really connected), 24 for aileron, and 40 for elevator. There is no way for the max on all sticks to add up to more than 127. I would actually start with something like this rather than all 127's (and don't limit the rudder with a transmitter setting).
I probably forgot something or assumed something, etc. Post back if you run into issues. Post back whether it works or not.
How many people who read this far think this deserves the "Hack of the Year" award?