Servers by jDrones

Getting Flight Mode and Throttle/Power Level via MAVLink for VTOL

(Shaish Gopichand) #1

Good day all.

I’ve recently started using the QuadPlane software for a custom airframe and have been able to achieve stable hover and fixed-wing flight (using conventional fixed-wing takeoff). During the multi-rotor phase of the flight envelope, I am making use of two additional motors to supplement the vertical thrust (so as to increase the payload capabilities of the VTOL) and then during fixed-wing flight these two motors are re-orientated to provide the main forward propulsion. Currently, I’m using RC pass-through to control the speed of these motors.
However, I plan on making use of an Arduino (with the MAVLink library) to handling the control of these motors by connecting it to one of the pixhawk UART ports and communicate using the MAVLink protocol. My question is whether it is possible to get the Arduino to read/request the current flight mode and throttle/power level? If this is possible, would the arduino have to continuously poll the pixhawk for this data or can I set it up to stream this infomation at a set frequency?

Thanks for any help you guys can offer.

(Peter Hall) #2

just control the motors directly with ArduPlane, what is your configuration?

You can do all those things with Mavlink and get it to stream to the arduino, not that it is the best way to solve your problem. The ArduPilot code is no more difficult than arduino, just there is more of it.

(Shaish Gopichand) #3

Just to clarify, during normal fixed-wing flight it is intended that ArduPlane directly controls the motors.

The problem comes during hovering.

The airframe that I’m testing is a custom one that I haven’t found an ArduPilot configuration for. It makes use of the normal quad-X configuration for the vertical thrust but the remaining vertical thrust, to lift the payload, is provided by petrol motors mounted in the fore and aft of the fuselage (behind firewalls) which pivot. The idea is to use the electric quad motors (in the X configuration mentioned and also directly controlled by ArduPlane) in multi-rotor flight to provide about half the thrust and control the aircraft whilst the two petrol motors are orientated with their net thrust vector vertically and are used for brute unintelligent thrust. During normal fixed wing flight the petrol motors will be oriented for horizontal propulsion and then be controlled by Arduplane.

Are you suggesting that I rather modify the ArduPlane code for my purposes? I’m not that familiar with the ArduPlane code itself and the idea of changing the actual code does seem daunting to me. Regardless, I do want to get it working using the Arduino route and then look at becoming more comfortable with changing the ArduPlane code to arrive at a neat solution.

(Peter Hall) #4

quite hard to picture your design but this may ‘just work’ buy assigning the throttle channel to your booster motors. Alternatively a custom motor mixer and the tilt-rotor code will work. This is a quite simple change to make, the harder part is setting up the build environment.

(Shaish Gopichand) #5

Ok, I’ll give that a look. But, like I’ve said I do want to try the Arduino route as well as proof of concept. I’ll see if I can upload a picture of the configuration tomorrow. It’s 1:30am where I’m from and I don’t have access to my other PC right now.

Thanks again

(Shaish Gopichand) #6


So here is a picture of the airframe. The blue discs represent the props of the electric quad motors (fixed in position and mounted to booms). The green discs represent the props of the petrol motors (the motor is represented simplistically by the black boxes attached to the discs) that have two orientation states: Vertical thrust for liftoff and horizontal thrust for fixed-wing flight.

(Peter Hall) #7

should the petrol motors be used for copter mode stabilisation?
if they should then its a new frame type, a hexa I

if not it is just a ‘booster’ will probably also need some small code changes. see:

(Shaish Gopichand) #9

No, they aren’t supposed to be used as part of the copter stability control. I did try the hexa config before but the results weren’t great because of the motor mismatch and slow response of the petrol motors.

I will have a look at using the booster option and then switching to use the normal throttle output.

Would you be open to helping me with the MAVLink messages should I get badly stuck. It would be greatly appreciated.

Thanks