Help Coding Flight Controller for a Floating Table

Hi everyone! I need help coding my hexacopter so that it will automatically fly and maintain an altitude of 4 ft while holding a payload of 5 lbs. It should be able to stay stable and balanced no matter where the payload is placed.

Here’s the kicker… we are using a hexacopter (Tarot FY680s TL68C0 Frame) and attaching a wood/foam sandwich platform on top of it so it will be a hovering table!

Top View of the platform

We are considering 2 options:

  1. We have the Pixhawk PX4 2.4.8
  2. We have the Arduino Mega and an Accelerometer (SparkFun Triple Axis Accelerometer Breakout - MMA8452Q)

We do not want to use any remote control to fly the drone. We just want the drone to fly to 4 ft automatically when turned on and land when prompted to turn off. I was thinking of having a simple receiver/transmitter set (basically a remote with a button to turn on and off only) to be able to prompt the flight controller to turn on, which will then power it up and fly up and when prompted to turn off by the remote will make the drone land.

Is there a way to hardcode the pixhawk so we can make it do this? Would it be easier to do it with the Arduino? Will we need anything else?

We just want to put a payload on the platform, have the drone keep it stable and balanced as it flies up to 4 ft and hover and land safely with it.

All suggestions and tips are welcome. I need all the help I can get. Thanks so much!

From a software point of view, it’s not too difficult. Just put ArduPilot (Copter) on the pixhawk and build it as a hexacopter and it should work. Our wiki is here.

The vehicle will likely need a downward facing sonar to maintain altitude properly.

You could connect the arduino to the vehicle using a telemetry radio and then send it mavlink commands (perhaps using dronekit). the commands you’d need would be arm, takeoff, set-mode to Loiter and set-mode to Land.

I suspect the problems are going to come from the desire to make the vehicle impervious to the center of gravity. It will invariably move a bit when things are placed upon it. Also GPS is not that accurate so the vehicle will move about unless you use an expensive RTK GPS. Perhaps optical flow would also help keep it steady.

The best thing though would be to start with a small normal quadcopter and see how that goes instead of jumping straight into the drone-table problem.

Best of luck.

By the way, I changed the category to Copter-3.4. It was originally placed in the “blog” category which made it appear on the front page of ardupilot.org.

Thanks for using ardupilot.