Table of Contents
EMRP2022
Just Drone It ! Beginners DIY Tutorial
Introduction
Hello and welcome all to this brand new tutorial of making drones from scratch. This tutorial will require no prior knowledge of drone development or any special expertise except a little bit of soldering (Basic level of soldering). That's why I call it “Just Drone It !!”. In this tutorial we are going to make a drone with 6 arms which is also known as a “HexaCopter”. This tutorial is divided into 6 sub sections to make it easy for you to go through them step by step. These sections will cover your questions as how you should plan your drone? Which material and tools should you use? How to assemble the drone? How to calibrate it ? What are the safety precautions to take care of? Don't get scared by these heavy words. They are all simple in meaning and real. So without wasting any further time, Let's get Started !!
Inspiration & Motivation
Drone technology is not new but mostly unexplored. Drone technology has come into the light in recent years where the need of UAV (Unmanned Aerial Vehicle) increases as automation increases in different fields such as agriculture, military, logistics and surveillance. Drones have played a great role in disaster management too in past years. Ability of a machine to not just fly to a distance but hoover around specific spots and gather information with different sensors is the main inspiration behind drone technology.
Buying different types of drones and flying them will not excite you for a long time but to understand the logic and engineering behind it and create your own drone and fly it will give you more boost and excitement in the long run. The main aim of this tutorial is to give you an overview and guide you step by step to make your first ever drone from scratch. Planning: Discuss the design and planning process, including any considerations for factors such as weight, stability, and control.
Materials & Tools
In this section of the guide we will see which materials and tools are required beforehand to build a drone. These materials are easily available and a link is also provided below the item.
1) DJI F550 flame wheel set
Technical specification: Model: Flame Wheel 550 (F550) Frame Weight: 478g Diagonal Wheelbase: 550mm Takeoff Weight: 1200g ~ 2400g Recommended Propeller: 10 × 3.8in ; 8 × 4.5in Recommended Battery: 3S~4S LiPo Recommended Motor: 22 × 12mm (Stator size) Recommended ESC: 15A OPTO Assembly: Step-by-step instructions for assembling the drone, including detailed explanations and photos or diagrams to help illustrate the process.
Description of the item: DJI F550 frame is an ultra strength material also having Integrated PCB Wiring with huge assembly space and attractive frame arms.
Figure 1: DJI F550
Link to buy: https://www-v1.dji.com/product/flame-wheel-arf.html
2) pixhawk 2.4.8 flight controller
Technical specification: Technical specification can be found at https://ardupilot.org/copter/docs/common-pixhawk-overview.html
Description of the item: This is the flight controller of the drone. The most important part in drone assembly. The drone's motors and ESCs are managed by the flight controller, which is often known as the drone's brain. It is an electronic circuit board that has transmitter pins, communication protocols, sensors, and processors installed. Each feature of the drone is controlled by a flight controller. By adjusting the motors' RPM, it can move the drone.
Figure 2: pixhawk 2.4.8 flight controller
Link to buy: https://de.aliexpress.com/item/1005004839852047.html
3) Graupner mx-20
Technical specification:
Frequency: 2,4 GHz Channels: 12 RC model memory: 24 Length: 190 mm Width: 175 mm Weight: 770 g Features: Incl. receiver Product type Handheld : RC
Description of the item: For experienced RC model makers, the mx-20 HoTT's 12 control capabilities let you control practically all models. With integrated telemetry, ultra-quick response times, and bi-directional connection between the transmitter and receiver, Graupner HoTT 2.4 GHz transmission technology assures excellent reliability. The station contains a memory of 24 models. programming using capacitive touch buttons and simpler programming techniques. All configuration parameters and telemetry data are perfectly shown on an 8-line, high-contrast blue backlit graphic display. telemetry data storage and model memory expansion via a microSD memory card. USB connection for updating firmware and reading and storing model memory.
Figure 3: Graupner mx-20 transmitter
Link to buy: https://w-w-modellbau.de/Graupner-MX-20-HoTT-24-GHz-Fernsteuerun
4) 2312E servo motor
Technical specification:
Recommended load: 350 g axis 3S LiPo. Recommended battery: 3S Lipo. Maximum Thrust: 710 g/axis. Working Temperature: -5°C to 40°C. Stator Size: 23 × 12mm. KV: 9600 rpm/V. Weight: 57g.
Description of the item: The 960 Kv DJI E305 2312E Motor CCW features the most up-to-date stator winding construction technology for increased efficiency. By increasing the wire embedding between the stator arms, this method enables any buildup of heat in the motor to be drained considerably more quickly. The single wire design of the E305 2312E motor also has the benefit of increasing efficiency because it allows the motors to operate at larger Amp draws without seeing a rise in heat.
Figure 4: 2312E servo motor
Link to buy: https://www.buildyourowndrone.co.uk/dji-e305-2312e-motor-960kv-ccw
5) E Series 420 LITE BLDC
Technical specification: Max. voltage: 17.4V Max. current: 20A Max. peak current (3s): 30A PWM input signal level: 3.3V/5V Compatible with signal frequency: 30-450Hz Battery: 3S-4S Lipo Weight: 27g
Description of the item: The DJI E305 420 Lite ESC makes use of the most recent square-wave drive design that DJI engineers have refined to produce the most efficient ESC. The 420 LITE ESC, which is based on the traditional ESC design from the DJI Tuned Propulsion line, offers streamlined functions in a significantly smaller and lighter package than the DJI E310 420S ESCs. The most stable and maneuverable performance is delivered to your platform by the effective and responsive algorithm.
Figure 5: E Series 420 LITE BLDC
Link to buy: https://www.buildyourowndrone.co.uk/dji-e305-420-lite-esc
6) 433MHz Holybro telemetry radio set
Technical specification: Power transmission: 0 - 100mW / 500mW (depending on the version) Firmware: OpenSource SIK Error tolerance: adjusts up to 25% of an incorrect signal (Software) Configuration: Mission Planner & APM Planner Interface: Integrated USB (FT230X) UART Interface: 3,3V Dimensions: 26 x 53 x 10,7mm (without Antenna) Transmitter power: 100mA Receiver power: 25mA
Description of the item: Based on the JST-GH plug system, the Telemetry Radio Set V3 is simple to use with flight controllers like the Pixhawk 4. There is a cable provided by that facilitates the connection between the Telemetry Radio Set V3 and older flight controls if the Set is used with them. ArduPilot and Dronecode are automatically detected, making it simple and comfortable to set up the Set.
Figure 6: 433MHz Holybro telemetry radio set
Link to buy: https://www.mybotshop.de/Telemetry-Radio-Set-V3-433MHz
7) Micro SD 32 GB card
Technical specification:
RAM: 32 Gb Weight : 0.8 ounces Dimensions: 15 x 10 x 0.2 inches Dimensions LxWxH: 15 x 10 x 0.2 inches Manufacturer: SanDisk ASIN: B018UWWMH8 Is Discontinued By Manufacturer: No Date First Available: December 2, 2015
Description of the item: read and write speeds of up to 90 and 60 MB/s, respectively. UHS-I/V30/U3 — Complies with the latest UHS Speed Class 3 (U3) and UHS Footage Speed Class 30 (V30) for capturing stunning 4K UHD videos and Class 10 for capturing Full HD (1080p) and 3D video. Built for harsh situations, SanDisk Extreme microSDHC UHS-I (32GB) is temperature proof, water proof, shock proof, and x-ray proof. Each order includes 2 devices.
Figure 7 Micro SD 32 GB card
Link to buy: https://www.amazon.com/SanDisk-Extreme-microSDHC-Adapter-2-Pack/dp/B018UWWMH8
8) Buzzer and safety switch
Technical specification: Alarm Diameter: Around 30mm Alarm Height: Around 10mm 2 Mounting Holes Distance:35mm Buzzer Type: Piezoelectric Sound Pressure Level 95 dB Rated Voltage: 12V DC Operating Voltage: 3 - 24V Max Current Rating 20mA Frequency 3900±500Hz Drive Method: Drive Circuit Built-in with Mounting Holes Sound:“Di” Continuous
Description of the item: This buzzer makes a continuous sound of “DI” and the status of the flight controller can be guessed from the beeping sound of the buzzer. Buzzers are having multiple uses in drone building. Those can be listed as below, After a crash, the lost model warning makes it very easy to locate your quad. When the battery voltage is becoming low, a buzzer sounds and should land. Quad status: You can tell what state the quad is in by listening to the beeps.
Figure 8: buzzer and switch
Link to buy: https://www.amazon.com/Accessories-pixhawk-pix2-4-6-Control-Aircraft/dp/B08B5STGD3
9) Pixhawk 4 GPS module
Technical Specification Industrial sensitivity (-167 dBm) Cold start < 26 sec. Rechargeable 3V Lithium battery Low noise 3,3V regulator 60mm Diameter 32g with Case 30cm Pix32 24 compatible 6 Pin APM 5 Pin 2 types compatible
Description of the item: This GPS will function with PIXHAWK4. It is equipped with a UBLOX M8N module, an IST8310 compass, and a tri-colored LED indicator. Also, the Safety switch on it will make connecting easier and more convenient. The default baud rate for this module is 38400 Hz.
Figure 9: Pixhawk 4 GPS module
Link to buy: https://www.mybotshop.de/Pixhawk-PX4-2Gen-GPS-Module
10) GR-16 HOTT 2.4 GHz 8 channel receiver
Technical Specification:
Up to 75 channel hopping for extreme operating reliability and immunity to external interference Broad voltage ranges of 3.6 V - 8.4 V (functional to 2.5 V) ensures safe operation even during voltage fluctuation Dual power connections Wireless setup and access technology LED to show operating status Increased receiver input sensitivity providing a vertical range of up to 4000 meters Easy, front access servo connections Fail-safe, hold, OFF and standard programmable directly from radio or receiver (channel 1: fail-safe; all others: hold) Programmable warning thresholds for low voltage, low or high temperatures Real-time wireless flight data recording Ultra-fast re-binding with HoTT radio Digital output (SUMD, SUMDV3, SUMDIN, SUMO, SUMI, SBUS) at input or output connector for flight controllers like V-Stabi, Microbeast, Brain, Bavarian Demon, 3Digi, Naze, et al Selectable frame rates between 10ms to 20ms
Description of the item: Used to connect Graupner HoTT radios to the Graupner GR-16 8ch 2.4 GHz receiver and build a strong, dependable connection. No additional sensors are required for continuous, real-time information monitoring of receiver voltage, temperature, and signal strength that is supplied back to the radio. Using the most recent antenna utilized to receive telemetry downlink signals, the twin, full range 2.4 GHz diversity antenna system continuously hops to the stronger antenna signal. As a result, you can be sure that telemetry data will always be accessible for a safe and secure flight since the return channel data will be transferred via the antenna that is better positioned.
Figure 10: GR-16 HOTT 2.4 GHz 8 channel receiver
Link to buy: https://www.d-power-modellbau.com/graupner/receiver/graupner-gr-16-6-channel-24ghz-hott-receiver
11) Landing Gear
Description of the item: Commonly come as 3D printed and easy to mount.
Figure 11: Landing gear
Link to buy: https://de.aliexpress.com/item/1005001626918054.html
12) XT60 connector with power Module
Technical Description: Max input voltage: Support 6S battery Max current measurement: 90A Voltage and current measurement configured for 5V ADC Switching regulator outputs 5.3 V and 3A max 6-pos DF13 cable plugs directly into APM 2.5's 'PM' connector
Description of the item: The APM 2.5 Power Module is an easy way to use a 6-pos connection to power the flight controller APM 2.5 with clean energy from a LiPo battery as well as measure current consumption and battery voltage. With up to a 6S LiPo battery, the on-board switching regulator can produce 5.3V and a maximum of 2.25A. The Power Module is delivered completely constructed with Deans connectors and is shielded by shrink tubing.
Link to buy: https://de.aliexpress.com/item/1807862501.html
13) I2C cable
Description of Item: Interface to communication also known as I2C is a different protocol that drones frequently employ. It has a low cost, a small footprint, and a relatively straightforward software implementation because it only requires two input/output pins. However, because it transmits data more slowly and is more prone to interference, it is typically used to link peripherals or payloads to the controller that do not require rapid transmission.
note
If your GPS module already has an I2C wire section then you don't have to buy this differently.
Figure 13: I2C wire
Link to buy: https://de.aliexpress.com/item/1005001351911782.html
Other things you will need except mentioned above are:
14) Soldering iron
15) Flux and solder wire
16) Hex2 Screwdriver
17) Two sided tape
18) Zip ties
Planning
Welcome to “the planning section” of this tutorial. Here we will focus on a few basic questions such as how our drone will look? Purpose of the drone? and see the pre-requirements to be fulfilled before undertaking any drone project.
Here in this tutorial we are going to build a HexaCopter using PixHawk 2.4.8 flight controller. We will use the standard frame of hexacopter model X for this tutorial. Our drone will look like drone shown in figure 14
Figure 14 HexaCopter model Hexa X
Here in the figure CW means ClockWise and CCW means Counterclockwise. Which denotes the rotational direction of servo motors.
In this tutorial we will build a simple drone. We will not work with cameras and different types of sensors. But if you want, then you can add cameras to the drone with onboard CPU such as Jetson NX for computational means. Also in the planning stage you have to take care of the factors such as roles and organizational structures in drone development. Your drones' and equipment's technical specifications. Procedures for organizing and preparing for flights. Emergency, unusual, and customary processes. Schedules for reporting maintenance and incidents. standards for crew training and qualification.
Here you will find the detailed list of frames and different types of drones and RC vehicles: https://ardupilot.org/copter/docs/connect-escs-and-motors.html
Assembly
Assembling all the parts which we have gathered is the main part in drone development. Before starting to this section make sure that you have all the parts with you which are listed below.
Parts you will need to start with this step:
1- 6 servo motors
2- 8 propellers
3- 6 ESCs
4- Flight controller
5- Telemetry Radio set
6- The Frame (Upper and lower frame part)
7- Screws (preferred M3 or M2.5)
8- XT60 connector
9- Power Module with 6 pin wire
10- 5s battery
11- Battery adapter
12- Safety switch
13- Buzzer
14- I2C cable
15- Receiver set
16- GPS module
17- Landing gear
Along with these you will also need Soldering gun, flux and soldering wire, Few zip ties, insulating tape and a Hex2 screwdriver.
Assembling the drone have following steps to perform
step 1) Mount motors to the arms
For assembling the motors to arms we are going to use M3 screws. For mounting other equipment to the frame we are going to use M2.5 screws. Make sure that you have these screws with you before starting assembly.
First take the servo motor and the arm of the drone and set the wires of the motors through the arm to the downside of the arm. So the final structure will look as shown in figure 15 below.
Figure 15 Mounting servo motor to arm
Use the M3 screws to fix the motor to the arm using your screwdriver.
Repeat this process for all the six arms.
Step 2) Soldering all the connections on the board
On the baseboard of DJI F550 you will see different spots of square silver marking. There will be 2- 2 markings on each ending of the arm side And 2 markings you will see in between the arms. You can see them in the below given figure 16
Figure 16 Connections with positive and negative symbols on base frame
Base frame with markings for connections with positive and negative signs
These markings are the inbuilt connection throughout the frame.
In this step now we have to solder the ESCs to the connection slots shown in figure 16 at the end of each arm. Make sure that while soldering Red wire will always go to the positive terminal and Black wire will always go to the negative terminal. Also you will see 2 extra positive and negative terminal points at the base of the frame; these points will be used to attach the main power supply wire which will give power to the motors throughout the frame. After soldering all ESCs to the frame and also the XT60 power supply cable your frame will look similar to the frame shown in figure 17 below.
Figure 17 basic skeleton with all ESCs and power supply cable attached
Step 3) Soldering XT60 plug with wires and then onto main board
In the previous stage we connected 2 different power supply cables to the main board and now we will attach an XT60 plug to these wires. Make sure that you have positive terminal solder to the positive side of the plug and negative terminal to the negative side of the plug.
If you have already soldered cable with the connector then you can skip this step.
Else you have to solder the wires to the XT60 connector.
If you don't know how to solder the connector you can go through this tutorial given here.
How To Solder XT60 Connectors - Step By Step:
The end result of soldering the wires to connector will look same as shown in figure 18
Figure 18 Soldering wires to XT60 connector
After this connection is done you can attach these connectors to the main board where we have extra positive and negative terminals in between the base of the arms as shown in figure 17
Step 4) Mounting arms onto base frame
In this step we will fix our arms of the drone to the base frame of DJI F550.
For the fixing we will use M2.5 screws.
Here in figure 19 you will see in the bottom view part on the left hand side there are 4 holes. From those holes the two holes from the inner side are going to be placed on the board which we will fix with M2.5 screws.
Figure 19 top and bottom view of the arm
If you are not able to figure out attaching the arms to the base you can refer to the figure 20 given below to see the arrangement of the base frame and the arms.
Figure 20 Bottom view for screw attachment to arms
Step 5) Connecting ESCs to arm
Now as we mount the arms to the base frame now we will connect the ESC which we soldered before to the frame to the arms.
For fixing the position of ESCs to the arm we will use the zip ties and we will fix them to position near to the servo motor wire such that we can easily connect the motors and ESCs.
In figure 21 you can see the connection for ESCs to arm using zip ties.
Figure 21 using zip ties for mounting ESCs to the arm
Step 6) Connecting motors to ESCs
Here in this step we will connect the servo motors to ESCs. For that we will connect 3 wires of servo motors to the 3 sockets we have on the ESCs. These three wires are responsible for power supply to motors as well as to send commands from the flight controller about speed.
Make sure that your connection looks same as the one shown in figure 22
Figure 22 Upside down view of connecting servo motor wire to ESCs
Step 7) Connecting ESCs, GPS module, Receiver to flight controller
part 1) Overview of flight controller connections
In this step we will connect all wires of our electronics to the flight controller. We are going to use PixHawk 2.4.8 flight controller in this tutorial. So first we will mount the wires plug to the respective location on the flight controller. Below given figure 23 will show you all connection locations in which you have to connect your electronics.
Figure 23 Diagram of PixHawk 2.4.8
part 2) Mounting Flight controller to base frame
First thing first, So we will first mount the Flight controller firmly to the base of the frame with 2 sided tape. Make sure that it is exactly in the middle so that the weight of other electronic items can be distributed evenly to the drone body. Here in the figure 24 below shows the arrangement of the tape below the flight controller but you can use different space and style to mount the flight controller to the base frame.
Figure 24 Double sided tape below the flight controller
part 3) Adding safety switch and buzzer
We will add our Buzzer and safety switch to the flight controller (These are mandatory to add). Figure 25 will show you the location for the safety switch and buzzer to attach.
Figure 25 Safety switch and buzzer location and connection
part 4) Adding GPS and Compass
Now we will add a GPS module and compass to the flight controller. For this we will use the I2C cable and GPS module (separately bought) which we have. Attach them as shown in figure 26 below.
Figure 26 Mounting GPS module and Compass to Flight controller
part 5) Adding Power Supply to Flight controller
Here in this step we will connect a power module with 6 pin wire to the power input slot of the flight controller. This will give power supply to flight controller
Note: Power module will give power supply to the flight controller only and not power the ESCs and servo motor. For that we have to use the XT60 connector to main frame input which we solder in step 2.
The connection for power module to power supply socket is shown in figure 27
Figure 27 mounting power module in power socket of flight controller
part 6) Adding Radio control to the Flight controller
Here in this section we will add radio control wires to the side of the controller as shown here in figure 28 and 29 In this tutorial we are using Graupner HOTT GR-16 2.4GHz.
Figure 28 Connecting radio control to RC port in flight controller
Figure 29 Radio control
part 7) Adding Telemetry radio to flight controller
Telemetry radio will be in pairs. So we have to take one of those radios and connect it to the location shown in figure 30. Telemetry radio will help to establish connection between the drone and our laptop program in flight mode. There will be 2 ports named TELEM 1 and TELEM 2. We will use TELEM 1 as it is the default one. There might be a chance that the TELEM 2 port is disabled and we have to manually set that while configuring the telemetry radios.
Figure 30 Telemetry radio to flight controller
part 8) Connecting ESCs to flight controller
For connecting ESCs to the flight controller we have to see the top side of the flight controller. There we will see different ports with numbers from 1 to 8 and few other ports. We will use the ports numbered from 1 to 6 outside the bordered ones. We will fix all the wires from our ESCs to the ports as shown in figure 31
Figure 31 Connecting ESCs to the flight controller
Finally the connection part of all the electronic devices to the flight controller is done.
The final result of the fully connected flight controller will look like figure 32.
Make sure that all the ports and wires are firmly connected and have a strong and proper connection.
Figure 32 Final look for the fully connected flight controller.
Step 8) Mounting drone body landing gear
Generally it is advised to add landing gear in the end because we may apply force to stick all units on the base frame while using double sided tape or zip ties.
Below given figure 33 and 34 shows an upside down view of how to add the landing gear to the drone base frame. Here also we will use M2.5 screw to fix the legs to the base.
Figure 33 Adding 4 landing gear to 6 base frame
Figure 34 Adding 6 landing gear to 6 base frame
Step 9) Cable management
Cable management is not the specific stage but a continuous process. Have a habit to group a particular set of wires to one side and another to the other side. This will help you to manage and check the connection at the very end when you try to figure out the errors while calibrating. Do not hesitate to use zip ties to group the wires. But make sure that wires don't get stretched too much that they may break. Fixing wire circularly around the flight controller and other electronics is the preferred way. You can see the grouping of wires and making a bundle of it and fixing it in between the radio and the flight controller using zip ties in figure 29.
Step 10) Securing Top board
Securing the top board is as important as securing the bottom board as it will hold the structure of the drone. Also it will give support to battery and GPS modules or If we attach any sensor or mini CPU on a drone like Jetson NX. It is preferred to do it at the very end. We will fix the upper frame board to the arms by using 4 M2.5 screws each. We will do it exactly as shown in figure 20.
Step 11) Mounting GPS module to the upper frame
We will use double sided tape to fix the base of the gps module to the top part of the frame. Make sure that the direction on the GPS module is exactly the same to the direction shown on the flight controller. Here we are using a 3D printed GPS mount for our drone but you can easily get the drone GPS with or without a stand so that you can fix it directly to the main frame. Mounting of the GPS holder to the top frame is shown in figure 35
Figure 35 Mounting GPS unit on top frame
This is the end of the assembly part.
If you have any problem or need more information about assembly units you can go through the following documents.
PixHawk 2.4.8 overview: https://ardupilot.org/copter/docs/common-pixhawk-overview.html
PixHawk wiring QuickStart: https://docs.px4.io/main/en/assembly/quick_start_pixhawk.html
Also you can refer to these youtube videos for better understanding
DJI F550 Flamewheel NAZA hexacopter ARF step by step complete build: https://youtu.be/r4M95kRo_AM
Building a drone & timelapse!! (DJI F550 Hexacopter Kit): https://youtu.be/O3JtRkbAEb4
Testing and Calibration
After having assembled your drone model, the next step comes to calibrating the flight controller and its attached modules. As mentioned above, Pixhawk 2.4.8 was used.
Calibration of sensors, and flight mode configuration can be performed through ground control software such as QGroundControl or Mission Planner. The software autopilot should be compatible with the hardware, there is a standard called Pixhawk that does that.
(installation guides provided in the supplementary section below).
Firmware setup
After having installed the ground control software, the appropriate firmware will have to be installed to the flight controller. This can be done by connecting the flight controller directly with a USB cable to the PC. You will be prompted with a connect option in the ground control software after connecting the cable. After connection in the PC is successful, navigate to Vehicle Setup, Firmware and select the Stable release of the firmware. Of course custom firware can be downloaded online and can be fitted through Advanced settings. The vehicle setup screen is shown below
Figure 36: Vehicle Setup in QGroundControl
A firmware setup video for Mission Planner can be found below
After firmware uploading is complete, navigate to airframe to pick the respective model you based and assembled your drone on. For the hexacopter, choose the airframe shown in Figure 14, Generic Hexarotor x geometrey, then click Apply and Restart.
Parameterization of the flight controller
Drone movement can be divided intro 4 types:
1- Throttle: controlling ascending or descending (altitude)
2- Pitch: controlling forward and backward movement (rotation upon Y cartesian coordinate)
3- Roll: controlling left and right movement (rotation upon X cartesian coordinate)
4- Yaw: controlling clockwise or anticlockwise orientation (rotation upon Z cartesian coordinate)
Figure 37: drone controls and their respective movements
source: https://www.translatorscafe.com/unit-converter/de-DE/calculator/multicopter-lipo-battery/
Before calibration, it is important to understand how flight control software manage the flight of a drone. An algorithm of PID (Proportional, Integral, Derivative closed loop feedback loop to control process variables, reads a process variable (PV), compares it to a desired set point (SP) value, and uses a continuous feedback loop to adjust the control output) reads data from sensors and intreprets commands, e.g. from radio to calculate how fast the motors should spin in order to push the aircraft into the desired rotational speed or direction. As such, many parameters are involved for the drone to stabilize itself. They can be viewed in QGroundControl or Mission Planner in their respective sections.
(More about PID can be viewed in the supplementary section)
For QGroundControl, navigate to Vehicle Setup and click the “parameters” section. You will find an extensive list of parameters. For example, control for drone movements (pitch, yaw, roll) can be examined here. It is important not change the paramters unless you are aware of what the result is and how it will affect the drone behavior, as it might lead to unwarranted or unexpected, sudden movements.
A reference list of paramters can be found here:
PX4: https://docs.px4.io/main/en/advanced_config/parameter_reference.html
Ardupilot: https://ardupilot.org/copter/docs/parameters.html
Calibrate radio and set flight modes
For manual drone control, a radio reciever, telemetry set and transmitter (controller) must be optimized.
The receiver should match the transceiver. To connect the transmitter, the GR-16 HOTT 2.4 GHz 8 channel receiver must be connected to the flight controller and detected in the Graupner transmitter. When the reciever does not detect a transmitter, a red light is shown. Hold the button on the reciever for a couple of seconds, then a notification should appear for transimtter, click on the set button, and the HoTT should appear in the transimtter screen as shown below. Succesful connection to a transmitter is announced by the flight controller via voice.
Figure 38: Graupner transmitter confirming reciever binding
You will then need to calibrate the radio such as below. Click on calibrate, and follow the instructions given on the screen.
Figure 39: Radio calibration in QGroundControl
A video for radio calibration in Mission Planner can be found below
After calibrating the radio, go to Flight Modes. Select the transmitter mode channel (e.g. channel 5). Select flight modes that you will operate with.
The most common and recommended are:
- Position mode: Shifting the roll, pitch, throttle sticks will move the drone in corresponding directions. If you center the sticks, the drone will level and hold itself to a fixed altitude and position against wind.
- Althold mode: The drone holds altitude and automatically levels the roll & pitch, altitude stabilization (centered sticks level vehicle and hold it to fixed altitude). The horizontal position of the vehicle can move due to wind (or pre-existing momentum).
- Stabilize mode: Centered sticks level the roll and pitch axes
- Loiter mode: Holds altitude and position, has more parameters than Position mode, and uses GPS for movements
- Brake mode: Immediately stops the drone
Try to make a logical and easy-to-configure choice of flight modes, as it will be necessary to remember how you mapped them later during flight. The current set flight mode appears on the main screen of the ground control software.
Note while configuring the remote to the Qgroundcontrol: while doing subtrim process and setting up flight mode DO NOT SET THE EMERGENCY STOP MODE ON, it will crash the drone.
If necessary, the gimbal sticks can be adjusted by accessing the back of the transmitter. Unscrew the back, remove the battery and you can view 5 componenets you can manually change:
- Pitch tension
- Yaw tension
- Roll tension
- Throttle friction
- Throttle ratchet (the clicks felt when shifting the stick)
calibrate sensors
For connecting drone controls to the PC, another antenna with usb can be used to do without a usb cable.
Navigate to the sensors section of the Vehicle Setup. Beginning with the Compass calibration, make sure before starting that all components of the drone are properly attached, if a usb cable is attached that it does not come short, and most importantly the battery is attached by adhesive (you should also properly position the battery so that it does not affect the centre of mass balance of the drone i.e. holding the drone from two opposite legs should not tip it over and cause if to fall, rather balance). Click OK. A visual guide is provided, so follow the pictures shown on the screen, pay attention to the orientation and movement in each step. Subsequently, reboot the vehicle after movement.
A video for compass calibration in Mission Planner can be found
Following that, calibrate the Accelerometer by also following the instructions on the screen provided, make sure aforementioned precautions are taken.
Next is the Gyroscope, where you will need to leave the drone still and click OK. After that, go to Level Horizon. You are only required to place the drone in its leveled flight position, not tilted on a surface, rather leveled. Click OK. Orientation does not have to be changed if the flight controller is facing forward with the colored legs of the drone.
Make sure the GPS module pointer is parallel to or facing the same direction as the flight controller pointer
Setup power and ESC calibration
Before setting up the power source, some considerations:
ESC Output capability: max 17.4 V
Check the specifications of the battery:
Figure 40: 4S LiPo 14.8 V 5 Ah battery
Considerations:
1- Battery voltages should not be higher than the maximum voltage that ESC can suffer. 17.4 V > 14.8 V
2- The power supply will have to deliver the combined current of all the ESCs (as they are connected in parallel). Continuous battery current output should be be bigger than the ESCs.
3- ESC voltage is decided by battery output, and motor voltage is descided by ESC. Therefore, total battery voltage must be less than maximum motor voltage.
4- Maximum voltage of ESC should not be higher than what the motor can withstand. Current in ESC is larger than motor.
5- The discharge current of battery should be bigger than ESC, otherwise ESC will not operate efficiently and heat will dissipiate, possibly raising battery temperature.
Navigate to the power section of Vehicle Setup. Choose the battery type (in this case LiPo), pick the amount of cells (4), input the voltage for each cell (3.7 V). Press calculate for the voltage divider, measure with a voltmeter from the battery monitor connected to the battery, then click on calculate. You now have the voltage divider set. To confirm, go back to the main screen of QGroundControl, hover over the battery. The battery status should show the tracked voltage similar to the one measured with a voltmeter. Next, calibrate the ESCs with the instructions shown. Do not start unless the propellers are removed.
Figure 41: Power setup and ESC calibration in QGroundControl
Additionally the battery can be charged with the charger as shown in the video:
Setup Motors
Make sure before starting motor calibration and testing that properellers are not screwed on to the motors! Once propellers are removed, flip the switch to allow motor testing. Adjust each individual slider to start the motor spinning. Make sure that motors are spinning in their correct direction. (See Figure 14) Neighbouring motors should spin in opposite directions. If one of the direction is false, you can simply change the 3 phase wiring of the motor. Switching any two wires of the motor will change direction
Safety warnings
Figure 42: Safety section in QGroundControl
In the safety section, you have the option to include extra measures, such as ground station failsafe to control drone behavior if it lost RC control or ground statio control, in addition to a GeoFence, where you can assign visual boundaries to a physical locations for the drone to not cross. Most importantly, make sure that none of the arming checks are disabled, so that drone the would be fully functional to operate safely
Make to check the Tuning section in Vehicle Setup to adjust flight characteristics! This is very important to test the sensitivity and response of the drone to transmitter commands
Figure 43: Tuning options
After the setup procedure has been completed, your drone should be ready to fly.
Head to the main screen, arm the drone and take off. Make sure the test flight is carried out in a field, be aware of the altitude limit in the area
Programming, Control and Drone Applications
Drones can be programmed through a software development kit (SDK) or application programming interface (API) in their packages. Most of the drones that are programmable already come with their own firmware. Specialized functions or applications can then be be developed with a programming language like Python, or the SDK if already provided.
Dronekit is an API that can be used to interface the drone by sending MAVlink commands to the drone. Dronekit comes readily equipped with intelligent flight path planning and other autonomous functions All complex tasks must be done from the source of a different framework, such as MAVSDK or ROS (robot operating system), which is a group of modular frameworks, wherein sensors publish data to subscribers. There is also ROS 2, but ROS and ROS 2 are different systems with the same concept. MavROS is a direct connection interface that pushes all the info from MAVlink into a ROS format. Drones have a the vast potential in remote sensing because of aerial photographic and surveillance capabilites, with algorithms from deep learning like classification, localization, object recognition etc.
However, there are some limitations that can hinder drones. First is the restriction on the weight and area available on the drone surface necessary to compute alogrithms with few hardware resources. If adequate processing power is needed, at most a battery with more cells i.e. bigger voltage and weight are also required. Additionally, for image processing, you cannot directly connect the camera to the flight controller, for that you need a companion computer. In addition, offboard mode needs to be enabled when you link to a raspberry pie or jetson, which limits drone movement and control.
A prominent example of object classification applications is the identification and distinction between dogs and wolves, this can be useful in, for example farms or ranches where cattle lives, where the operating drone spots an invading wolf and would enact a mission program to chase and scare it away. Another instance is the rescue of lost pets, or identification of drowning or endangered animals, to help rescue them. By programming in Python and applying convolutional neural networks, this can be setup with the following:
Data/Photos selection: a dataset of different dog and wolf breeds is assembled
Data augmentation: setting images to a certain resolution, generating tensor images
Preparing and testing the model: training convolutional models
Using Data with convolutional neural networks
Evaluation of results: based on classiication accuracy
For more details: https://www.kaggle.com/code/mohamedadel7774/cnn-for-dogs-and-wolves-with-accuracy-85#Import-Labraries
Another capability is the appliation of drones in agriculture and environmental monitoring, where drones equipped with cameras can enhance precision agriculture performance, using RGB sensing and vegetation indices interpretation to produce soil analysis figures, assisst in fertiliser and pesticide spraying and crop health monitoring.
source: https://www.mdpi.com/journal/remotesensing/special_issues/dronesagri
Conclusion
Going through this tutorial, you should have gained enough knowledge about certain components of drones, the step-by-step assembly of a DJI F550 Flamewheel hexacopter, ground control software, calibration of different parts of the drone, some safety precautions to stick to when working with drones, got to know briefly about the programming of drones and their promising potential in remote sensing applications such as for domestic animals, wildlife diffentiation, agricultural benefits and environmental monitoring
Supplementary
PID Control Theory
Figure 44: Map of control theory
Inverted Pendulum with PID
Optimal control of inverted pendulum system using PID controller, LQR and MPC
Stabilising an Inverted Pendulum Controller with PID controller
Control the Ryze Tello Drone from Python
- tello-pathon code by Harley Lara:
https://github.com/harleylara/tello-python
- RyzeTelloHSRW code by Ilgar Rasulov (EligoSoftware):
https://github.com/eligosoftware/ryzetellohsrw
useful resources
ardupilot: https://ardupilot.org/copter/index.html#
PX4: https://docs.px4.io/main/en/
QGroundControl: https://docs.qgroundcontrol.com/master/en/releases/daily_builds.html
Mission Planner: https://ardupilot.org/planner/docs/mission-planner-installation.html
Quadcopter construction guide: https://docs.px4.io/main/en/frames_multicopter/dji_f450_cuav_5plus.html
OpenDroneMap: https://opendronemap.org/
MAVlink: https://mavlink.io/en/
Dronekit: https://dronekit.io/
API: https://dronekit-python.readthedocs.io/en/latest/automodule.html
ROS: http://wiki.ros.org/Documentation
Jetson TX2: https://elinux.org/Jetson_TX2
ZED ROS wrapper: https://github.com/stereolabs/zed-ros-wrapper
Understanding 3-axis flight movement: https://emissarydrones.com/what-is-roll-pitch-and-yaw
IMU: https://www.ceva-dsp.com/ourblog/what-is-an-imu-sensor/
MAVROS: https://dev.px4.io/v1.11_noredirect/en/ros/mavros_installation.html
https://404warehouse.net/2015/12/20/autopilot-offboard-control-using-mavros-package-on-ros/
Companion computers: https://ardupilot.org/dev/docs/companion-computers.html#companion-computers
IntelRealSense camera: https://github.com/IntelRealSense/librealsense