Você está na página 1de 34

German-Jordanian University

www.facebook.com/ELECTRONICS.LOVERZ

Search-And-Rescue Remote Sensing Quadrotor UAV

Project Entry Documentation For National Technology Parade 2010

By

Abdallah Zaid Al Kilani & Saifallah Qasim

www.facebook.com/ELECTRONICS.LOVERZ

Acknowledgment

We would like to express our deepest gratitude to our advisor Dr. Mohammad Nazzal for his continuous, unmatched support both mentally and financially. His advices and encouraging words kept our momentum going and our hope as strong as it could. We are also honored that he has been indeed our brother before anything else, and for that we can't be thankful enough. We would also like to acknowledge the efforts of our Co-advisor Dr. Nathir Rawashdeh. His dedication and sincere guidance to the project have been without a doubt a strong motivation for us to strive to achieve success. His contribution shall always be remembered and for that we are grateful.

www.facebook.com/ELECTRONICS.LOVERZ

Abstract
An unmanned aerial vehicle (UAV) is an aircraft capable of flying without a pilot or crew on-board. UAV's can be piloted remotely via a remote-control (RC), though controlling the aircraft autonomously or semi-autonomously is constantly noted. This can be achieved through a pre-programmed flight which mainly depends on the global positioning system (GPS) or could be achieved by an ultrasonic sensor. Military applications benefited, still benefiting, the most since UAV's come in different sizes and shapes, but UAV's can also be used in other variety of applications such as aerial photography, scientific exploration, and small-sized items transportation. A Quadrotor, is a unique kind of UAV's that uses four-fixed rotors, with two rotors per axis (each axis is orthogonally aligned with the other) powered by four motors to lift and propel the aircraft. The scheme of controlling a Quadrotor is done by varying the speed of the motors relative to each other, also the dynamics of the Quadrotor demand constant adjustment of the motors simultaneously. To allow a balanced flight, an advanced control system must be integrated, and so an on-board controller (brain) is required to implement the control algorithm and to be able to receive (for example from the pilot) and send (for example command the motors) instructions. In this project a Quadrotor is built from scratch using commercial components. The Quadrotor is able to Vertical Take-off and Landing (VTOL), and hover, it's also suitable for both indoor and outdoor flying. A microcontroller unit (MCU) is used to control the aircraft, with an appropriate control loop that is incorporated with the integration of two sensors; a gyroscope and an accelerometer to provide stability with minimal drift. A Quadrotor has several advantages over other UAV's types such as; its maneuverability which makes it agile and fast. Also its functionality and controllability in low-speeds in small and narrow areas like caves and rooms. Also the fact that it is less dangerous for humans, as protective frames can be added to cover the exposed propellers. Lastly since the components used are electrical, explosions and firerelated risks are eliminated. Quadrotors have variety of applications including; search & rescue, small packages and items transportation, aerial photography, and scientific exploration.

www.facebook.com/ELECTRONICS.LOVERZ

TABLE OF CONTENTS
Chapter I. Page

INTRODUCTION.................................................................................6
1.1 1.2 1.3 1.4 1.5 Overview............................................................................................6 Scope..................................................................................................6 Applications........................................................................................7 Current Aims & Objectives................................................................8 Outline................................................................................................8

II.

LITERATURE REVIEW OF UAV QUADROTOR...........................9


2.1 2.2 2.3 Quadrotor...........................................................................................9 Background.......................................................................................10 Main Components Review................................................................12
2.3.1 Control Board...........................................................................................12 2.3.2 Brushless DC Motor.................................................................................12 2.3.3 Electronic Speed Controller (ESC)..........................................................13 2.3.4 Gyroscope (Gyro Sensor).........................................................................13 2.3.5 Accelerometer..........................................................................................13

III. HARDWARE CHARACTERISTICS & SOFTWARE DESIGN...14


3.1 3.2 Block Diagram.................................................................................14 Mechanical Components Characteristics.........................................14
3.2.1 Frame Characteristics..............................................................................15 3.2.2 Propellers Characteristics........................................................................16

3.3

Electrical & Electronic Characteristics............................................16


3.3.1 Actuators Characteristics........................................................................17 3

3.3.1.1 3.3.1.2

Motors Characteristics.............................................................17 Electronic Speed Controller (ESC) Characteristics.................17

3.3.2 Sensors Characteristics............................................................................18 3.3.2.1 3.3.2.2 Gyroscopes Characteristics......................................................18 Accelerometer Characteristics.................................................18

3.3.3 Transmitter & Receiver Characteristics...................................................18 3.3.4 Microcontroller Unit (MCU) Characteristics...........................................19 3.3.5 Battery Characteristics.............................................................................20

3.4

Software & Control Design..............................................................20

IV. SELECTED COMPONENTS SPECIFICATIONS.........................21


4.1 Selected Mechanical Components..................................................21
4.1.1 Selected Frame......................................................................................21 4.1.2 Selected Propellers................................................................................21

4.2

Selected Electrical & Electronic Component.................................21


4.2.1 Selected Actuators.................................................................................22 4.2.1.1 4.2.1.2 Selected Motors.....................................................................22 Selected Electronic Speed Controller (ESC).........................22

4.2.2 Selected Sensors....................................................................................23 4.2.3 Selected Transmitter..............................................................................24 4.2.4 Selected Receiver..................................................................................24 4.2.5 Selected Microcontroller Unit (MCU)..............................................25 4.2.6 Selected Battery.....................................................................................27

V.

IMPLEMENTATION & RESULTS.................................................28


5.1 5.2 5.3 Assembly........................................................................................28 Software & Control Algorithm......................................................30 Flight Tests & Results....................................................................31
4

5.4

Future Work & Development.........................................................32

References...........................................................................................33

Chapter 1
www.facebook.com/ELECTRONICS.LOVERZ
1.1 Overview
The popularity of UAV Quadrotors has been only among military applications till 1996. However, with the development of complex and capable electronics ranging from more powerful, light-weight microcontrollers to even smaller sensors with better accuracy and precision, it's possible to build Quadrotors with variety of sizes for different applications. Quadrotors particularly have been getting quite a lot of attention lately due to several reasons. One of these reasons is the fact that a Quadrotor is relatively easy to build and assemble, having less mechanical complexities than other aircraft such as helicopters, in most cases no gearing between the rotor and the motor is required. Another reason is the fact that the design of a Quadrotor is depending on four propellers instead of one big rotor, which is great due to the less kinetic energy generated, and so in a case of crash the damage would be less catastrophic and easier to fix and maintain. Also the relative small size of a Quadrotor, which could also be big in several applications, makes it suitable for surveillance and other tasks where small size is critical. The ability to control and hover a Quadrotor in low-speeds and its outstanding maneuverability makes it perform in an excellent manner in aerial photography, scientific exploration, and small-sized items transportation. Search & Rescue in places that are dangerous or unreachable for humans, Quadrotors can do the job in searching and stream live images of the scene. The most difficult part about a Quadrotor isn't lying in the building phase, but in the software/programming phase. The success of a Quadrotor depends mainly on how good the control algorithm is, the control loop should be able to compensate any errors during flight with the help of the sensory feedback. The compensation of error shouldn't be too aggressive, at the same time not painfully slow. It's crucial to reach the balance between these two, and reaching this state of balance isn't simple nor trivial by any means. Every millisecond in execution process counts and could be the deciding factor. Integrating a control theory (approach) in the code is essential to reach this state, with the Proportional-Integral-Derivative(PID) being most commonly used in such projects. Since the Quadrotor depends on analog sensors to act as the eyes, it's vital to have precise and accurate feedback from the gyroscope and the accelerometer. In most cases where analog sensors are integrated, the readings of such sensors are filled with noise. With Quadrotors in particular, it's quite important not to have blurry eyes, and so the noise must be filtered. Implementing a filter in the algorithm to accomplish such a job is also quite tricky. Despite the fact that Kalman filter is popular in such projects, another type has been integrated in the code, that is a complementary filter. This filter is suitable for the Quadrotor being not processor (microcontroller-wise) intensive and with the least amount of lag, which is also crucial in stability projects.

INTRODUCTION

1.2

Scope

In the Hashemite Kingdom of Jordan, where natural resources are scarce, accomplishing the Quadrotor project with the title Search & Rescue as its main theme is quite promising and unique. Deserts 6

www.facebook.com/ELECTRONICS.LOVERZ

dominating a large scale of the whole country, in addition to distant villages and territories inhabited by citizens are all motivating reasons to have such a project. In a case of emergency, the Quadrotor could be a great, fast, and economical solution, in which it would be sent to sweep the desired area and provide live and valid information about the situation. The Quadrotor could also provide emergency kits and drugs to those camping in the desert or exploring distant areas, when time is virtue and instant actions are needed. Having the Quadrotor as the "eyes in the sky" is the driving element in this project. Having mobile senses that could save others and eliminate certain dangers can be faster, safer and more efficient than moving a rescue crew themselves, and that is the utmost desire. Furthermore, the uniqueness of the Quadrotor to its core provide an interesting material subject for scientific publications and researches. It's also an initiative to do similar kind of projects for fellow students and enthusiasts.

1.3

Applications
Search & Rescue: In places that are dangerous or unreachable for normal humans, Quadrotors can do the job in searching and showing live images of the scene. With the addition of a GPS geotagging and navigation, exceptional results are expected. Commercial use: without the need to rent a helicopter for thousands of dollars, aerial photos and videos can be taken for many different needs; from cinematic, media and news coverage to photographing professionals and hobbyists whom like to capture great photos and videos from high altitudes. Transporting objects: A Quadrotor can easily transport small objects, which makes it a great tool for wide variety of needs, for example; transporting medical supplies in places where sudden catastrophes occur and rapid medical support is needed. Educational use: for a project to build or upgrade one, great amount of knowledge and benefits can be gained and the eager need to make it fly with great stability makes this project one of the most exciting ways to learn and understand the true meaning of engineering and how an engineer should think. RC hobbyists: it is considered one of the most amazing toys to be flown and enjoyed, with its great maneuverability and high speed. In countries like Germany and USA people are spending a lot of money to experience flying Quadrotors. About any sensor can be added to it: which makes the areas for it to be used simply diverse and variant; like adding a temperature sensor or gas sensor makes it a very efficient, fast and safe method for taking different measurements in places like chemical or nuclear reactors, where dangerous materials can be found and them being unsafe for humans to stay for long periods. 7

Areas where Quadrotors can be utilized and also their potential applications are summarized as follows:

1.4

Current Aims & Objectives

With the given time frame and some other limitations, it has been an important step to declare the base goals and aims in this project. These targets are summarized as following: Building a light-weight, yet sturdy Quadrotor that could take crashes with less damage with the help of custom-made protective edges and suitable landing gears. Building the base of a project that is surely to be upgraded and developed in all aspects. Achieving a stable flight in the present time.

All of the above targets have been achieved with flying colors.

1.5

Outline

The upcoming chapters is going to provide further details about the Quadrotor and how it has been accomplished. Chapter 2 will discuss some theoretical aspects concerning the Quadrotor, as well as the previous work that has been done related to it. Chapter 3 is all about covering the hardware characteristics and the software design, also presenting a block diagram of the Quadrotor and the architecture of its control algorithm illustrated in a flow chart. The selection of components used in the Quadrotor and also the reasons behind the decisions that have been made is explained in chapter 4. Finally in chapter 5, the implementation and integration of both the hardware and software is discussed, in addition to the achieved results and the future plans.

Chapter 2
LITERATURE REVIEW OF UAV QUADROTOR
2.1 Quadrotor
A Quadrotor is an aircraft that consists of four-fixed rotors placed at the ends of a cross-shaped frame. Figure 1 shows a schematic of a Quadrotor helping to understand how it works. Both rotor 1 and 3 (front and back) rotate clockwise (CW) producing a torque, while rotors 2 and 4 (right and left) rotate counter clockwise (CCW) producing an opposite torque resulting in a balanced torque across the aircraft. The four rotors would produce equal thrust when rotating in the same speed lifting the Quadrotor in the upward direction.

Figure 1. Schematic diagram of the four rotors on a Quadrotor [1].

For a better understanding of the dynamics scheme of controlling a Quadrotor, figure 2 shows the degrees of freedom associated with a Quadrotor. In order to control the pitch, the relative speed of the front and back rotors are changed, while maintaining the same thrust on the other rotors (right and left). In the same manner, the roll is controlled by changing the relative speed of the right and left rotors, while maintaining the same thrust on the other rotors (front and back). Finally the control of yaw, whether clockwise or counter clockwise, is achieved by varying the speed of the right and left rotors relative to the speed of the front and back rotors.

Figure 2. The three degrees of freedom [2].

2.2

Background

Attempts to build a Quadrotor go back to the early 1900's, it was more of an experimental rotary-wing plane but very similar to the concept of a Quadrotor. Such aircraft was built by the Breguet brothers and the assistance of a professor called Charles Richet, it flew for the first time in 1907. They called it the Breguet-Richet Gyroplane No.1, and there was only one pilot on-board. The frame (chassis) of this gyroplane at the center of it was a rectangular-shaped tubing steel to support the pilot and the engine (it was called a powerplant at that time), from that center four arms are projected, also made from steel, at their end were a 4-blade biplane rotor. Two sets of these rotors would rotate clockwise and the other two would rotate counter clockwise in order to generate a balanced torque around the frame making the aircraft vertically take off. The powerplant of the gyroplane was Antoinette piston engine rated at 40-hp and the weight of the aircraft was about 500 kg without the pilot. But their experimental aircraft didn't flew well and wasn't steerable nor controllable by any means. Figure 3 shows a photo of this aircraft.

Figure 3. Breguet-Richet Gyroplane No.1 [3].

A french scientist and an engineer called Etienne Oehmichen was more successful when he built the 10

Oehmichen No.2 in 1922. This aircraft was reliable and capable of lifting an individual person with ease. This aircraft possessed four rotors and eight auxiliary propellers (for a better directional control), powered by a 120-hp Le Rhone rotary engine. Figure 4 shows this amazing machine showing the main components. The frame of this aircraft is an x-shaped steel-tube with a 2-blade paddle-shaped rotors at the end of each arm. The eight auxiliary propellers were used for various directional tasks such as; one is mounted on the nose for steering, two are used to push the aircraft forward, and rest are mounted horizontally for stability purposes.

Figure 4. Oehmichen No.2 [3].

At the beginning of the 1980's, Quadrotors have been getting a lot of attention as alternatives for mini UAV applications, together with the introduction of smart electronics, more research and development have been conducted in that area. From www.draganfly.com, the Draganflyer X4 is an impressive commercial Quadrotor, yet also suitable for governmental and military usages. The frame is made from carbon fiber and so are the rotors. This Quadrotor weighs about 680 g and has a payload capacity of 250 g. The rotors are driven by brushless Direct Drive motors, with stall protection as a safety feature. The X4 is packed with a total of seven sensors; three gyroscopes, three accelerometers, and one barometric pressure sensor. The X4 has also an intuitive easy-to-use controller, with an OLED touch screen and simple interface, which makes the experience smooth and easy-to-grab for beginners. The mounting for the camera or any capturing device installed features an anti-vibration design, resulting in a clear, professional shoots and videos. A user-friendly software to show basic and advanced real-time information monitoring, including of course a live stream of the video being captured, is also available. Figure 5 shows the Draganflyer X4.

11

Figure 5. Draganflyer X4 [4].

The Quadrotor project was inspired by the two individuals from www.mikrokopter.de Holger Buss and Ingo Busker. These two initiated their own project in 2006 and never stopped since, building outstanding aerial platforms suitable for aerial photography, universities (for educational and scientific purposes), and also as a hobby for enthusiasts. Their latest aircraft is the Hexakopter featuring six rotors and a flight time up to 36 minutes with a small payload (capable of a maximum of 1 kg payload), it weighs about 1.2 kg without the camera. Figure 7 demonstrates the Hexakopter.

Figure 6. Hexakopter [5].

2.3

Main Components Review

In this section, a theoretical overview is provided for some of the components used in the Quadrotor. 2.3.1 Control Board A microcontroller unit (MCU) is a miniature computer system that is able to provide a variety of I/O ports, an exceptional processing power for its small size, and enough memory to program this small board to do various control tasks for several applications and projects. Also its portability, mobility, and light-weight makes it a great way to embed in the Quadrotor. 2.3.2 Brushless DC Motors To actuate the rotors in the Quadrotor, motors have to be selected carefully, since the actuators selection 12

plays a crucial role in the whole design process. Brushless DC motors (BLDC) outperform normal brushed motors in several aspects, which will be discussed later in the upcoming chapters. Though a simple differentiation between these two kinds is essential at this point; BLDC motors replace the conventional mechanical commutator and stator with an electronic commutation drive eliminating the brushes. To control the speed of the BLDC motor, an electronic speed control (ESC) is coupled with it, switching its coils on and off rapidly achieving various speeds. 2.3.3 Electronic Speed Controller (ESC) An electronic speed controller is an integrated circuit (IC) usually used to control the speed of electric motors. ESC's are typically used in applications and projects that involve radio-controlled equipments and components. They also provide a better accurate and precise control speed than the mechanical types of speed controllers. 2.3.4 Gyroscope (Gyro Sensor) A gyroscope is used to measure the angular orientation and speed of the aircraft, ships, vehicles, and others more. Integrating these sensors is commonly seen in the control systems for having a very quick response to an angular velocity which is very crucial for platforms that require immediate action to stay at level. 2.3.5 Accelerometer An accelerometer is a sensor used to measure the amount of the acceleration relative to the gravitational force. It's also used to correct the drift resulting from the gyroscope over time, and return the system to the horizontal level. Other used components will be discussed in the upcoming chapter such as; frame, propellers, transmitter, receiver, and battery used wires.

13

Chapter 3
HARDWARE CHARACTERISTICS & SOFTWARE DESIGN
3.1 Block Diagram
The best way to start the design phase is by drawing a block diagram, which does a great job explaining the whole system layout in short. The block diagram in figure 7 demonstrates the main components of the Quadrotor, in addition it also clarifies how each component is interfaced and coupled with the other parts.

Figure 7. System overview of the Quadrotor.

3.2

Mechanical Components Characteristics

In this section, the desired characteristics of the mechanical components will be discussed. Mainly what are the characteristics and features that have been considered while designing the Quadrotor. Of course also some technical aspects will be mentioned.

14

3.2.1 Frame Characteristics The most suitable way is to begin with is the skeleton of the Quadrotor, the frame. The frame is considered the largest (in volume) component used in the Quadrotor and a very important one. Choosing a frame to fulfill the required need is essential, critical, and also not simple. The frame should be light-weight yet strong to tolerate possible accidents and crashes, it has also to be thin.

Figure 8. Different frame types, from left to right respectively [6], [7], and [8]. Light: a feature that is quite important in aircraft and vehicles, and in Quadrotors it is no exception. Ultimately the goal is to reach the best possible flight time, and to do so the weight of the frame should be minimal. This also would assure a better stability and controllability of the Quadrotor. Strength: having a frame that is sturdy and strong is vital, as the Quadrotor could crash, or have an accident due to a wrong landing. Thin: it is quite critical to have a frame that is thin due to several issues; since the Quadrotor has four motors spinning at a very high speed, consequently during the flight those motors will eventually get very hot (depending on flight conditions). Hence, having a proper air flow is a must to cool down the inner components of the motors and prevent any damage due to overheating. Another upside of a thin frame is that the vertical air flow generated by the propellers won't be hindered by a wide frame, contributing in a better flight stability. Another issue that should be discussed about the frame, is its length. The focus in this case is the distance between the middle point of each opposite motor. It's preferred to cut down this distance as much as possible due to several reasons; it's a good way to make the power needed from each motor to stabilize and/or fly the Quadrotor around. Another good side is that it would enhance the controllability, maneuverability, and also contribute in reducing the overall frame weight. Now since the design of the Quadrotor would be an x-shaped, at the center of the shape should exist a plate (bed) where the on-board controller would rest on it and then covered to ensure protection of anything resting there, from cables to the controller itself. This plate should also be sturdy and at the same time light-weight. To ensure safety and avoid severe damage of the Quadrotor, it has been a priority to also design some safety features. First off a proper landing gear is important to be installed. In case of a faulty landing or an error during flight time, the landing gear should be able, or at least, minimize the damage and impact on the whole Quadrotor. A flexible landing gear would be a good way to assure this. 15

Next is the fact that the exposed propellers are absolutely dangerous for the Quadrotor itself and the humans around it. Those propellers are, as said before, spinning at very high speeds during flight and would certainly and seriously hurt someone badly if something went wrong. The damage could affect the Quadrotor itself, say the Quadrotor hit a wall, an object, or an obstacle, the propellers would break and be shattered. The motors could take damage and become unusable. Plus also the shattered pieces could hurt anyone around them. Such reasons are quite persuasive to consider designing protection around the propellers, at least during flight time and the testing phase. And could be removed when the Quadrotor is ready and reliable. 3.2.2 Propellers Characteristics The mechanical lifting element of the Quadrotor are the propellers. They do come in different sizes, shapes, and materials; which makes the decision somehow flexible in choosing one. High quality propellers are made by different manufacturers to deliver great performance of lifting power at a very small weight; to minimize the torque needed for spinning them by the motor's rotor. As mentioned propellers are manufactured from a variety of materials such as; plastic, which is cheap, available, and light, but is by nature fragile meaning it could be damaged or broken easily. Wood is another example, it is tough and mid-priced but is certainly heavier than plastic. Lastly is the carbon fiber which is tough and light-weight but more expensive than the previous two types.

Figure 9. Various choices of propellers, from left to right respectively [9], [10], and [11]

Choosing a suitable size is quite crucial in the design of the Quadrotor, since it affects the power consumption, the overall weight, and how sturdy and reliable (stable-wise) the Quadrotor is. Increasing the size of the propellers means higher thrust delivered, but that comes at the cost of more torque required to spin them by the motors. Having that in mind, the criterion for choosing the propellers is mainly dependent on the model that is being built and its overall weight. As the goal states, the Quadrotor should be about 1.4 kg and propellers with the size 12 inches are appropriate. Importantly is the fact that four propellers are needed, but with a pair being oriented for clockwise (CW) direction and the other pair for the the counter-clockwise (CCW) direction.

3.3

Electrical & Electronic Characteristics

The design of electrical and electronic components is absolutely an exhausting phase, picking components and parts that will cooperate and be interfaced together to make the Quadrotor successful was filled with hardships. As each of these components would be synchronized and affected by the 16

others, in addition to the fact that each component is a main player in the design process, care and precision are a must. In this section a thorough discussion about this phase will be mentioned. 3.3.1 Actuators Characteristics 3.3.1.1 Motors Characteristics The motors are no doubt one of the most important elements in the Quadrotor, they are the muscles of it. With that in mind it's quite important to choose the right motors to do the job, as the impact of those is huge on how satisfying and good the final outcome is. Brushless DC (BLDC) motors have several advantages over brushed motors and are a superior choice; due to the lack of mechanical parts and the absence of brushes, as mentioned before, the BLDC motors are more efficient (converting electrical to mechanical energy) than brushed DC motors since there are no friction losses due to the brushes. The BLDC motors are also less subjected to service and maintenance, again because of no friction, the mechanical wear is eliminated which guarantees a longer life-time and better reliability. Less noise generated when operating and since the motor would be covered in a housing, any cooling issues are almost solved. A BLDC motor's only disadvantage is its high cost in comparison with a brushed DC motor, as it would require a sophisticated electronic speed controller (ESC) to run it and control its speed. Also the manufacturing of a BLDC motor isn't as simple as the brushed DC motor. On the long run though, the cost of a BLDC is theoretically lower keeping in mind that it has a longer life-time than a brushed one which would compensate its higher cost. For the Quadrotor, choosing a BLDC motor is definitely a righteous call, but that's not everything. Since the Quadrotor is a remote-controlled (RC) propelled aircraft project, a specific type of a BLDC motor called outrunner (the outer shell spins around the windings) is very suitable to operate the Quadrotor with ease due to several factors; despite the fact that this type is slower than inrunners BLDC motors (the rotational core is housed in the motor's can) but that means that the torque produced is much higher, this exactly is the selling point why outrunners are a perfect choice to run the propellers. It's also quite efficient from a weight point of view, because there is no need for a gearbox, ridding the Quadrotor from it's complexity, noise, inefficiency, and extra weight.

Figure 10. A Brushless DC outrunner motor [12].

3.3.1.2 Electronic Speed Controller (ESC) Characteristics ECS's are required to run the BLDC motors in the Quadrotor. The ESC is a standalone chip that's connected to the receiver's control channels and then coupled with the BLDC motor. 17

For a better understanding of the ESC, it's more conventional to consider it as a pulse-width modulation (PWM) controller for the BLDC motors. PWM in short is a great way of controlling some modern electronics such as a BLDC motor, a fast variation between the motor being fully off and fully on powered, more conveniently described as a percentage called the duty cycle. Controlling the duty cycle means controlling the speed of the BLDC motor without any losses and also without affecting the load. 3.3.2 Sensors Characteristics 3.3.2.1 Gyroscope Characteristics At the beginning of the project, the aim was to achieve a self-stabilized Quadrotor, in order to achieve that there has to be a kind of feedback, that tells the microcontroller that the Quadrotor is tilting or leaning. This special feedback is achieved through a gyroscope. A gyroscope is a sensor that measures the angular rate or velocity (speed of rotation). When rotating it also gives a positive or negative readings, and while stationary gives a constant value. Choosing an appropriate gyroscope is dependent on a number of factors; the gyroscope should be fast and responsive, in other words it should be able to detect minimal changes in the angular velocity in order to compensate the errors faster which would guarantee the prevention of the accumulation of errors. It should also be small, and light-weight, usually Micro Electro-Mechanical Systems (MEMS) manufactured sensors do a great job featuring these two aspects. And because of the existence of noise, a built-in filter is also a plus, in addition to a conditioning circuit embedded on the chip that would help a lot in cutting extra parts and complexities. Since the Quadrotor is governed by three degrees of freedom (pitch, roll, and yaw), a 3-axis gyroscope is needed. 3.3.2.2 Accelerometer Characteristics An accelerometer is a sensor capable of measuring the amount of acceleration, also could measure the tilt. Implementing the accelerometer and the 3-axis gyroscope together on a single chip yield the inertial measurement unit (IMU). This unit utilizes both sensors to do an outstanding job in keeping the Quadrotor as much stable and level as possible, plus having two sensors on one chip reduces any extra space needed. Knowing that the implementation (from a code point of view) isn't anything but hard and complex, nevertheless utilizing some of the true potential of the accelerometer would affect the final outcome and results. A 3-axis accelerometer would seem to do that job. 3.3.3 Transmitter & Receiver Characteristics For the pilot to command the Quadrotor from the ground, a transmitter or a remote-control (RC) is needed. This should have a good range and both a pre-programmed and user-programmed channel mixing for a better flexibility and usage. The number of channels is also an aspect that should not be left out, having a proper amount of channels is always a plus, as it would greatly enhance the features and tweaks that could be utilized and later on added to the Quadrotor. The receiver, which is used to get the commands sent from the transmitter by the pilot, would be directly coupled with the microcontroller through the PWM I/O pins. Having a receiver with auto 18

channel and frequency selection seems suitable, offering a user-friendly solution. 3.3.4 Microcontroller Unit (MCU) Characteristics The on-board controller is without a doubt a vital component in the Quadrotor. The fact that the onboard controller will be the one responsible for dispatching a variety of instructions to the other components, yet also receive certain commands from the pilot and the feedback coming from the sensors. A proper microcontroller would accomplish such tasks if properly selected. Definitely a microcontroller is the way to go, because of its capabilities despite its wight and size. With that in mind, the selection of a proper microcontroller is critical and should be based on a specific criteria, summarized as follows: Speed of operation; in other words how fast and agile is the processing power? Having a suitable computational power in the Quadrotor is a must, because during flight time, the controller should be very responsive and quick to guarantee a stable and a well-behaving flight. Cost; both the hardware and the software to run it. Sometimes the cost of these could and will eventually mean the need to compromise. Power needed to run it; yet another reason to maximize the flight time, the power consumption of the controller should be as minimal as possible. Data storage; i.e. memory. The controller should provide enough memory to handle the program and code embedded. A project could fail because of the lack of memory. Number of I/O ports; when designing the system, one should possess the knowledge of how many inputs and outputs are needed. Selecting a controller that shorts in input or output ports could cause unneeded troubles. Analog capabilities; some controllers lack these such as; ADC, DAC, or a comparator. In such case this would require to have extra few components and undesired clutter. Serial communication; which communication protocol is used to interface the microcontroller? USB would be a great solution, since it's an industry standard and readily available. Development tools; extra tools and programs that might be needed to fully utilize the microcontroller. Again it could be a cost point of view, or its availability. Environmental conditions; Where would it be mounted? Temperature and humidity issues should also be considered.

With the help of these guidelines, the selection of the microcontroller is clearer and more convenient. Importantly in the case of the Quadrotor that the microcontroller selected should be powerful, lightweight, easy to interface with a computer and prototype which, has enough I/O ports, and easy on the pocket. 19

3.3.5 Battery Characteristics Having four motors in a Quadrotor that produce high thrust power, that means high current consumption is required. So a battery with high current capacity and discharging rate is needed. Such batteries are available in the market but with much larger scale and weight than normal batteries, and minimizing the weight of components on a Quadrotor is a very crucial matter to consider so that an efficient stable flying system can be achieved. Also it shouldn't be missed that the wires used in the connections between motors, ESC's, and batteries are able to withstand high current discharge.

3.4

Software & Control Design

After selecting the right hardware components, the next step is to have a proper design for the code that will run on the Quadrotor. This phase is the hardest of all and needs so much patience and constant tuning and monitoring. Having a snappy control loop is essential as the Quadrotor tries to self-stabilize itself, without such a loop, the flight could be sluggish with a huge amount of errors, which will be also accumulative and eventually would result in a crash with unexpected consequences. Starting off with a simple, yet very enriched flow chart of how should the program embedded in the microntroller look like and behave. A flow chart is very similar to the block diagram; brief and comprehensive. In figure 11 the flow chart shows the basic steps and processes needed in the main code.

Figure 11. Control algorithm flow chart.

To summarize the flow chart, it begins with providing the power through the battery, at this instance hardware components will initialize and boot. After that the sensors will be calibrated, taking the nominal value that they see and consider it as the reference. The receiver would then start testing the frequency and channels in order to make sure that it is correctly connected with the transmitter. The phase called arming can now take place, setting different modes and configuration such as; turning the whole system off (disarm). The next two steps are mainly getting the values that the sensors read and then sending those values to the proportional-Integral (PD) which will get the error and output the final values with the help of the desired values from the transmitter and receiver. To conclude, mixing is the process of sending the commands to the motors based on the desired input plus the output value generated from the PD.

20

Chapter 4
SELECTED COMPONENTS SPECIFICATIONS
In this chapter the reasons and justifications to the chosen parts and components will be made.

4.1

Selected Mechanical Components

4.1.1 Selected Frame The frame used in the Quadrotor is the MK50 set. It consists of four aluminum drilled and anodized rods (one of which is red to differentiate the front side from the rest) and two center plates made of carbon fiber. The frame weighs about 120 g, depending also on the type and number of screws used. The distance between the centers of two aligned motors is 50 cm. To mount the microcontroller and the other components that will be interfaced with it, a custom-made wood plate is used.

Figure 12. The frame set used [5].

4.1.2 Selected Propellers As for the propellers used, they are the EPP1245, 12 in. propellers for right and left rotating. Figure 13 shows a pair of them.

Figure 13. A pair of the selected propellers [5].

4.2

Selected Electrical & Electronic Components


21

4.2.1 Selected Actuators 4.2.1.1 Selected Motors The motors selected to actuate the Quadrotor are the BLDC outrunners type EK5-0003B. Weighing each 62 g, these small motors are capable of 900 rpm/Volt, maximum efficiency of 80%, and a maximum current of 13A. Each motor can produce a maximum thrust up to 850 g. The motor is illustrated in figure 14.

Figure 14. One of the four motors running the Quadrotor [5]. Considering the 2:1 ratio between motors thrust power to Quadrotor's weight is important. Having a light-weight Quadrotor and relatively strong motors implies the fact that the control of it would be harder since the overrated power of the motors ratio to the Quadrotor weight would easily produce an unstable flight, and therefore the control algorithm has to be accurate. No compromise. The amount of rpm/Volt is mainly dependent on the Quadrotor's weight and size, as for bigger sizes low rpm/Volt is better (higher torque) and for small sizes the opposite. 4.2.1.2 Selected Electronic Speed Control (ESC) The required ESC needed to run the motor is 25 A, the Parkflyer Pentium-30 are capable to deliver up to 30 A, which is quite enough and safe. Weighing about 25 g and with a lot of features such as; superior current endurance, protection features, different operating modes depending on the aerial platform used, and a throttle range that can be programmed and compatible with all transmitters available in the market. Figure 14 shows the ESC picked.

22

Figure 14. Selected ESC.

4.2.2 Selected Sensors IMU 5 Degrees of Freedom is used in the Quadrotor as a vital element to self-stabilize the Quadrotor. The IMU used incorporates a dual-axis gyroscope IDG500 and a triple-axis accelerometer ADXL335. This allows the control over the roll and pitch (gyroscope), in addition to the X, Y, Z directions (accelerometer). This small chip weight is below 2 g which makes a perfect choice. The IDG-500 highlights (from the X- / Y-Out pins) are; 500 degrees / second full scale range. 2.0 mV / degree / second sensitivity. Zero-rate output = 1.35 V Integrated amplifiers and low-pass filters

Figure 15. IDG-500 positive output orientation [13].

The ADXL335 highlights are; 3-axis sensing. Low-power consumption. Maximum sensitivity of 330 mV / g at Xout , Yout , Zout .

23

Figure 16. ADXL335 output vs. orientation with gravity [14].

Finally to have control over yaw, another IDG-500 is utilized using only one axis. Figure 17 and 18 illustrate the used sensors.

Figure 17. IMU 5 DOF [15].

Figure18. IDG-500 [15].

4.2.3 Selected Transmitter The transmitter used in the Quadrotor is the same one used in most remote-control (RC) toys. Having multiple channels and user-defined channel mixing makes it a suitable choice. 4.2.4 Selected Receiver 24

As for the receiver, the R16SCAN is selected. Featuring SCAN technology which enables the receiver to auto-detect the optimum frequency needed without any extra steps. It weighs only 17 g.

Figure 19. R16SCAN receiver [16].

4.2.5 Selected Microcontroller Unit (MCU) The MCU used in this project is the Arduino Duemilanove (with Atmega328P chip). The key features of the Arduino Duemilanove are summarized as follows; 14 digital I/O pins (6 of which could be as PWM outputs). 6 analog inputs. 16 MHz crystal oscillator. USB connection. External power supply. 32 KB flash memory (2 KB are reserved for the bootloader). 1 KB EEPROM.

The open-source Arduino environment that can be downloaded from there website makes it easy to write code and upload it to the controller. Different language programs can be used to program it, the Quadrotor will be using C programming language. The beauty of Arduino boards is how easy and straight forward using one can be, having all the I/O pins with easy connections for rapid prototyping without the need to solder any wires, and a built-in voltage regulator which makes it possible to connect external power sources without needing for any extra components. Also the user friendly, simple & clean GUI of their environment makes writing and debugging programs a pleasureful process. And not to forget that all this comes at a very affordable price. The Arduino Deumilanove fulfilled all the requirements needed to complete the projects, those are shown as follows; 1. 4 main PWM signals from the RC receiver (which controls the movement of the Quadrotor) 25

plus 2 extra PWM signals for any additional applications (not essential), that means 6 input PWM signals. 2. Control 4 motors by sending them PWM signals = so 4 PWM output signals. Both summed together then we need at least 10 digital I/O pins for main functions. 3. Sensory feedback using 6 sensors; triple-axis gyroscope & triple-axis accelerometer. So 6 analog input pins are needed. 4. Control loop and motor update rate at 500 Hz. The Arduino Duemilanove is shown in figure 20.

Figure 20. Arduino Duemilanove board [17].

Arduino boards also have a lot of accessories that can be added on it which makes interfacing different electronic components simpler and easier for the users. Like "Arduino ProtoShield" used in this project; it is simply a bare printed circuit board (PCB) that is installed "clicked" above the main board which gives much more area for coupling different electronic components to the main I/O pins or to each other.

26

Figure 21. Arduino ProtoShield [15].

4.2.6 Selected Battery LiPo (or Lithium Polymer) batteries are rechargeable batteries, normally are composed of several identical secondary cells in parallel addition to increase the discharge current capability. They provide high current capacity and discharge rate to weight ratio. They have also great life cycle degradation rate. A LiPo battery package can have more than 1 cell, the voltage of a LiPo cell varies from about 2.7V (discharged) to about 4.23V (fully charged). The battery or cell capacities are rated in ampere hours(Ah) or milliampere hours(mAh). And they are also rated in C which is the maximum discharge rate. The BLDC motors have a continuous current discharge ranging between 4 10 A per motor, so maximum discharge is (10 A * 4) = 40 A. And the average current drain during the flight is 5.5 A per motor (5.5 A * 4) = 22 A. A 2200 mAh 20C battery was chosen for testing the Quadrotor and it weighs 180 g. The battery has maximum discharge of (2.2 Ah * 20) = 44 A , and can run the Quadrotor for (2.2 Ah * 60) / 22 A = 6 minutes (theoretically). This battery is illustrated in figure 22.

Figure 22. The battery that has been chosen.

27

Chapter 5
IMPLEMENTATION & RESULTS
5.1 Assembly
Assembling and connecting all the components of the Quadrotor is a process that needs extra attention. Starting with the frame which consists of four Aluminum parts all screwed and tightened up with the center plate. After that comes the soldering part; where all the needed soldering was made for the electronic parts to be connected properly; For the PCB where the sensors will be mounted, wires which are divided to connect the ESCs with the battery, and the custom-made High-Bright LED strip to be attached on the front frame arm so that the Quadrotor can be flown at night.

Figure 23. Assembling the frame.

Figure 24. ProtoShield ready to be mounted on the Arduino

www.facebook.com/ELECTRONICS.LOVERZ

Figure 25. Wires for supplying power to variuos components.

Figure 26. High-Bright LED for night flights.

When connecting the Motors and ESCs together, the direction of rotation of each motor should be considered.

28

A custom-made base platform was made to hold the controller on the center plate.

www.facebook.com/ELECTRONICS.LOVERZ

Figure 27. Motors and ESC's installed.

Figure 28. Custom-made base for the controller.

All connections were made between the electronic components and the controller. Then the components were mounted together on the center plate of the frame. An empty CD-Rom holder is used to protect all the sensitive electrical components of the Quadroter.

Figure 30. Controller interfaced with other components.

Figure 31. Covering the electronics.

A custom-made landing gear was built from cheap materials available in the market and attached to the Quadrotor frame. Light wooden sticks were used at the end of each arm to protect the propellers from breaking if the Quadrotor lands improperly.

29

www.facebook.com/ELECTRONICS.LOVERZ

Figure 32. Quadrotor ready to take-off.

5.2

Software & Control Algorithm

This section includes a brief information since the development of the project will continue and further additions will be made, which obliged the investigators to keep the main controlling algorithm and software confidential. The Quadrotor controller was programmed using C language. Multiple classes were created to divide the work of each part of the program to keep everything neat and simple, and to improve its functionality. When the battery is connected to the system, the controller starts as follows: The process starts by initializing all the hardware, variables, classes & subclasses needed in the system. The sensors are calibrated by reading their values at standstill position. These values are considered as the zero values to be compared with any new values. PWM signals are read by the receiver. The pilot activates the motors by a specific combination of signals sent to the controller from the transmitter. New values of sensors readings are compared to the original values to calculate error. The PD controller receives the error and produces an actuationg signal for the degrees of 30

freedom. The mixing formula is executed to adjust the motors speed in order to give the Quadrotor the required direction.

Note that Arduino's default ADC (Analog-to-Digital Converter) sampling rate is 9615.384 Hz which is more than enough to read the sensors output values. The gyro sensor internal filter clock is 2 kHz; which means four new values are read from sensors every control loop.

5.3

Flight Tests & Results

Several flight test were conducted. The first couple of flight tests were unstable due to the following main reasons: The control loop update rate was slow at the beginning which resulted in nonaccurate motor responses for the actual sensors readings. This was solved by changing the approach in reading the values from the receiver which gave the desired update rate. The significant amount of noise generated from the sensors. A complementary filter was implemented in the algorithm to reduce the noise. After the modifications that were made to the system, the flight tests showed some rough movements and oscillations of the Quadrotor. To overcome this problem, the PD control factors were fine tuned. And after several minor adjustments in the code program, high stability was achieved. The current features of the project can be summarized as: Stable flight was achieved using only Gyro sensors. Also basic implementation of accelerometer sensors is done for adjusting and correcting the drift when needed. Further development will be made to fully implement the accelerometers in the system to achieve better stability. 500 Hz update rate to control motors speed. Extra two channels can be used in the transmitter to control any additional applications on the Quadrotor during flight. A pre-flight test can be made by connecting the controller to the PC. Up to 500 grams of additional payload can be carried on the Quadrotor during flight. Flight time ranging from 6-14 min (depending on battery used & payload)

To view a flight demo follow this link: http://www.youtube.com/watch?v=svudDXYj1LM or http://vimeo.com/10878274

31

5.4

Future Work & Development


Implementing a better control algorithm using accelerometers to achieve better stability results. Live feedback using wireless technology for various applications; real time aerial video, image processing, reading different sensors data & battery capacity monitoring. Using image processing as an extra sensor to control the movement of the Quadrotor and minimize the drifting. Minimizing the cost of building one by using cheaper components. Adding GPS which will make a great method in holding a current position, setting a destination point or a way point for the Quadrotor to follow. Including using geotagging for different applications. Additional sensors can be added beside the main sensors like pressure & magnetometer sensors to control the heading and altitude of the Quadrotor, which will result in a superior stable flight. Self stabilizing camera frame to make aerial videos much better.

For more info about this project, visit: https://sites.google.com/site/quattrinoproject/home

32

References
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] URL: http://en.wikipedia.org URL: http://3dgameprogramming.net URL: http://aviastar.org URL: http://draganfly.com URL: http://mikrokopter.de URL: http://www.q4systems.de URL: http://blogspot.com URL: http://microcontroller.com URL: http://pics.towerhobbies.com URL: http://hobbycity.com URL: http://xoarintl.com URL: http://youtube.com IDG500 Datasheet from URL: http://invensense.com ADXL335 Datasheet from URL: http://analog.com URL: http://sparkfun.com URL: http://shop.graupner.de URL: http://arduino.cc

www.facebook.com/ELECTRONICS.LOVERZ www.facebook.com/ELECTRONICS.LOVERZ www.facebook.com/ELECTRONICS.LOVERZ www.facebook.com/ELECTRONICS.LOVERZ www.facebook.com/ELECTRONICS.LOVERZ


33

Você também pode gostar