Guidelines for Designing a Custom Drone with PX4 Autopilot

Hello Everyone,

I could really appreciate some advice as I work on a custom drone project right now. My objective is to use the PX4 autopilot technology to construct a drone that can fly on its own.

Here are some particulars regarding my project:

Frame and Motors: I’m utilising motors that have 920KV and a 450mm quadcopter frame.
Flight Controller: The flight controller I possess is the Pixhawk 4.
Power System: A 4S 5000mAh LiPo battery powers the drone.
Sensors: I want to use a Lidar for altitude hold, an optical flow sensor, and a GPS module.

I’ve safely flashed the PX4 firmware onto the Pixhawk 4 and loaded QGroundControl. Right now, I’m setting up the sensors and fine-tuning the PID controllers. But I’m running into a couple obstacles:

GPS Setup: QGroundControl is unable to identify the GPS module. After inspecting the connections, everything seemed to be in order. Any advice on fixing this?

PID tuning: It’s giving me trouble getting the drone to hover steadily. Does this size of quadcopter have any recommended PID value starting points?

Failsafe Configuration: In order to guarantee a safe landing in the event of a signal loss, I want to set up a dependable failsafe mechanism.

Exist any best practices?

Thank you :pray: in advance for your help!

Hi @Grayson,

I am in between a similar process :slight_smile: and airframe setup with the new version (v1.14) and hope this helps.

Have you tried following the setup instructions on PX4 (using QGround control) ?

Which GPS module and protocol are you using and is it connected to GPS1 port on the pixhawk 4 ? You should be able to see some data in the Raw GPS stream when you plug in , but you may only get and accurate reading and a GPS lock when you are outdoors. I have had some GPS issue recently and rolling back to v1.13 fixed the issue, but this is because of old GPS hardware module.

The autotune feature works very well and is straight forward. The only aspect I can think of is to make sure you have the CoG and pixhawk placement in a reasonable center location of the frame and isolated from vibrations ( if you notic accel clipping warning )

For the flight safety, land or hold are good options during testing. If you are using the px4 v1.14 , you can simulate failsafe scenarios which is very useful.

I have not found any best practices on the px4 docs or forum but did find a methodical setup and tuning of airframe on ardupilot side. I might try and put best practices together later this year.