The quadcopter is the useful tool to researchers in the field of flight control theory along with robotics and real-time systems. Quadcopters have applications in different areas like in surveillance, security and delivery systems also the search and rescue missions in cities but all of these are remotely controlled, highly expensive, have limited line of sight, no access to the places where humans can’t reach, limited range and the balancing or control is too hard for an inexperienced person.
Autonomous Quadcopter aims at replacing the Remote or manual control Quadcopters. My Project took an initiative for the monitoring of disasters place using Autonomous Quadcopter which had eliminated the need of human to take control of it and they will operate and balance themselves autonomously The Project proposed an ease to rescue and search operations, to military, marts and many more. Basically, it resolved all problems which one can face while using the remote control Quadcopter.
To meet the need of time the project is proposed a major modernism in which one would be able to give Autonomous Quadcopter a desired path on the google map, Quadcopter will follow that path autonomously as well as it will detect the hurdles and will change its path automatically to reach the destination safely. In the mountain areas, it also manages the altitude and provides us the required factors through live streaming on tablet or mobile phone.
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
Design and implementation of autonomous quadcopter converted
1. Final Year Project
Design and Implementation of Autonomous
Quadcopter
FYP Team
Mr. Soban Ahmed 14F8114
Ms. Zaeema Wajid 14F8357
Mr. Gulfam Asif 14F8389
Supervised by
Dr. Muhammad Gufran Khan
Co-Supervised by
Ms. Aroosa Umair
Department of Electrical Engineering
National University of Computer and Emerging Sciences
Chiniot Faisalabad, Pakistan
2018
2. i
Abstract
Autonomous Quadcopter aims at replacing the Remote or manual control Quadcopters. It is expected
to be applied massively in our daily lives applications soon. However the major issue of access to the
disaster or ruin places will be resolved by Autonomous Quadcopter. The Project is proposing an ease
to rescue and search operations, to military, marts and many more. It is eliminating the need of human
and providing the auto balance.
3. ii
Acknowledgement
We acknowledge with gratitude to our supervisor Dr. Muhammad Gufran Khan (Head of Department,
Electrical Engineering Department, FAST National University of Computer and Emerging Sciences)
for his continues guidance, genuine support and reassurance throughout the period of study.
Zaeema Wajid
Soban Ahmed
Gulfam Asif
BS (EE)
FAST-NUCES, CFD Campus
4. iii
Table of Contents
Chapter 1: Introduction to Project ......................................................................................................... 1
1.1 Problem Statement................................................................................................................. 1
1.2 Introduction and Background................................................................................................. 1
1.3 Project Vision.......................................................................................................................... 2
Chapter 2: Sensors Information.............................................................................................................. 3
2.1 Inertial Measurement Unit (IMU):.......................................................................................... 3
2.2 10 DOF IMU:............................................................................................................................ 3
2.3 Working of IMU ...................................................................................................................... 4
2.4 Global Positioning System (GPS):............................................................................................ 5
2.5 Accelerometer: ....................................................................................................................... 5
2.6 Working of accelerometer:..................................................................................................... 5
2.7 Gyroscope:.............................................................................................................................. 5
2.8 Working of Gyroscope ............................................................................................................ 6
2.9 Magnetometer:....................................................................................................................... 6
Chapter 3: Factors for Flight of Autonomous Quadcopter..................................................................... 7
3.1 Introduction of Tuned Radio Frequency (TRF): ...................................................................... 7
3.2 Working of TRF: ...................................................................................................................... 7
3.3 Introduction to PID for an Autonomous Quadcopter............................................................. 8
3.4 Mathematical Form ................................................................................................................ 8
3.5 Effect of Each Parameter........................................................................................................ 9
3.6 Tuning Parameters................................................................................................................10
3.7 Generating PWM output ......................................................................................................11
3.8 Pulse Width Modulation (PWM)...........................................................................................11
3.9 Electronic Speed Controllers (ESC) .......................................................................................11
Chapter 4: Components Information....................................................................................................12
4.1 Selection Criteria...................................................................................................................12
4.2 Weight Analysis to Choose Components..............................................................................13
5. iv
4.3 Motors ..................................................................................................................................13
4.4 Propellers..............................................................................................................................14
4.5 Battery ..................................................................................................................................14
4.6 Electronic Speed Control ESC................................................................................................15
4.7 Microcontroller.....................................................................................................................15
4.8 Inertial measurement Unit IMU ...........................................................................................15
4.9 RC controller .........................................................................................................................16
4.10 F450 Frame............................................................................................................................16
Chapter 5: Programming and Interfacing.............................................................................................17
5.1 Module of 10-DOF IMU Sensor.............................................................................................17
5.2 Interfacing with Arduino DUE...............................................................................................18
5.3 Dimensions of 10-Dof IMU ...................................................................................................18
5.4 Working of 10-Dof IMU.........................................................................................................19
5.5 Results of 10-Dof IMU...........................................................................................................19
5.6 Introduction to RC Controller ...............................................................................................19
5.7 Features of RC-Controller .....................................................................................................20
5.8 Basic Programming Functions...............................................................................................20
5.9 Interfacing of Arduino DUE with RC-Controller....................................................................20
5.10 Working of RC Controller.......................................................................................................21
5.11 Arduino Interrupt Working....................................................................................................21
5.12 Result of RC Controller ..........................................................................................................21
5.13 PID Algorithm Programming..................................................................................................22
Conclusion.............................................................................................................................................23
Appendix...............................................................................................................................................24
Flow Chart.............................................................................................................................................24
Budget...................................................................................................................................................25
References ............................................................................................................................................26
7. 1
Chapter 1: Introduction to Project
Summary
This chapter is delivering the Introduction of project which contains the Problem Statement,
Introduction and Background also clearly stating the Project Vision.
1.1 Problem Statement
As the rate of advancement in Technology is increasing day by day the artificial intelligence overcoming
the human need for work. We see that the Robots have replaced the humans. By observing this situation
and trend in market we have decided to work on Autonomous Quadcopter whose scope is beyond the
limits. Now a days Quadcopters are being used widely in different applications for example in
surveillance, by army for security, for delivery purpose also for search and rescue missions in cities but
all of these are remotely controlled and highly expensive. So there is a tremendous need of cost effective
Autonomous Quadcopter which can provide services at the places where human access is not possible
like disasters places. The invention in our project is that we are giving it a desired path which it follows
and give us the live video feed to detect any uncertain behaviour in that specific area. We are making it
cost effective other than the availed Quadcopters in the market and are giving the results according to
requirement.
1.2 Introduction and Background
We see dozens of problems revolving around us. As per concerned with the final year project (FYP) we
wanted to build a supportive robot for humans with the real life application. So we have started
exploring the requirements and the glitches of humans and by continuously observing we found that
there is a less access of human in disaster affected areas and we should do something innovative that
can make us have access to that ruin area and found out the parameters and constraints that may be in
concern of investigators. On the base of this we started finding the projects and we saw that we can do
this with a Quadcopter. When we dug into it we originate that the remote control Quadcopters are being
used for many purposes but we perceive that when we deal with remote control Quadcopters there are
several factors that are not manageable. Some of the major factors are balancing, limited line of sight
and range. Furthermore reaching disasters places for just a survey is costly because if there are
mountains either hikers are needed or a helicopter, reaching sights by hiking is risky while with
helicopter is expensive moreover our country faces major flood problems every year therefore to survey
several areas makes it more expenses. To cop up with this balancing problem in Quadcopter and non-
reachable problems we have shifted our interest towards the Autonomous Quadcopters as they can
8. 2
control themselves autonomously and have less possibility of errors regarding flight control, balancing
issues and are cheaper solution.
So our Project is taking an initiative for the monitoring of disasters place using Autonomous Quadcopter
which will eliminate the need of human to take control of it and they will operate and balance
themselves autonomously. The major modernism is that we will be able to give Autonomous
Quadcopter a desired path, Quadcopter will follow that desired path autonomously as well as it will
detect the hurdles and will change its path automatically to reach the destination safely. In the mountain
areas it will also manage the altitude and provide us the required factors through live streaming.
1.3 Project Vision
• Designing a Quadcopter with efficient stability algorithm.
• Making that Quadcopter autonomous.
• Quadcopter will avoid obstacles automatically.
• It will follow the path given by the user.
• Path will be given using an android app and google maps.
• User will define the targets and Quadcopter will record the video and will come back to the
initial path by following the google map.
• If during the flight the power is low then there will be a backup interrupt program which will
run and Quadcopter will come back to its control centre without completing its task.
• User will have live video streaming and will be able to record the video and capture photos.
• Operator can control the Quadcopter through RC controller
9. 3
Chapter 2: Sensors Information
Summary
This chapter is giving the information of all sensors including IMU, Gyroscope, Accelerometer and
their working, GPS and Magnetomerter that are used in making Autonomous Quadcopter.
2.1 Inertial Measurement Unit (IMU):
It is a combination of:
1. Accelerometers
2. Gyroscopes
3. Magnetometer
It is basically an electronic component that deals with the force on a body, angular rate that at which
rate it is changing its position, and magnetic field for hurdles detection application. IMUs are used for
unmanned aerial vehicles. Recently they have made progress and made IMU-enabled GPS devices. In
unreachable places when interference is there, an IMU allows a GPS receiver to work. We are using
10DOF IMU module.
2.2 10 DOF IMU:
The IMU 10DOF is gesture tracing device. It the combination of 3 sensors MPU6050,HMC5883L and
BMP085.The sensor MPU6050 is 6-axis gesture tracing device, it is a combination of 3-axis gyroscope,
3-axis accelerometer, and a digital motion processor(DMP).The HMC5883L is 3-axis digital scope.
The BMP085 is a highly precise chip. It depicts the pressure and temperature. Because of the small
dimension it is suitable to control most of the systems.
There are some specifications of 10DOF IMU:
10. 4
2.3 Working of IMU
IMU sensor give 5 output elements which we considering for operations.
1. Pitch deals with the forward and backward movement of quadcopter. Positive value of pitch
move the quadcopter forward and Negative value of pitch move the quadcopter backwards.
2. Throttle deals with the vertical motions of a drone. Positive value move the quadcopter high
and Negative value move the quadcopter low.
3. Yaw deals with the rotation of quadcopter. Positive value move the quadcopter to the right
side and Negative value move the quadcopter to the left.
4. Roll deals with the side to side motion. Positive value move the quadcopter to right and
Negative value move the quadcopter to the left.
5. Temperature
Figure 2.1 Movements of Quadcopter [3]
11. 5
2.4 Global Positioning System (GPS):
The Global Positioning System (GPS), is a space centred radio navigation system and initially known
as Navistar GPS. This system provides the geological location also gives time information to GPS
receiver.
The Data transmission doesn’t require any operator, and its operation is independent of internet
connectivity. The GPS system is used in many applications because it provides positioning system for
military applications as well as to commercial applications.
2.5 Accelerometer:
An accelerometer is the measuring device of acceleration. It has many applications in industry. The
several applications are related to sensitivity of accelerometers that are used in aircraft and missiles. We
use accelerometer to observer vibratory motion in rotary machines. They are also have applications in
tablets, computers and digital cameras. Accelerometers plays an essential role in quadcopters for flight
stabilisation. Some of the accelerometers are used monitor magnitude and direction.
2.6 Working of accelerometer:
Accelerometer deals with two measurement.
Acceleration Measurement:
The structure of accelerometer consist of a polysilicon springs they deflect when acceleration is
detected in any axis. The capacitance changes when the deflection occurs and its value is directly
proportional to the acceleration value.
Magnetic field Measurement:
Its structure is same as accelerometers, and it is fixed to coils. When the current passes through
the coils and the force produced due to magnetic field, in this case the deflection occurs. The
deflection voltage is directly proportional to the strength of magnetic field.
2.7 Gyroscope:
A gyroscope deals with the maintenance of orientation and velocity. It uses spinning wheel or disc and
free to move in any orientation.
Gyroscope used for navigation systems and have high precision and used to maintain direction.
12. 6
2.8 Working of Gyroscope
It is a triple-axis device containing 3 tuning fork fixed on a silicon wafer. These tuning forks
vibrate when subjected to an electrical signal. When tuning fork vibrate the deflection occurs and
this deflection is directly proportional to the speed of deflection.
2.9 Magnetometer:
A magnetometer is used to measure strength of magnetic field at a specific point and the direction of
magnetic field . Magnetometers also known as detectors because they can detect metals more
conveniently than metal detectors.
13. 7
Chapter 3: Factors for Flight of
Autonomous Quadcopter
Summary
This chapter consists of data for enabling the flight of autonomous quadcopter, Introduction to Tuned
Radio Frequency and its working, Introduction to PID algorithm for stability, its mathematical model
and the effecting parameters along with the tuning of them. Also the Introduction to PWM, its
Generation and information about ESCs.
Flight control includes:
Tuned Radio Frequency (TRF)
PID Algorithm for stability
RPM Control of Quadcopter
3.1 Introduction of Tuned Radio Frequency (TRF):
Tuned Radio Frequency is the combination of amplifier stages. Previously it could be hard to operate
because when we need any change, we have to tune in a station, each stage had to be handled separately,
after that all stages combine together, and work with a single switch.
3.2 Working of TRF:
The classic TRF receivers normally contained of three sections:
• Amplification of signals: This stage consist of RF amplifier stages to amplify the desired signal at
specific level. At the same time it rejects all other signals.
• Extraction of Audio signals: The stage at which we extract the audio signal from carrier signal.
• Addition of Audio Amplifiers: To increase the power of audio signal we mostly use audio
amplifiers.
We will get user defined or desired set point values for the main following elements
• Pitch
• Roll
• Yaw
• Altitude
14. 8
3.3 Introduction to PID for an Autonomous Quadcopter
Proportional-Integral-Derivative use to stabilize the flight. It basically get data from sensors, and
commands the speed of the motor. It is basically a closed-loop control system. The error value again
given to the input and try to get the resultant output close to the desired output.
PID controller consist of three controllers. In which P stands for proportional and it deals with the
current error, I stands for integrated it deals with the previous error. D stands for derivative, it deals
with the future error prediction.
We need three steps to have every type of control over a quadcopter flight:
• Measuring of Angular Rate: First we measure the speed of the quadcopter on every axis
• Estimation of Error: Find out the desired angular rate then estimate error
• Error Correction by PID: Apply PID to correct errors and feedback to the motors
3.4 Mathematical Form
PID parameters are actually numbers that we are dealing with. They are just the Kp, Ki, Kd coefficients
of 3 algorithms. A rotor can rotate in 3 axis Pitch, Roll and Yaw. We will have a separate set of PID
coefficients for each axis, in total 9 values we can tune.
The PID control scheme is named after its three correcting terms, whose sum constitutes the
manipulated variable (MV). The proportional, integral, and derivative terms are summed to calculate
Figure 3.1 PID Algorithm Diagram [4]
15. 9
the output of the PID controller. Defining as the controller output, the final form of the PID algorithm
is.
Kp is the proportional gain, a tuning parameter.
Ki is the integral gain, a tuning parameter.
Kd is the derivative gain, a tuning parameter.
e(t)=SP-PV(t) is the error where SP is the set point, and PV(t) is the process variable.
t is the time or instantaneous time (the present).
Figure 3.2 PID Flow Structure [5]
3.5 Effect of Each Parameter
Changing PID gain values have the following effect on a quadcopter’s behaviour:
P Controller:
Proportional controller gain is the essential gain value in PID, because quadcopter can fly and stabilize
with only P gain. The P gain coefficient depicts the strength of correction. There is a direct relation
between the coefficient value and the reaction of quadcopter to its angular change this means the
quadcopter’s sensitive and strength to response the angular change is directly proportional to the P gain
value. Lesser the value, harder it could be handled. On the same hand its drawback is, if P is much
higher than it is over-modifying and fluctuations.
16. 10
I Controller:
Integrated gain impacts the correctness of angular position. The increased value of I value it is
favourable for windy environment. With decreased value of me the quadcopter will not hold the angle
and simply drift away. For moderate atmosphere, I gain is not required. As in case of P gain there is
also the drawback of I gain when I value is much higher the quadcopter’s reaction to changes become
slower, it also a decrease the effect of P gain and can even oscillate on low frequency.
D Controller:
D gain basically overcome the errors produce by P gain when it is too high. It reduces oscillations and
smoother the flight of quadcopter. Much higher value of D causes the vibrations, overheating of motor
and delay in responding to change.
Table 1 Effect of Each Parameter independently
3.6 Tuning Parameters
There are 3 Tuning Parameters Kp which we get from P controller Ki which we get from I controller &
Kd which we get from D controller. Adjustment of these values will change the output or responses
which will be Fast or Slow and God or awful. These responses can be attained depending on the values
of Kp, Ki, and Kd.
Every application have its own PID gains. The values that work for one application may not work for
another. With every new application one needs to set the values of Kp, Ki and Kd according to get the
value near to set point.
As there will be 4 elements one from sensors (actual) and second from users (desired)
so we have to design 3 PID controllers for each axis. PID controller will compute the error and then
will do some changes to provide the final value
As there will be 3 PID controller there will be 4 outputs as follow
1 Roll output
2 Pitch output
3 Heading (Yaw) output
17. 11
4 Altitude output (More common name Throttle means up or down movement)
rE = Sensor Inputs – User or Receiver input
rE will be the error between sensor and receiver input and PID will be removing that error to achieve
the desired results.
3.7 Generating PWM output
After getting output from PID controller, we will have to send PWM output to the motors by using
Electronic Speed Controllers (ESCs) of 30A rating.
3.8 Pulse Width Modulation (PWM)
It is term used to describe a kind of digital signal. PWM has many applications like sophisticated control
circuitry. The most common application is to control the direction of a servo motor. We get ranges of
multiple results by changing the on and off time of signal.
3.9 Electronic Speed Controllers (ESC)
ESC an electronic circuit used to change the speed and direction of an electric motor and also provide
the dynamic brake. ESCs are often used on electrically powered models.
18. 12
Chapter 4: Components Information
Summary
This chapter contains information about the selection method of components, the weight analysis of
Autonomous quadcopter by considering all the components weight which it contains. Also this Chapter
is delivering the knowledge and information of all the components like Motors, Propellers, ESCs,
Arduino DUE, Lipo battery, 10-DOF IMU Sensor, Microcontroller, RC controller and 10 F450 Frame.
4.1 Selection Criteria
• Required Thrust
• Flight time
• stability
• Future Modifications (Open Source)
These are the main requirement of autonomous quadcopter. As it will be flying in the air with some
weight, its motor must be enough powerful to lift the weight up in the air. Moreover to hover in the air
for a long time a powerful battery is required to keep the Quadcopter hover for a longer duration
furthermore to run the motors, ESCs are selected according to the current rating of motors. For Stability
multiple sensors will be working together such as IMU and Ultra sonic sensors, they will be keeping
the quadcopter stable and robust. For manual control RC controller is selected. Special frame is selected
to according to the total weight and strength. Finally the Heart and brain of quadcopter is selected to
which is Arduino due for its fast processing power. Brief description about selection criteria is as follow
To choose components weight analysis was important. After reviewing some literature we have done
weight analysis and with some calculations, some specific components are selected.
19. 13
4.2 Weight Analysis to Choose Components
Table 2 Weight Analysis
𝑇𝑜𝑡𝑎𝑙 𝑊𝑒𝑖𝑔ℎ𝑡 = 1600 𝑔𝑟𝑎𝑚𝑠 .
𝐴𝑠𝑠𝑢𝑚𝑝𝑡𝑖𝑜𝑛: 1600 × 2.5 = 4000 𝑔𝑟𝑎𝑚𝑠.
So the overall required thrust is 4000g. For this purpose we will have to find motors having almost
1000g thrust each.
4.3 Motors
After complete weight analysis BLDC motors are selected which are capable of generating 1100g thrust
each by using 14.5 amps and 11.1 volts with the rpm of 1400kv.
Figure 4.1 BLDC Motors [6]
20. 14
4.4 Propellers
So to achieve the required thrust of 1100g on each motor recommended propellers by the manufacturer
are selected which will generate the required thrust.
Figure 4.2 Propellers
4.5 Battery
To achieve a longer flight time a powerful battery is required.
Since Motors and other electronic components will draw up to 60 amps of current, we have to go
through following key designing process for battery.
Some of the important assumptions are that a battery must be able to provide 25% of its maximum
deliverable current. Secondly 80% rule is also to check the safe region.
Now if we select 6000mah battery with 50C capacity of charge. We get
6000𝑚𝑎ℎ 𝑥 50𝐶 = 300𝐴 Maximum current discharge by a battery so 25% 𝑜𝑓 300𝐴 𝑖𝑠 75𝐴.
Secondly 80% rule is 6000𝑚𝑎ℎ 𝑥 .8 = 4800𝑚𝑎ℎ. Now 4800𝑚𝑎ℎ 𝑥 50𝐶 = 240𝐴 and
25% 𝑜𝑓 240𝐴 = 60
We can see from the above analysis that our required max current is 60A and a battery with 6000mah
50C can serve well for this purpose. We have selected lipo battery 3S 50C 6000mah.
Figure 4.3 Lipo Battery [7]
21. 15
4.6 Electronic Speed Control ESC
Esc is selected according to the maximum current rating of our motor. Since selected BLDC motors can
draw up to 15 amps of current so we have chosen 30A esc to stay in a safe region since any abrupt
change can cause a severe damage to motors and esc
Figure 4.4 Esc 30A [8]
4.7 Microcontroller
We are using Arduino Due because its clock rate is 85 MHz which is good for our application. It is a
32 bit microcontroller having 54 digital and 6 Analogue pins.
Figure 4.5 Arduino Due [9]
4.8 Inertial measurement Unit IMU
We have selected 10 DOF IMU sensor which is capable of providing the complete orientation of
Quadcopter. Selected IMU is open source it contains all the important sensors i.e. gyro, accelerometer
etc. with good efficiency in a one package.
Figure 4.6 10DOF IMU Sensor [10]
22. 16
4.9 RC controller
We have selected a 10 channel RC controller to get number of communicating options which will help
us in controlling quadcopter more elegantly.
Figure 4.7 10Channel RC Controller [11]
4.10 F450 Frame
We have selected this frame as it comes with landing gear having a less weight with strong body.
Figure 4.8 F450 Frame [12]
23. 17
Chapter 5: Programming and
Interfacing
Summary
This chapter deals with the Programming and interfacing of 10-DOF IMU, Its working, dimensions and
results of programming. RC-Controller, Its working, basic programming functions, features, interfacing
with Arduino, Its interrupt working and results of programming as well as the PID programming
section.
Programming Part includes:
• 10-Dof IMU Sensor Programming and Interfacing.
• RC-Controller Programming and Interfacing.
• PID Controller Programming and Output
5.1 Module of 10-DOF IMU Sensor
This is a module which consist of five different sensors. The sensors integrated in 10DOF IMU are
given below:
Figure 5.1 10-DOF IMU Sensor [13]
24. 18
10DOF IMU gives the Pitch, Yaw, Roll and temperature. These all parameters are measured by above
mentioned sensors which are integrated on this. We can understand Pitch, Yaw, Roll by the following
diagram.
Figure 5.2 Motions Specified by 10-DOF IMU [14]
5.2 Interfacing with Arduino DUE
There are ten connection pins on IMU. We will be using only 4. Other 6 not useful for our purpose.
• VIN pin of IMU will be connected with 5v pin of Arduino DUE.
• GND pin of IMU will be connected with GND pin of Arduino DUE.
• SCL pin of IMU sensor in connected with SCL pin of Arduino DUE which is digital 21.
• SDA pin on IMU sensor is connected to the SDA pin on Arduino DUE which is digital 20.
We can also operate it with 3.3v pin of Arduino. By these 4 wires which we have connected, we will
be able to get data from any sensor integrated on the IMU.
5.3 Dimensions of 10-Dof IMU
Figure 5.3 Dimensions of 10-DOF IMU [15]
25. 19
5.4 Working of 10-Dof IMU
To get data form IMU, we will have to add some libraries in the Arduino IDE. These libraries will
provide some functions to read data form IMU and to use that data according to our application. Data
received form IMU is monitored and used by using different libraries and functions. We can change the
output received form sensors according to our requirement.
5.5 Results of 10-Dof IMU
5.6 Introduction to RC Controller
The frequency range of FS-i6X is 2.405 to 2.475GHz at which it operates. This band has 142
independent channels, every radio system uses 16 different channels and 160 different types of hopping
algorithm. To increase the safety and avoid picking other transmitter signal every transmitter has a
unique ID.
26. 20
5.7 Features of RC-Controller
Table 3 Features
5.8 Basic Programming Functions
Table 4 Functions
5.9 Interfacing of Arduino DUE with RC-Controller
The RC-Controller is connected to Arduino through 2.4GHz 10 Channels Receiver Model FS-IA10B.
Connection with Arduino Due are as follow
1. Receiver has 3 Set of pins having 10 Channels. Each Set of pin consists of 1 positive, 1 negative
and 1 Signal pin.
2. Arduino provides the Input voltages to receiver.
3. Receiver’s Signal pins are connected with Arduino so it can receive RC-Controller’s Data
4. Currently 4 Channels are required as per se. Which will be representing Roll, Pitch, Yaw and
Throttle PWM values respectively.
27. 21
5.10 Working of RC Controller
There are two ways we can operate our RC-Controller,
• Polling
• Interrupts
The biggest drawback we face while using polling method is it slows the processor. Because in the
polling processor goes to every pin and ask if they have something to send. So to overcome this problem
we are using Interrupts, in which processor will be running the normal programs but only go to other
pins if they send an interrupt signal. Which improves the performance of the Arduino.
5.11 Arduino Interrupt Working
To enable interrupts in Arduino pins we have to use the following function attachInterrupt
(digitalPinToInterrupt (pinNumber), ISR_func, CHANGE);
This enables the interrupt on the specified pin and calls the specified ISR function whenever it detects
a change.
Since RC-Controller is sending PWM signal to measure the signal we following these steps
• Start timer whenever interrupt occurs and store it in a variable.
• When another change occurs start the timer again and save it in another variable.
• PWM signal will be the difference between two times.
5.12 Result of RC Controller
• If stick of controller is in central position it means it is sending 1500us Pulse
• If stick of controller is in uppermost position it means it is sending 2000us Pulse
• If stick of controller is in lowest position it means it is sending 1000us Pulse
28. 22
5.13 PID Algorithm Programming
Now we have 2 set of signals one can be named as desired input (set point) from RC-Controller and the
other as actual input from the sensors. By using these inputs an Error Signal can be generated which
PID controller will try to minimize or remove. PID Controller will try to achieve the desired results by
removing the error between desired and actual inputs. For this purpose we are using PID Controller
algorithm
PID controller will be designed for roll, pitch and yaw. The output will be converted into PWM signal
by manipulating the 3 different outputs.
29. 23
Conclusion
By exploring the need of the time we ended up working on autonomous quadcopter who follows the
path automatically using GPS technology and eliminates the need of human to take control over flight
of quadcopter. We have implemented its autonomous control, as well as manual control by RF controller
for backup, in case of any failure of communication between sensors data. For the stability of
quadcopter, we used PID algorithm. At first, we read the data from sensors accelerometer, gyroscope,
and barometer and use this data to obtain the orientation of the quadcopter as pitch, roll, and yaw. We
completed the program of PID algorithm for pitch, roll, and yaw axis. We used hit and trial method to
set the values of P, I and D gains. The quadcopter's PID Algorithm responded correctly in non-real time
scenario. Further, we implemented in real time scenario, by using hardware but it didn’t respond as we
had expected and wanted. By manual tuning of P, I and D gains we tried to stabilize the flight but it led
us to oscillations and instability in quadcopter’s flight. In addition to this, we also implemented the
obstacle avoidance algorithm for quadcopter to detect hurdles and change its position by left logic. For
the autonomous part, we got the location from the GPS module and implemented waypoint algorithm
to predict the path by joining the GPS coordinates to detect where to go or what is the destination. We
have completed the path prediction part using GPS and obstacle avoidance algorithm. Currently, we are
working on the stability of quadcopter by doing manual tuning of PID controller gains.