Downloads
source codes of the different programs + wiring diagram
Arduino Quadcopter DIY 100% - Construction de A à Z - Building from scratch
source codes of the different programs + wiring diagram
On this page you can download the different source files (with comments in English) :
- flight controller in acrobatic mode
- flight controller in self-level mode
- ESC calibration program
- ESC configuration program
- program for receiving RC signals
The wiring diagram and the manufacturer's documents are also available.
The PID setting parameters in these codes are for a "F450" type chassis, i.e. an arm width of 23cm/24cm. If your chassis differs, the PID coefficients will have to be re-adjusted.
CAUTION : the use of a UAV can be very dangerous. The code given here is only as a learning example. The author gives no guarantee of any kind and can in no way be held responsible for injuries or damage caused by the use of this code in the development of a quadcopter UAV.
IT IS THE RESPONSIBILITY OF THE USER TO TAKE ALL NECESSARY SAFETY MEASURES.
It is more than highly recommended to make its first tests without the propellers attached to the motors. A small error in a line of code can make the drone uncontrollable ! When the UAV's behavior is completely in line with the expected reactions, the propellers can be mounted for a test flight. Always perform the tests in an open area and away from other people.
WARNING : the use of a recreational drone is subject to regulation, please inquire in order to practice legally.
Arduino source code of the flight controller in acrobatic "rate" mode :
Arduino source code of the flight controller in stabilized "self-level" mode :
Source code of the ESC calibration program :
A preliminary step before using ESCs is their calibration. The program below allows you to calibrate the ESC from the Arduino board. To calibrate an ESC, specific wiring is required (see "Electrical and Electronic Components Part I").
WARNING : do not put a propeller on the motor during calibration.
Source code of the ESC configuration program :
A preliminary step before using ESCs is their configuration. The program below allows you to configure the ESC from the Arduino board. To configure an ESC, specific wiring is required (see "Electrical and Electronic Components Part I").
WARNING : do not put a propeller on the motor during configuration.
If you're having trouble setting up ESC, here's a summary of the steps to follow :
Source code of the radio control test program :
This program allows to test the signals received by the Arduino when varying the commands emitted by the radio control. Of course, the receiver must be connected to the Arduino according to the general wiring diagram (see "Wiring diagram" section or access the file directly).
General wiring diagram :