Dual-motor tailsitters

Hi Tridge,
Verry interresting news.
I’m waiting since one year for this feature with ArduPilot.
This gives my motivation a strong push and is something new in the scene.
It exists with PX4 Stack but after all posts no to recommend.
Thank you
Otto from Switzerland

Hi Tridge,

In the Pixhawk Wiki (Copter) is described to set the Parameter MOT_PWM_TYPE to 2 for a OneShot125 ESC.

Is this the Parameter Q_M_PWM_TYPE for the 2 Mot Tailsitter now?
In the Full parameter list is no comment at this line.
Or are OneShot not supported?

it is, but it isn’t active for tailsitters. It is active for the VTOL motors on other quadplane types.

oh? Seems to be here:
http://ardupilot.org/plane/docs/parameters.html#q-m-pwm-type-output-pwm-type

it isn’t supported on tailsitters yet as the tailsitters AP_Motors backend uses the fixed wing control channels. It could be activated for the throttle if needed.

I’m sorry, I didn’t understand the sentence: Could be activated if needed.
I bought already the ESC’s. So do I have to order standad ESC’s?

most ESCs that do oneshot also understand normal PWM, so I expect it will work. If not then I could give you a test firmware with it enabled.
Can you try the latest master builds and let me know if it works for you?

I’m still waiting for new ESC’s with PWM.
Of course I’will give you feedbacks as soon as I can.

Which outputs (servo_Function) are for left, right motor and left, right elevon?
(Pixracer)
Below my first Project with Tailsitter.

1 Like

You can have the outputs in any order you like. The key is to set the SERVOn_FUNCTION values correctly. You need to set the left motor output to 73 and right motor output to 74.

thanks!

Sorry, din’t read correct your first post.

System running on the desk, various strange effects.
Signal check in MP/Tuning/Ch1Out to Ch4Out.
Servos Ch1,2 reacts according to stick input and moving the FC roll/pitch
Mots Ch3,4 are on 1100. With stick Yaw one or other are moving to 1500 with FMode FBWA but not in QSTABILIZE/QHOVER. No reaction on Throttel stick.
Arming not possible even Safty switch on and QSTABILIZ, STABILIZE

Trouble found: Locked due to arming check, no GPS.
_
What is the difference QSTABILIZE versus QStabilize, QHOVER versus QHover in Mode Calibraton with MP?

Summary of Params
SERVO1_FUNCTION=4 Output 1 Pixracer
SERVO2_FUNCTION=19 Output 2 Pix
SERVO3_FUNCTION=73 Output 3 Pix
SERVO4_FUNCTION=74 Output 4 Pix
ELEVON_OUTPUT=1 1,2,3,4
Mit MIXING_GAIN = 0,5
MIXING_OFFSET =0 (-1000, 0 , +1000 %)
KFF_RDDRMIX=0.1
Q_ENABLE=1
Q_FRAME_CLASS=10
Q_ASSIST_SPEED=0

only difference is capitalisation :slight_smile: [quote=“lorbass, post:13, topic:15302”]
Trouble found: Locked due to arming check, no GPS.
[/quote]
ok, have you made any more progress? Do you want me to examine your parameters? (if so, posting a log is best)

@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