Dual-motor tailsitters

@tridge The motor/servo config I’m using for the Stryker tailsitter is this one: https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/mixers/caipirinha_vtol.main.mix

motors are on main PWM out 1,2 and servos are on 5,6

The Stryker tailsitter looks like this: https://goo.gl/photos/227HffnkZFAMQgD56

@kd0aij,

What you will need is the following on top of the default plane parameters with master:

Q_ENABLE=1
Q_FRAME_CLASS=10
Q_ASSIST_SPEED=0

SERVO1_FUNCTION=74 # right motor
SERVO1_MIN=1000
SERVO1_TRIM=1000
SERVO1_MAX=2000

SERVO2_FUNCTION=73 # left motor
SERVO2_MIN=1000
SERVO2_TRIM=1000
SERVO2_MAX=2000

SERVO5_FUNCTION=4
SERVO5_MIN=1000
SERVO5_TRIM=1500
SERVO5_MAX=2000

SERVO6_MIN=1000
SERVO6_TRIM=1500
SERVO6_MAX=2000
SERVO6_FUNCTION=19

obviously you should adjust trims as per usual. Note that the elevon trims are pre-mixer, so SERVO5_TRIM is your roll trim, not your left elevon trim (yes, I know this is weird …)

then you will need ELEVON_OUTPUT set to the right value. Start with ELEVON_OUTPUT=1 and try all 8 possible values (1 to 8) until you get the right pitch/roll controls in manual mode.

Then set Q_TAILSIT_INPUT to what control system you expect to use. I think PX4 does body-frame controls? So aileron stick when hovering does earth-frame yaw (I haven’t flown PX4 tailsitter, but I have heard this is what they do). If you like that scheme then set Q_TAILSIT_INPUT=1. If instead you prefer it to be like a multicopter, where aileron stick does earth-frame roll then set Q_TAILSIT_INPUT=0

Good luck!

PS: corrected for elevons being on 5/6, I misread it as 3/4 at first

also note that you need to do accel cal with the aircraft in fixed wing flight attitude, and set AHRS_ORIENTATION appropriately for fixed wing flight.

@kd0aij,
a few more notes as I know you haven’t flown ArduPilot fixed wing much.
Do your initial RC and servo direction setup in MANUAL mode. Get the RC1_REVERSED, RC2_REVERSED right, then get ELEVON_OUTPUT right for the elevon reversals.
Then switch to FBWA mode and check stabilisation direction is correct, do accel cal and mag cal. Make sure you do ESC cal too (unless you already know the range, in which case just set SERVO1_MIN/MAX and SERVO2_MIN/MAX). Also set SERVO1_TRIM and SERVO2_TRIM to the min throttle PWM.
First the first flight, use QSTABILIZE mode. Then switch to QHOVER for most testing and tuning. Once that works well try QLOITER. You may find you need to lower the XY velocity and position gains.
I don’t see a GPS in your photo? You will need one for the plane code.
Only once QLOITER is working well should you try a transition to FBWA mode.

I finally started the airframe build for my test aircraft, using a Skywalker X-5. Any chance someone can send me a build of APMPlane that includes the tailsitter code, for a PixRacer?

it is auto-built by our build server. This is the firmware you want:
http://firmware.ap.ardupilot.org/Plane/latest/PX4/ArduPlane-v4.px4

good luck, and keep us up to date on this chat!

Awesome; thanks! I got the motor mounts fabricated and glued in tonight, along with a lot of wiring odds and ends, so maybe I can get some control surfaces wiggling tomorrow.

great! photos/videos welcome. See earlier msgs for setup suggestions

I loaded the lastest arduplane build onto my pixracer, but when connecting with USB it times out, with the usual “no heartbeat packets received”. As a test I loaded the latest stable build of arducopter and I was able to connect to the board with USB, with no problems. I reloaded the same arduplane (latest) arduplane build that @tridge linked to, but I had the same results as before: timeout, with “no heartbeat packets received”.

Any smart suggestions? I did some digging around but I didnt’ find any obvious solutions, other than that there is an issue with the latest arduplane build for PX4 v4. @lorbass, can you send me the firmware file you used to load your pixracer?

1 Like

@mrjadkowski
I loaded V4 from here: http://firmware.eu.ardupilot.org/Plane/latest/PX4/

Has the Pixracer a Memory Card?
May be, thats the reason.

If not, I uploaded the file here: https://www.hightail.com/download/dDZIRFFYT2J6RTk3czlVag

For me, it works.

1 Like

Thanks @lorbass, your firmware file worked. Progress continues!

@tridge I’ve set the servo and Q params as recommended for the Stryker, performed accel cal and roll/pitch are reported correctly. Motors start when armed in QSTABILIZE, but elevon servos behave erratically for ELEVON_OUTPUT set to 0,1 and 2. They don’t move at all till I throttle up a bit; shouldn’t stabilization be working at all times? My CC Phoenix 25 ESCs didn’t respond at all to the ESC cal procedure, but they were flying OK on PX4 before.

SERVO1_FUNCTION  74.000000
SERVO1_MAX       2000.000000
SERVO1_MIN       1080.000000
SERVO1_REVERSED  0.000000
SERVO1_TRIM      1000.000000
SERVO2_FUNCTION  73.000000
SERVO2_MAX       2000.000000
SERVO2_MIN       1000.000000
SERVO2_REVERSED  0.000000
SERVO2_TRIM      1000.000000
SERVO3_FUNCTION  0.000000
SERVO3_MAX       1900.000000
SERVO3_MIN       1100.000000
SERVO3_REVERSED  0.000000
SERVO3_TRIM      1500.000000
SERVO4_FUNCTION  0.000000
SERVO4_MAX       1900.000000
SERVO4_MIN       1100.000000
SERVO4_REVERSED  0.000000
SERVO4_TRIM      1500.000000
SERVO5_FUNCTION  4.000000
SERVO5_MAX       2000.000000
SERVO5_MIN       1000.000000
SERVO5_REVERSED  0.000000
SERVO5_TRIM      1500.000000
SERVO6_FUNCTION  19.000000
SERVO6_MAX       2000.000000
SERVO6_MIN       1000.000000
SERVO6_REVERSED  0.000000
SERVO6_TRIM      1500.000000

Q_ASSIST_SPEED   0.000000
Q_ENABLE         1.000000
Q_ESC_CAL        0.000000
Q_FRAME_CLASS    10.000000
Q_FRAME_TYPE     1.000000
Q_M_PWM_MAX      0.000000
Q_M_PWM_MIN      0.000000
Q_M_PWM_TYPE     0.000000
Q_M_SAFE_DISARM  0.000000
Q_M_SPIN_ARM     0.100000
Q_M_SPIN_MAX     0.950000
Q_M_SPIN_MIN     0.150000
Q_M_SPOOL_TIME   0.250000
Q_TAILSIT_ANGLE  30.000000
Q_TAILSIT_INPUT  0.000000
Q_TAILSIT_MASK   0.000000
Q_TAILSIT_MASKCH 0.000000
Q_THR_MAX_PWM    2000.000000
Q_THR_MIN_PWM    1000.000000

Nothing to useful to contribute; just a quick picture of my build so far. I still need to mount the GPS and SiK telemetry radio. The wifi telemetry included with the pixracer has been super unreliable for me. I’m at 1065 grams right now, with a predicted thrust of 2000 grams, so this thing should be a rocket ship!

6 Likes

Cool!!!, please keep update your progress :slight_smile:

1 Like

you may find that updating the firmware on the WiFi radio helps. It was very unreliable for me until I updated to this firmware:
https://pixhawk.org/peripherals/8266

excellent! The race is on for who claims first flight on a non-simulated dual-motor tailsitter

@kd0aij, test the servos direction in MANUAL and FBWA mode, not in QSTABILIZE. In MANUAL check it is right direction for fixed wing flying elevon plane. In FBWA mode check it stabilizes in fixed wing attitude.
Also double check your RC input reversals. Non-reversed means:

  • RC input channel 1 is high for right roll
  • RC input channel 2 is high for pitching up (pulling back on elevator stick)
    adjust RC1_REVERSED=0/1 and RC2_REVERSED=0/1 as needed.
    There are 8 possible values for ELEVON_OUTPUT, from 1 to 8

I win what’s the prize? https://youtu.be/koOqenMpvck

4 Likes

Wow, that’s a pretty innovative takeoff and landing method. What flight controller and firmware are you using?

@tridge quadplane motors apparently must be assigned to channels above 4

with motors on channels 5,6: rudder input causes motors to spin even when disarmed (safety off)