Lugaza Project Final Official - 094505

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 135

DAR ES SALAAM INSTITUTE OF TECHNOLOGY

DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATIONS


ENGINEERING

BACHELOR OF ENGINEERING

NTA LEVEL 8

SENIOR PROJECT II

PROJECT TITLE: FIRE FIGHTING DRONE

PROJECT TYPE: PROBLEM SOLVING

STUDENT’S NAME: VICTOR MOSHI LUGAZA

ADMISSION NUMBER: 180630720480

ACADEMIC YEAR: 2021/2022

SUPERVISOR: Mr. JUMANNE ALLY

June, 2022
CERTIFICATION
The undersigned certifies that, have read and hereby recommend for the examination of
project report titled FIRE FIGHTING DRONE, in fulfillment of Bachelor of Engineering
degree in Electronics and Telecommunications at Dar es Salaam Institute of Technology.

Supervisor:

Signature: …………………………...

Date: ………………………………...

i
DECLARATION
I, VICTOR MOSHI LUGAZA, with student admission number 180630720480, declare to the
best of my knowledge that the project presented here for partial fulfillment of the Bachelor of
Engineering in Electronics and Telecommunications degree is my work except where
explicitly indicated otherwise.

Whenever I have used information from other sources, I have given credit by proper and
complete referencing of the source material to discern my work and what was quoted from
other sources.

Name: VICTOR MOSHI LUGAZA

Signature: ………………………….

Date: ……………………………….

ii
ABSTRACT
Fire Accidents have caused many serious injuries and damages to personnel and personal
property. General Fire accidents occur often unexpectedly and suddenly. Electric
components, flammable fluids such as petrol, flammable types of equipment, and vehicles
have been the common sources of fire in most cases. To overcome massive damages and
destructions caused by fire, fast and effective methods are required right after the eruption of
fire at a particular place.

Firefighters have been helping much in dealing with fire and stopping its effects and
destructions but most of the time they face many challenges especially when fire erupts at tall
buildings and the center of forests. It costs them a lot of resources and the efficiency of their
work is low due to the inability to reach higher heights. Not only that but also firefighters find
it hard to get inside the building that is set on fire with their resources. Most of the time they
manage to stop fire while maximum destructions have already occurred as a result of the
inability to access the burning areas.

To overcome the above difficulties that firefighters face an effective fire fighting drone is
designed in this project. This drone is designed along with a gripper that is capable of holding
a polyvinyl chloride ball filled with dry chemical agents for extinguishing the fire. This
polyvinyl chloride ball is carried by a drone into the fire and on coming in contact with fire
the ball explodes with fire extinguishers to put out the fire. A suitable wireless
communication is to be established which will enable an out-of-board pilot to control the
movements of the drone while it is on air.

The project included reviewing various literature and technical documents to come up with
various specifications for designing a drone. Preliminary and secondary data were collected
and analyzed by consulting fire and rescue forces from Ilala, Lugalo, and Temeke. The
obtained data were used to build the fire-fighting drone.

This drone allows easy fire extinguishing without risking life. Also, it can access forest areas
in an instant which would require hours for fire trucks or humans to arrive at and instantly
reach high building windows with a fire extinguisher. It is designed in such a way that it will
increase the efficiency of fighting against fire to the fire and rescue forces.

iii
ACKNOWLEDGEMENTS
I thank God for helping me in accomplishing this project report. I also wish to express my
thanks to my project supervisor Mr.Jumanne Ally of DIT for his full support during this
project tenure. I also appreciate our project coordinator of the Department of Electronics and
Telecommunications, Dr. Mbazingwa Mkiramweni (PhD.) for his full support on every stage
of this project, His guidance and recommendations helped to accomplish this project.

Many DIT ETE Staff members and technical personnel helped me in this project. I wish to
extend my thanks to Madam Asha J., Dr. John Msumba (PhD.), Dr. A. Manyere (PhD.),
Madam N. Nzowa, and Madam Kabadi for helping me in structuring my project ideas. Mr.
N. Ngomuo and Mr. Kajange helped me when I needed technical assistance.

I also appreciate Inspector J.K Mwasabeja who is an Operation Officer of the Fire and
Rescue force at Ilala District and Inspector Isack Njombe who is an Operation Officer of the
Fire and Rescue force at Kinondoni District and all members of the Forces for their
assistance during Data Collection through interviews and questionnaires.

Lastly, I thank all my colleagues and other people who are not mentioned by names, but we
worked together on this project.

iv
TABLE OF CONTENTS
CERTIFICATION..........................................................................................................................i

DECLARATION...........................................................................................................................ii

ABSTRACT..................................................................................................................................iii

ACKNOWLEDGEMENTS.........................................................................................................iv

LIST OF FIGURES......................................................................................................................ix

LIST OF TABLES.......................................................................................................................xii

ABBREVIATIONS.....................................................................................................................xiii

CHAPTER ONE............................................................................................................................1

INTRODUCTION..........................................................................................................................1

1.1 Background information..............................................................................................1

1.2 Problem Statement.......................................................................................................2

1.3 Objectives....................................................................................................................2

1.4 Significances of the Project.........................................................................................2

1.5 Scope and Limitation of the Project............................................................................3

1.6 Methodologies.............................................................................................................3

1.7 Chapter Summary........................................................................................................5

CHAPTER TWO...........................................................................................................................6

LITERATURE REVIEW.............................................................................................................6

2.1 Introduction.................................................................................................................6

2.2 Existing Systems.........................................................................................................7

2.3 Chapter Summary......................................................................................................13

CHAPTER THREE.....................................................................................................................14

PROPOSED SYSTEM................................................................................................................14

3.1 Introduction...............................................................................................................14

3.2 Working Principle of the Proposed System...............................................................14

3.3 Proposed System Block Diagram..............................................................................15

v
3.4 Block Diagram Description.......................................................................................15

3.5 Features of the Proposed System...............................................................................17

3.6 Advantages of the Proposed System.........................................................................17

3.7 Evaluation and Expected Outcome...........................................................................17

3.8 Chapter Summary......................................................................................................18

CHAPTER FOUR........................................................................................................................19

DATA COLLECTION................................................................................................................19

4.1 Introduction...............................................................................................................19

4.2 Data Collected...........................................................................................................19

4.3 Technical Data...........................................................................................................25

4.4 Chapter Summary......................................................................................................31

CHAPTER FIVE.........................................................................................................................32

DATA ANALYSIS.......................................................................................................................32

5.1 Introduction...............................................................................................................32

5.2 Sensing Unit..............................................................................................................32

5.3 Motor Unit.................................................................................................................36

5.4 Motor Control Unit....................................................................................................39

5.5 Gripper Unit...............................................................................................................40

5.6 Fire Extinguisher Unit...............................................................................................41

5.7 Control Unit...............................................................................................................43

5.8 Power Supply Unit....................................................................................................44

5.9 Wireless Communication Unit..................................................................................47

5.10 Joystick Unit..............................................................................................................48

5.11 Pushbutton Unit.........................................................................................................49

5.12 Chapter Summary......................................................................................................49

CHAPTER SIX............................................................................................................................50

SYSTEM DESIGN.......................................................................................................................50

vi
6.1 Introduction...............................................................................................................50

6.2 Remote Control Part..................................................................................................50

6.3 Drone part..................................................................................................................59

6.4 Chapter Summary......................................................................................................71

CHAPTER SEVEN......................................................................................................................72

SIMULATION AND DISCUSSION..........................................................................................72

7.1 Introduction...............................................................................................................72

7.2 Simulation Tools.......................................................................................................72

7.3 Simulation Environments..........................................................................................72

7.4 Simulation of the Joystick unit..................................................................................72

7.5 Simulation of the motor unit......................................................................................73

7.6 Overall Simulation results.........................................................................................74

CHAPTER EIGHT......................................................................................................................76

PROTOTYPE IMPLIMENTATION........................................................................................76

8.1 Prototype Development.............................................................................................76

8.2 Chapter Summary......................................................................................................90

CHAPTER NINE.........................................................................................................................91

CONCLUSION AND RECOMMENDATION.........................................................................91

9.1 Introduction...............................................................................................................91

9.2 Conclusion.................................................................................................................91

9.3 Recommendation.......................................................................................................92

REFERENCES.............................................................................................................................93

APPENDIX 1 DATA COLLECTION FILES...........................................................................97

A1.1 Interview Questions Sample........................................................................................97

A1.2 Questionnaire Sample..................................................................................................99

A1.3 Interview Responses..................................................................................................101

A1.3 Questionnaire responses............................................................................................107

vii
APPENDIX 2 PROGRAMS CODES.......................................................................................109

A2.1 Transmitter Codes.....................................................................................................109

A2.1 Receiver Test codes...................................................................................................110

A2.3 Receiver Codes..........................................................................................................112

A2.4 ESC Calibration Codes..............................................................................................114

APPENDIX 3 PROJECT TIMELINE.....................................................................................116

Table A3 1 Project Timeline for semester I.......................................................................116

APPENDIX 4 APPROXIMATED PROJECT BUDGET......................................................118

viii
LIST OF FIGURES
Figure 2.1 Fire fighting using trucks carrying water and water pumps.....................................8
Figure 2.2 Fire fighting by using fire extinguisher tank...........................................................10
Figure 2.3: Fire fighting using a fire extinguisher ball.............................................................12
Figure 4.1 Rate of fire accidents from day today.....................................................................21
Figure 4.2 Data concerning challenges encountered in fire fighting.......................................21
Figure 4.3 Data collection on the capacity of fire fighting equip.............................................22
Figure 4.4 Data results on where a drone will help..................................................................22
Figure 5.1 MPU6050 gyroscope and accelerometer sensor.....................................................36
Figure 5.2 Flycat 750kV outrunner BLDC motor....................................................................38
Figure 5.3: 14 inches fiber carbon propeller............................................................................39
Figure 5.4 30A Electronic Speed Controller............................................................................39
Figure 5.5 A standard type servo motor...................................................................................41
Figure 5.6 A fire extinguisher ball...........................................................................................42
Figure 5.7 Pin configurations of Atmega328p.........................................................................44
Figure 5.8 Gens Ace 14.8V LiPo battery with 6750mAh........................................................46
Figure 5.9: 12V EW battery...................................................................................................47
Figure 5.10 nRF24L01 with an antenna...................................................................................48
Figure 5.11 Remote Controller joystick...................................................................................48
Figure 5.12 Pushbuttons...........................................................................................................49
Figure 6.1 Circuit diagram of the two joysticks.......................................................................52
Figure 6.2: ATmega328p pin diagram.....................................................................................53
Figure 6.3: ATmege328p Basic Interface and configuration...................................................53
Figure 6.4: Control Unit Circuit...............................................................................................55
Figure 6.5 Nrf24l01 Pinout......................................................................................................56
Figure 6.6 The circuit diagram of nrf24l01..............................................................................56
Figure 6.7 Pin configuration of the toggle switch....................................................................57
Figure 6.8 Toggle Switch circuit..............................................................................................58
Figure 6.9 Atmega328P pin configuration...............................................................................59
Figure 6.10 Arduino Nano pin configuration...........................................................................60
Figure 6.11 Circuit diagram of the receiver.............................................................................61
Figure 6.12 Three axis of the gyroscope..................................................................................61
Figure 6.13 Three axis of the accelerometer............................................................................62

ix
Figure 6.14 MPU6050 pins......................................................................................................63
Figure 6.15 Flight Controller Circuit.......................................................................................66
Figure 6.16 Parts of Electronic Speed Controller.....................................................................66
Figure 6.17 ESC pins..............................................................................................................67
Figure 6.18 The illustration of the ESC...................................................................................67
Figure 6.19 Hall effect operation.............................................................................................68
Figure 6.20 Back EMF illustration...........................................................................................68
Figure 6.21 The whole arrangement of the drone...................................................................69
Figure 6.22 Servo motor position and the pulses.....................................................................70
Figure 6.23 Servo motor pinout...............................................................................................70
Figure 7.1 The simulation results for the joystick unit.............................................................73
Figure 7.2 Motor connetions....................................................................................................74
Figure 7.3 Simulation results of the motor unit........................................................................74
Figure 7.4 The overall circuit simulation.................................................................................75
Figure 8.1 Breadboard connections..........................................................................................77
Figure 8.2 Bootloading an atmega328P using arduino UNO...................................................77
Figure 8.3 Bootloading circuit..................................................................................................78
Figure 8.4 Breadboard testing of the transmitter and the receiver...........................................78
Figure 8.5 Serial Monitor test results.......................................................................................79
Figure 8.6 Flight controller test on the breadboard..................................................................79
Figure 8.7 Observing results on the multiwii platform............................................................80
Figure 8.8 PCB layout for the RC transmitter..........................................................................81
Figure 8.9 The PCB layout for drone receiver.........................................................................81
Figure 8.10 PCB layout for the flight controller......................................................................82
Figure 8.11 PDF file for the transmitter...................................................................................82
Figure 8.12 PDF file for the receiver.......................................................................................83
Figure 8.13 PDF file for the flight controller...........................................................................83
Figure 8.14 A circuit that was transfered to the PCB board.....................................................84
Figure 8.15 Equipments that were used in etching.............................................................84
Figure 8.16 Etching the circuit................................................................................................85
Figure 8.17 The etched circuit on PCB board..........................................................................85
Figure 8.18 Soldering components on the RC transmitter.......................................................86
Figure 8.19 The soldered components on the Receiver and the flight controller...................86
Figure 8.20 Inside and outside view of the remote control transmitter....................................87

x
Figure 8.21 The receiver and the flight controller mounted on the drone frame.....................87
Figure 8.22 Calibration of the electronic speed controller.......................................................88
Figure 8.23 Various Quadcopter designs.................................................................................88
Figure 8.24 The Fire fighting drone prototype.........................................................................89

LIST OF TABLES

xi
Table 3.1: The block diagram of a proposed system................................................................15
Table 4.1 Summary of the data collected through questionnaire............................................19
Table 4.2: A summary of data collected through interviews...................................................23
Table 4.3 Technical Data for the Control Unit.........................................................................25
Table 4.4 Technical Data for the Sensing unit........................................................................26
Table 4.5 Technical Data for the drone power supply............................................................26
Table 4.6 Technical Data for the Remote-Control power supply...........................................27
Table 4.7 Data requirements for the motor control unit..........................................................27
Table 4.8 Technical Data Requirement for motor unit...........................................................28
Table 4.9 Technical Data Requirement for gripper unit..........................................................28
Table 4.10 Technical Data Requirement for Fire Extinguisher Unit......................................29
Table 4.11 Technical Data Requirements for joystick unit......................................................29
Table 4.12 Technical Data Requirements of the Drone Frame................................................30
Table 4.13 Technical Data Requirement of a transmitting unit...............................................30
Table 4.14 Technical Data Requirement of a Receiving unit.................................................31
Table 5.1 Specifications of various analog accelerometers.....................................................32
Table 5.2 Specifications of digital accelerometers...................................................................34
Table 5.3 Specifications of analog gyroscopes........................................................................34
Table 5.4 Specifications of various digital gyroscopes............................................................35
Table 5.5 Comparison of In-runner and outrunner BLDC motors...........................................37
Table 5.6 Specifications of various outrunner motors.............................................................38
Table 5.7 Specifications of various types of servo motors.......................................................40
Table 5.8 Specifications of a fire extinguisher ball..................................................................42
Table 5.9 Various microcontrollers.........................................................................................43
Table 5.10 Specifications of various LiPo batteries................................................................44
Table 5.11 Specifications of various wireless technologies.....................................................47
Table 7.1 Simulated and calculated values..............................................................................73

xii
ABBREVIATIONS

ADC Analog To Digital Converter..................................................35


BEC Battery Elimination Circuit.....................................................39
BLDC Blushless Direct Current Motor...............................................37
ESC Electronic Speed Controller.....................................................38
FAA Federal Aviation Administration..............................................25
FAFFA First Aid Fire Fighting Apparatus............................................41
GND Ground......................................................................................63
GPS Global Positioning System.......................................................24
I/O Input/Output.............................................................................43
LiPo Lithium Polymer......................................................................27
mAh milli-Ampere hour...................................................................45
MEMS Micro Electro Mechanical System..........................................61
NiCd Nickel Cadmium......................................................................44
NiMH Nickel Metal Hydride............................................................39
PCB Printed Circuit Board.............................................................79
PVC Polyvinyl Chloride..........................................................14, 17
SCL Serial Clock...........................................................................63
SDA Serial Data.............................................................................63
SLA+R Slave Read address................................................................63
SLA+W Slave Write address..............................................................63
UAS Unmanned Aircraft Systems.................................................24
XCL Auxiliary Serial Clock...........................................................63
XDA Auxiliary Serial Data.............................................................63

xiii
CHAPTER ONE

INTRODUCTION

1.1 Background information


Fire accidents have been increasing every day in our society as technology increases.
Nowadays, the use of electric equipment, flammable fluids, vehicles, and combustible metals
has been the main source of fire accidents in many areas. Due to fire accidents many people
have lost their lives, massive destruction has occurred and other people have been left with
disabilities thus resulting in huge losses in society.

Firefighters are doing a great job in dealing with fire using various means of fire fighting. In
their activities, they face so many challenges due to poor infrastructures, unplanned areas, the
inefficiency of resources, and lack of technology to handle some environments where there
are fire accidents. All these challenges lower the performance of fire fighting and increase the
measure of destructions that occurs as a result of fire accidents.

To aid firefighters in their fire fighting activities, a fire fighting drone is designed in this
project. The drone is designed in such a way that it will help firefighters to extinguish the fire
effectively without delay especially in areas that are hardily accessible by their resources like
tall buildings, forests, unplanned areas, and areas with poor infrastructures. This drone is not
meant to suppress firefighters but to aid them and increase their effectiveness in fire fighting
activities hence reducing adverse effects of fire.

This project report gives a detailed description of the existing systems that are used in fire
fighting based on an intensive investigation performed. It also gives a proposed solution for
the challenges that are being faced in the society on fire fighting. This proposed solution is
the fire fighting drone. The drone is designed to be step by step as reported in this project
report and all the details and parameters are analyzed and recorded. It has a problem
description as well as step-by-step solutions to the problem.

Research has been carried out to come up with a solution that will strongly minimize the
effects of fire accidents. This fire fighting drone will reduce struggles which firefighters
encounter during the whole process of fire fighting and it will help them to fight against fire
effectively. The operation and capacity of the project will be tested based on the objectives
which are stated in this report.

1
1.2 Problem Statement
It has been observed that some areas such as tall buildings, unplanned areas, and areas with
poor infrastructures are hardly accessible by firefighters.

1.3 Objectives
The objectives of this project are divided into two parts, namely
i. Main and
ii. Specific objectives.

1.3.1 Main Objective


The main objective of this project is to design a fire fighting drone

1.3.2 Specific Objectives


The specific objectives of this project are

i. To develop a program for the control unit with respective inputs and outputs
configurations
ii. To interface servo motor to the control unit
iii. To interface sensing unit to the control unit for angular and linear acceleration
iv. To interface motor speed controllers to the control unit
v. To interface motors to the motor controller
vi. To develop a program for the control unit of the remote controller
vii. To interface joysticks to the control unit of the remote controller
viii. To interface button unit to the control unit of the remote controller

1.4 Significances of the Project

i. Easy to control
A drone is easy to control compared to the manual technique of fire fighting which needs
many people to hold the water pipe due to high pressure. Only one person can be able to
control a drone using a remote control.

ii. It simplifies fire extinguishing at tall buildings.


With a drone, it is simple to extinguish a fire that erupts at the top of the tall building. This is
because a drone can fly to the highest heights by just controlling it with a remote. This is
different from the existing system where water pumps or gas pumps may fail to push water to
tall buildings which have an eruption of fire.

2
iii. It simplifies fire fighting in areas that cannot be easily accessed by fire tenders
When a fire erupts at a place that has poor road infrastructure it is very difficult to reach the
place on time with fire fighting trucks thus a drone can help.

iv. It avoids risking the lives of firefighters


Firefighters are mostly required to enter inside houses where there is fire, so with drones,
they can send fire extinguisher balls into a place with fire while being far from that place this
being kept away from the risk of unexpected eruptions.

1.5 Scope and Limitation of the Project


The fire fighting drone designed in this project will only be limited to the line of sight. A
pilot controlling it will only be able to extinguish the fire that he or she can see not far
beyond sight. For the case of a tall building, the drone will only be used if the fire is along
the walls of the building or through the windows such that it is possible to drop a fire
extinguisher ball. When a fire erupts in the central rooms where people are outside the
building then it can not work until it is carried to that area with fire and made to drop fire
extinguisher ball.

1.6 Methodologies
The project involved various activities spanned in the two semesters. The activities include a
literature review on the existing systems and fire fighting methods that are being used
currently, collecting data, analyzing data, system design, simulating the system, designing the
prototype, testing the prototype, and writing a final report. The subsections below explain the
project methodologies which were undertaken.

1.6.1 Literature review


A depth study of the different existing systems was done as a solution to the fire accidents
problems. Various reports, journals, books, and other online and offline writings helped to
design a system having the best desirable features in solving the problem. Each existing
system was analyzed to determine its effectiveness in solving the problem.

1.6.2 Data Collection


In designing a fire fighting drone, various fire fighting equipment was investigated. Various
fire and rescue forces were visited to collect various data and specifications for the
equipment needed to extinguish the fire events. Interviews, questionnaires, documents, and
records were used to collect data. The obtained information is analyzed and helped in
designing the system specifications and selection of the components of various blocks.

3
1.6.3 Data Analysis
This involved detailed observation of data collected by questionnaire, interview, journals, and
articles. Data that was collected for each unit was analyzed and equipment with respective
specifications will be chosen. The analyzed data helped to decide the type of software and
hardware to be used for the design.

1.6.4 System Design


The analyzed data will help to plan the system design, including the electronics, and online
parts. System design will involve the planning of how the system will be constructed
following the data analysis conclusion. System design includes defining the architecture,
components, modules, size, interconnections, and interfaces for the proposed system to
achieve the objectives of the project.

1.6.5 System Simulation


Mathematical models and software will be used to replicate the behaviour of the actual
circuit. Offline software was used to simulate data storage. The type of software will be
chosen based on the analysis of various components of the system. This will give a software
result based on the expected hardware outcomes of the system.

1.6.6 Building Prototype


The prototype design will be realized by using specified hardware and software after
successful circuit simulation. The hardware part will include putting all required components
and materials together for the fire-fighting drone. At this part, all the components will be
assembled based on the design specifications.

1.6.7 Testing and Verification of the Prototype


After the prototype building, a test vector will be proposed and used to test and verify various
input signals to the system and how the system behaves. The test vector will include real-life
conditions to see if the desired outputs are produced as required and meet the objectives. In
the case of misbehaviour, the required part will be debugged.

1.6.8 Report writing


This part will involve recording the summary of the work done in every method used in
achieving the objectives set. The summaries are used to write a report explaining what has
been done and achieved. The written report explains each step followed towards achieving
the objectives of the project and all the implementations performed.

4
1.7 Chapter Summary
This chapter has discussed the project idea in detail by describing the problem that led to
having the idea of designing a fire fighting drone. This project focuses on solving the stated
problem with the guidance of the objectives. The main objectives, specific objectives,
significance, scope, and limitations of this project are explained. Also, the methodologies
used in the project are described. The following chapters will elaborate on each method used.

5
CHAPTER TWO

2 LITERATURE REVIEW
2.1 Introduction
This chapter contains background information on fire-fighting drone technology. Studies of
the existing modes of ways of fire fighting are discussed. The information explained in this
chapter was obtained through various researches from relevant sources like journals, books,
websites, and conference papers concerning various fire fighting techniques and fire
accidents in general.

2.1.1 Fire Accidents


Fire is one of the important needs that every human being requires to have. Most of our
activities such as cooking, burning wastes, welding iron, preparing forests, and many other
things require the presence of fire. It is dominant in every place in the world. Life would
become worse if there was no fire.

Although fire is very important in our daily life it can sometimes be very dangerous when an
eruption occurs. Fire Accidents can cause serious injury and damages to personnel and
personal properties. General Fire accidents occur often unexpectedly and suddenly.
According to the latest WHO data published in 2018 Fires Deaths in Tanzania reached 2,808
or 0.77% of total deaths. The age-adjusted Death Rate is 6.39 per 100,000 of population
ranks Tanzania 23 in the world. Apart from deaths many properties are destroyed as a result
of fire outbreaks [1].

2.1.2 Fire Extinguishers


Fire extinguishers decrease the effects that would be encountered as a result of fire accidents.
Methods that are used in extinguishing a fire depend on the type of fire. The following are
various classes of fire and their suitable extinguishers [2].
i. Class A fire evolves from ordinary combustible materials such as wood, cloth, paper,
rubber, and many plastics. Its extinguishers are Water, Film-forming foam type, and
Halogenated agent types.
ii. Class B fire evolve from flammable liquids, combustible liquids, petroleum greases,
tars, oils, oil-based paints, solvents, lacquers, alcex extinguishers, flammable
formings. Its fire extinguishers are Film-foaming type, CO 2 type and Dry Chemical,
and Clean Agent.

6
iii. Class C evolve from energized electrical equipment. Its extinguishers are Carbon
Dioxide, Dry Chemical, and clean agents.
iv. Class D fire evolves from combustible metals, such as magnesium, titanium,
zirconium, sodium, lithium, and potassium. It can be extinguished by using a Dry
Powder extinguisher.
v. Class F fire evolves from burning cooking oils or fat. Its extinguisher is a Wet
chemical. Another type is an electrical fire which can be extinguished by carbon
dioxide or dry powder.

2.2 Existing Systems


2.2.1 Introduction
Fire and rescue forces use various methods to fight against fire. The General Commissioner
of Fire and Rescue Force in Tanzania is John W. Masunga. The main aim for each method
used is to make sure that fire does not bring massive effects to people within the society.
Each method has its advantage and limitations. In this section, we are going to explain in
detail each method and its effectiveness in fighting against fire. The methods that are
described in this section depend on the class of fire [3]

2.2.2 Fire Fighting Using Fire Tenders (Trucks) with Water Pipes
This is the common method that is used in fire fighting. It has been over a long time by the
fire and rescue forces. This method utilizes water to extinguish the fire. Most societies use
this method because of the availability of water in many areas. These fire tenders carry fire
fighting equipments on board [4]

2.2.2.1 Operation of the System

Water is filled into the water tanks that are carried by the trucks. The trucks consist of water,
a pump to move the water, and a hose. The sizes of the water tanks can range from 500 – to
1500 gallons. This depends on the capacity of the truck engine. Pump capacity also varies
from one truck to another; it is measured in gallons per minute (gpm). Most pump capacities
are between 1000 gpm - 2000 gpm [5]. Water is pumped by a powerful water pump through
a flexible tube called a hose. When water contacts fire it puts off the fire. The projection of
water can be done through the hose or the monitor. The hose is a tube that is connected to the
pump. These trucks are also called fire tenders. They always carry all fire fighting equipment
on board. Either hose or monitor can be used to project water

7
The figure below shows how fire tenders are used in fire fighting using a tube called a hose.

Figure 2.1 Fire fighting using trucks carrying water and water pumps

2.2.2.2 Advantages of the System

This system has the following advantages


i. It is cost-effective.
This is because water is cheap compared to other fire extinguishers. This method
requires buying fire trucks and then what will always be required is filling the water
tanks with water. This method is most preferred in countries with plenty of water
sources.
ii. Does not require highly trained officials
Any person who has enough power to withstand the pressure of the water pump is
capable of using this method. Training is there but the skills taught an ordinary that
anyone can learn and extinguish fire easily

2.2.2.3 Disadvantages of the System


This system of fire fighting has the following disadvantages
i. Some areas cannot be accessed by the fire trucks easily
Areas with bad transport infrastructures and forests cannot be accessed easily by fire
trucks. This causes delay to the firefighters to reach the place of the event hence more
destruction of properties occurs.
ii. A Large amount of water is required for fire fighting
The amount of water required for effective fire fighting is very large. Sometimes it is
difficult to have enough water for fire fighting especially when there is a massive
eruption of fire. Thus, more resources are required.

8
2.2.2.4 Precautions that firefighters have to make

The following are the precautions that firefighters must take into account during the whole
process of extinguishing fire in any place.
i. Firefighters are advised to have breathing apparatus to avoid the effect of

smoke which may cause breathing problems and eventually death.


ii. Firefighters must be careful in entering a place that is surrounded by fire.

Sometimes other minor eruptions may occur as a result of the erupted fire
catching the flammable liquid thus this may unexpectedly affect or even
kill any firefighters around that place

2.2.3 Fire Fighting Using Fire Extinguisher Tanks


This is another method that is used to fight against fire. This is more common in buildings. It
is a primary fire fighting method. This means that it is mostly used when the fire is still at its
lower stages. The main reason for it to be used as a primary fire fighting method is its way of
operation as described below [6].

2.2.3.1 Operation of the System


This method uses a closed tank. The tank is filled with respective fire extinguishers
depending on the targeted class of fire. Fire extinguishers for respective classes are described
in the introduction section of this chapter. The extinguishers include dry chemical
extinguishers, nitrogen is typically used; water and foam extinguishers typically use air
among others where each extinguisher has its corresponding class of fire to deal with.

The system operates by pumping the fire extinguisher at high pressure by using the tanks.
When the fire extinguisher comes in contact with water, they put off fire easily. The capacity
of the fire extinguisher tanks depends on their sizes. However, most of the time they are
small-sized for easy operation because of being handheld devices.
Many fire extinguishers operate using the following PASS method [6]
i. Pull
Pull the safety pin. This will also cut the ribbon. Make sure you do it carefully Aim
Directing the fire extinguisher hose (or its horn or hose) to the firebase.
Note:
Do not touch the mouth of the fire extinguisher hose, Carbon dioxide-type materials, grow
very cold, and can damage the skin if exposed to it

9
ii. Squeeze
Press the handle so that the extinguishing mot can come out.
iii. Sweep
Extinguish fire by sweeping from one side to the side of the fire until the fire is extinguished.
See the area. If the fire burns again, repeat steps 2 - 4.
The figure below shows a person using this kind of method. This method is mostly used for
First Aid Fire Fighting (FAFF).

Figure 2.2 Fire fighting by using fire extinguisher tank

2.2.3.2 Advantages of the System


The following are the advantages of using fire extinguisher tanks.
i. Simple to use
Fire fighting can be used easily without any special training or course. This makes it
easily available in many houses because anyone can simply use it with effective
operation. What is just needed is to know how to release and hold the gas using the
fire extinguisher tank. This is why it is preferred in buildings.
ii. It is helpful for primary fire
For the fire that starts at a small stage, this method is suitable because it can stop the
fire easily hence preventing the excessive effects which could happen when the fire
erupts. Some fire begins at low levels that could be easily handled simply by using
fire extinguisher tanks. People must be careful in dealing with fire early before the
condition becomes worse to the extent that it cannot be stopped easily.
iii. It is easily available
These fire extinguisher tanks are easily available and portable for use. Most of the
buildings can have one on each floor. Their portability for storage and use makes

10
them easier to be used and supportive for people. Most of the areas have shops that
sell these tanks.
v. It is cost-effective
This is the key parameter to consider in any system which is developed. Lower cost
increases the effectiveness of using a system as long as the quality remains the same.
Fire extinguisher tanks are sold at a standard price compared to the huge loss that can
be encountered as a result of the destruction caused by fire

2.2.3.3 Disadvantages of the fire extinguisher tanks

The following are the disadvantages of using fire extinguisher tanks

i. They are risky


This method is risky because it requires a person to be near the place where there is a
fire that is to be put off. Sometimes further eruption may occur and since a person is
close to the fire then he or she will be affected and may even die depending on how
dense the eruption is.
ii. They are limited to small fires only
This is because the use of these fire extinguisher tanks needs the physical presence of
a person hence it is difficult for a person to stay close to a strong fire. If a person
comes close to the strong fire then he or she is likely going to be affected easily and
may even die depending on the amount of fire
iii. Requires a person to be close to the fire while fighting against it
This means that a person can’t attack the fire from far hence it is not an effective
method.

2.2.4 Fire Fighting Using the Fire Extinguisher Ball


This is the third method of fire fighting. It uses the PVC balls which are either placed or
thrown in a place with fire and they erupt as soon as they come into contact with fire. It takes
3 to 5 seconds for the PVC balls to erupt [7]. Fire extinguisher balls are extremely versatile
and can be placed in places where there is a risk of fire, such as over switches, in kitchens, or
overloaded outlets. This method can be useful to any class of fire depending on the
extinguisher that is placed within the ball. The larger the fire extinguisher ball the higher the
amount of fire that it will be able to put off. These balls are also called firebombs.

11
2.2.4.1 Ways to Use Fire Extinguisher Balls
There are two ways to use the fire extinguisher balls, active protection, and passive protection
i. Active Protection: When a fire breaks out, simply throw the ball towards the fire. It
will fall naturally in contact with the flames and will activate in 3 to 10 seconds. No
pin or spare parts or training: the ball is 152 mm in diameter and weighs 1.3kg (+/-
0.2kg), it is very easy to use. No special training or skills are required.
ii. Passive protection: One of the most important advantages of the Elide Fire fireball is
that it automatically triggers in the presence of fire. If placed in areas of high fire
hazard, where most fires occur, it will activate automatically when it comes into
contact with a flame.

The best option for passive use is to install the ball in the most vulnerable places in its metal
basket. The ball can be fixed on a support or simply placed on a flat surface, visible and easy
to access. The figure below shows fire fighting using a fire extinguisher ball.

Figure 2.3: Fire fighting using a fire extinguisher ball

2.2.4.2 Advantages of Fire Fighting by Using Fire Extinguisher Ball


The following are the advantages of using fire extinguisher balls in fire fighting.
i. Simple to use
This method does not consume any energy or time. What is just required is to have the PVC
ball and to throw it towards fire thus it is a very simple method of fire fighting.

ii. No special training and technical skills are required

This method does not require any special training due to its simplicity. Just a normal
understanding of throwing balls is required. Anyone can apply this method.

12
2.2.4.3 Disadvantages of Fire Fighting by Using Fire Extinguisher Ball

The following are the disadvantages of using fire extinguisher balls in the fire fighting
process.
i. Ball may not reach the destination
Since the weight of the ball is 1.5Kg [8] then sometimes it can be affected by wind and fail to
reach the required destination

ii. It causes risks to firefighters

When using these balls, a firefighter must be near the place with fire so that he or she can
throw the ball to the exact place thus sometimes firefighters may get injured by any eruption
that occurs along the process.

iii. This method also requires the fire extinguisher ball to be in contact with fire.

This means when it is not in contact with fire then the destructions may continue until the fire
reaches the ball

2.3 Chapter Summary


This chapter has described in det the various existing systems which are used for fire
fighting. Two systems have been addressed. The chapter also gives a closer look at the road
accidents and various classes of fire as well as the respective fire extinguisher for each class.
The chapter has also described the advantages and disadvantages of each system to give
ground for a clear understanding of the system. In the next chapter, we will see the proposed
system for easy and effective fire fighting

13
CHAPTER THREE

3 PROPOSED SYSTEM

3.1 Introduction
This chapter is going to describe in detail the system which is proposed to be used for
effective fire fighting. The system which is proposed in this project is the fire fighting drone.
This system is proposed based on the careful study that was done in the last chapter on the
existing systems. So, this system is expected to cover the weaknesses of the previous
systems. The system that is proposed here is a result of innovations based on what has been
learned for the three years of study. The chapter will include the system operation and a neat
block diagram will be built based on the needs for its operation. Each unit of the block
diagram will be explained as well.

3.2 Working Principle of the Proposed System


The fire fighting drone proposed in this project makes use of a Foam casing PVC ball [7].
PVC ball is a widely used and inexpensive thermoplastic polymer. This ball is filled with a
dry chemical agent which is used as a fire extinguisher. After filling the ball with a dry
chemical agent, it is being mounted on the gripper of the drone. This gripper acts as the
robotic arm to hold a ball such that it cannot fall unless it is released by the pilot.

A drone carries the fire extinguisher towards a place with fire. When it reaches the place with
fire it releases the fire extinguisher ball based on the commands from a pilot. A drone must
not be very close to the fire because it can be affected by heat. It must be at least five meters
away from the fire. Soon after dropping the ball, a drone will be commanded by the pilot to
move away from the place with fire.

When the fire extinguisher ball comes in contact with the fire it self-activates after about
three to five seconds of fire exposure. It disperses non-toxic extinguishing chemicals, and it
can extinguish fires within a three-cubic meter radius. So, the larger the number of balls the
higher is the fire fighting performance. The fire extinguisher ball weighs about 1.3 kg thus is
nice to be used [8].

It is important to note that all the commands for the operation are given to the drone by the
pilot who is always out of the board. The pilot uses a remote control to guide the drone. This
is the reason for the name unmanned aerial vehicle which means that no pilot is on board.

14
3.3 Proposed System Block Diagram
The figure below is the block diagram of the fire-fighting drone.

Drone Remote Control

POWER POWER
SUPPLY SUPPLY

MOTOR SENSING
CONTR UNIT
OL
CONTROL CONTROL
RADI JOYST
UNIT UNIT
O
MOTO RADIO ICK
TRAN
R UNIT RECEI UNIT
VER SMITT
ER
GRIPPER
PUSHBUTTO
N UNIT

FIRE
EXTINGUISHER
UNIT

Table 3.1: The block diagram of a proposed system

3.4 Block Diagram Description


All the units which build up the block diagram of the proposed system are described in the
following sections below.

3.4.1 Power Supply


This unit comprises a battery which is used to power the whole system. Two power supplies
are used, One for the drone part and the other for the remote control part. All the equipment
which are to be powered by the battery are linked to the power supply

3.4.2 Control Unit for a drone


This is used to control the operation of the whole system. It is the core of the system’s
functionality. It consists of a microcontroller that guides the movements of a drone depending
on the commands received from the remote control.

15
3.4.3 Control Unit for a Remote Control
This is used to encode all the commands from the joystick unit and the pushbutton unit. The
command that controls the movement of the drone is monitored in this part. It enables a pilot
to decide what to do to his or her drone.

3.4.4 Motor Driver Unit


This part consists of a combination of controllers which are used to govern the speed of
motors used in a system. Each motor must have its own motor driver. These helps to decide
the direction of a drone by varying motor speed.

3.4.5 Motor Unit


This part consists of all motors that are used in a drone. These motors are linked to the
microcontroller through the motor control unit which is used to govern their speed. They
receive power through the motor control unit which is directly connected to the power
supply. This makes the drone fly as the pilot directs them.

3.4.6 Gripper
This part consists of a servo motor which is used to allow the fire extinguisher ball to be
thrown in a place where there is fire. The main function of this part is to hold and release the
fire extinguisher ball when the destination is reached.

3.4.7 Fire Extinguisher unit


This unit is the fire extinguisher part. It comprises a fire extinguisher ball with dry chemical
agents. This ball is released when a drone reaches a place with fire. On coming in contact
with fire the ball bursts and releases the dry chemical agent which puts off fire.

3.4.8 Radio Receiver unit


This unit consists of a radio receiver that receives commands from a transmitter and directs
them to the control unit. This part enhances the wireless communication between the drone
and the remote control.

3.4.9 Radio Transmitter unit


This unit consists of a radio transmitter that sends commands to the receiver to control the
system via wireless communication. This part receives signals which are processed by the
control unit and sends them to the drone where they are received by the radio receiver.

16
3.4.10 Sensing Unit
This part consists of an accelerometer which is used to measure proper acceleration. Also, it
consists of a gyroscope which is responsible for used for measuring or maintaining
orientation and angular velocity. This unit makes sure that the drone remains steady despite
environmental conditions such as wind.

3.4.11 Pushbutton Unit


This part is responsible for extended functions that will be used such as mode switching. It is
found in the remote control part.

3.4.12 Joystick Unit


This part consists of two joysticks. It is found in the remote control part. Joysticks are used to
vary the speed of the motors. They are made of potentiometers thus they can produce pulses
that will be transmitted to the drone thus enabling the variations of the speed

3.5 Features of the Proposed System


This system has the following features.
i. The system will be remotely controlled. No pilot will be onboard as the name
suggests that is Unmanned Aerial Vehicle.
ii. The system will carry a fire extinguisher onboard. The fire extinguisher which will be
used is the dry chemical agent
iii. The system will have a fire fighting ball which will act as the carrier of fire
extinguisher.

3.6 Advantages of the Proposed System


The following are the advantages of the proposed system over the previous system.
i. The system enables easy access to areas with poor infrastructures.
ii. The system simplifies fire fighting at tall buildings
iii. The system reduces risks to firefighters since they stay away from fire.
iv. The system reduces costs of operations

3.7 Evaluation and Expected Outcome


This project is expected to do the following
i. To make a drone that will help in fire fighting
ii. To enable firefighters to extinguish a fire at tall buildings by using a drone
iii. To help firefighters to extinguish fire easily in areas with poor infrastructures

17
3.8 Chapter Summary
This chapter has given details about the contents and parts of the proposed system. It also
explains how the system works by analyzing the function of each block in the system. The
next chapter gives the details about the data collected, which will help verify the existing
problem and the design of the proposed system.

18
CHAPTER FOUR

4 DATA COLLECTION
4.1 Introduction
This chapter contains data that verifies the existence of the claimed problem. Also, it contains
the design requirements information that facilitates the design of the proposed system. These
data guide towards achieving the desired goal as stated by the objectives. They will also help
to generate a complete picture of how the proposed system will solve the problem.

4.2 Data Collected


The types of data collection performed include Primary data collection and Secondary data
collection.

4.2.1 Primary Data Collection


In this method, data were collected from three fire and rescue forces which are Ilala fire and
rescue force, Lugalo fire and rescue force, and Temeke fire and rescue force. These data were
collected through questionnaires and interviews.

4.2.1.1 Data Collected Through Questionnaires


A set of questions were prepared and provided to firefighters at Ilala fire and rescue force,
Temeke fire and rescue force, and Lugalo fire and rescue force. A summary of the findings is
shown in Table 4.1 and Figure 4.1 below

Table 4.2 Summary of the data collected through questionnaire

S/ Question Response
N

Increasing: 15/20
1.
According to your experience, what is the rate of fire Decreasing: 4/20
accidents?
Constant: 1/20

2. What are the fire fighting equipment used in your Fire fighting trucks:
company?
20/20
Dry chemical

19
agent:20/20

Poor infrastructures:
3. What is the main challenge encountered during your fire 10/20
fighting activities? Lack of water: 3/20
Shortage of resources:
4/20
Lack of man
manpower: 3/20

4. What do you think about the ability of your fire fighting Sufficient: 3/20
equipment?
Insufficient: 10/20

Moderate: 7/20

5. Do you think that there is a need for unmanned aerial Yes: 18/20
vehicles in the process of fire fighting?
No: 2/20

6. Which areas do you think will most help? Tall buildings: 10/20

Poor infrastructure:
6/20

Forests: 3/20

Houses: 1/20

7. Do you have any unmanned aerial vehicles in your fire Yes: 0/20
and rescue force?
No: 20/20

4.2.1.2 Bar Graph Representation of Data

A bar graph is a graph that presents categorical data with rectangular bars with heights or
lengths proportional to the values that they represent. There are two types of Bar Graphs
which are horizontal and vertical Bar graphs. In this part, the type of Bar graph used is the
vertical Bar graph based on the amount of data collected.

Below are the Bar graph representation indicating various responses of the respondents on the
questions asked. Three histograms are included in this section. One is for the rate of fire
accidents; another is for the areas where the system will be helpful and the last one is for the

20
main challenges faced during the fire fighting process. The Bar graphs represented below are
for the first, third, fourth, and sixth interview questions.

Question 1 response representation


16

14
Number of respondents

12

10

0
Increasing Decreasing Constant
Rate of accidents

Series 1

Figure 4.4 Rate of fire accidents from day today

21
Question 3 response representation
12

10
Number of respondents

0
Poor infrastruc- Lack of water Shortage of Lack of man
tures resources power
Challenges

Series 1

Figure 4.5 Data concerning challenges encountered in fire fighting

Question 3 response representation


4

3.5
Number of respondents

2.5

1.5

0.5

0
Sufficient Moderate Insufficient
Capacity of equipments

Series 1

Figure 4.6 Data collection on the capacity of fire fighting equip

22
Question 6 response representation
12

10

8
Number of respondents

g s
re
s ts se
s
in tc u res u
ld o o
b ui str
u F H
ll ra
T a inf
o r
Po
Targeted Areas

Series 1

Figure 4.7 Data results on where a drone will help

4.2.1.3 Data Collected Through Interviews

Interviews were done with three Operation Officers and three Planning Officers. In all three
fire and rescue forces, two Officers were interviewed. For each force, one Operation Officer
and one Planning Officer were interviewed making a total of 6 interviewees.

Table 4.3: A summary of data collected through interviews

S/N Question Responses

1. What are the instruments used for fire fighting in Fire tenders with all fire
your fire and rescue force? fighting instruments
onboard

2. How efficient are the above-mentioned instruments 5000 Litres/hour using the
based on capacity and coverage? delivery hall and 1000
L/min with monitor

23
3. What is the most common class of fire encountered Class A, B, and C
in your fire fighting activities?

4. Which areas are hardily accessible using your means Unplanned areas
of fire fighting?

5. What are the reasons for being unable to access those Poor infrastructures: 6/6
areas?
Lack of resources: 6/6

6. Is there any need to have an instrument that will be Yes: 6/6


controlled remotely with a fire extinguisher onboard
No: 0/6
towards an area with fire?

7. Do you have any instrument of that kind? Yes: 0/6

No: 6/6

8. Do you think this instrument will help in your Yes: 6/6


activity?
No: 0/6

4.2.2 Secondary data Collection


Secondary data collection involved the review of written documents and online contents such
as Articles and Journals.
4.2.2.1 Journals Reviewed
The following journals were reviewed about this study
i. Manuj et al. [9] proposed the use of semiautonomous drones for fire fighting
operations rather than putting the life of firefighters at risk. The paper provides
information about improvement on the existing Hexacopter to obtain a stable flight,
gather and store Global Positioning System (GPS) data and perform the auto-landing.
The system was fitted with a fire extinguisher and any such mechanism for fire
fighting operations. Two successive models were made and tested and the results
found have positive outcomes in favor of research.
ii. Abinesh. D. V et al. [10] designed to explore areas hit by fires. The author compared
different configurations of drones and finally selected the quad with an arm length of

24
220 mm, owing to its intuitive simplicity in its manufacturing and cost-effectiveness.
The propeller used is 10 x 4 inches with the idea of improving stability. The materials
of the propeller are chosen to keep in mind the temperature, the drone has to undergo
while it is close to the fire.
4.2.2.2 Articles Reviewed
Below are the articles that were reviewed
i. Burchan et al. [11]demonstrated the use of Drone assisted wildfire-fighting using fire
extinguishing balls as a supplement to traditional firefighting methods. The proposed
system was a hexacopter with a payload weighing 15 kg and balls of weight 0.5kg
each. It consists of scouting unmanned aircraft systems (UAS) to detect spot fires and
evaluating the risk of wildfire approach to the building. It also sends the relative data
of the firefighting UAS to help them to control the situation. However, these balls
were not effective for class A & B fires
ii. Abdulla Al-Kaff et al. [12] developed autonomous UAVs for the critical applications
of forest fire surveillance. Algorithms implemented into the device to perform
surveillance tasks within a specific area, to perform autonomous take-off/landing,
trajectory planning, and fire monitoring. This design is equipped with thermal
cameras, temperature sensors, and communication modules to provide information
about the fire and rep to the Emergency Response Team (ERT).
iii. Dr. Ronald T. et al. [13] discussed the concept and issues related to the unmannedort
aerial systems in the fire service. Emphasis is placed on the airworthiness of the
drone, command, and control of the drones, and crash avoidance. Recommendations
include continued field testing on UASs, surveying fire chiefs to access opinions on
UAS implementation. And coordination between the Federal Aviation Administration
(FAA) and fire chiefs in regulation development on UAS technology use in the fire
service.

4.3 Technical Data


Technical data were deduced to cover the requirements of the design. The data were
generated and compiled through a detailed study on the design and observation of the
existing systems. Various sources were involved, including websites, visiting firefighters,
using technical documents, and other literature.
The following are the design requirements for individual units deduced from data collection

25
4.3.1 Control Unit
The following are the technical data collected concerning the control unit requirements as per
the proposed design and the possible devices which can be used for the control functions are
summarized in Table 4.3 below

Table 4.4 Technical Data for the Control Unit

Parameter Requirement

I/O Pins 20 to 30

Operating Voltage (V dc) Low power operation

Clock Speed High (At least 16MHz)

Flash Program memory 8 to 32 Kilobytes

Temperature Range 15°C to 40°C

ADC 10-bit resolution

Operating Voltage 0V – 5.0V

4.3.2 Sensing Unit


The table below indicates the technical data requirements for the sensing

Table 4.5 Technical Data for the Sensing unit

Parameter Requirement

Sensitivity Very High

Physical Dimensions Small size, Lightweight

Current Low (At most 20mA)

Power Consumption Low

Accuracy Very High

26
Voltage 3V to 5V

4.3.3 Power Supply Unit


The table below indicates the requirements of the power supply unit based on the technical
data that was collected

4.3.3.1 Drone power supply


Table 4.6 Technical Data for the drone power supply

Parameter Requirements

Current High (>60A)

Voltage >11.1V

Number of cells >3 cells

Capacity High (>6000mAH)

Discharge Rate Low

Physical Dimensions Small size, Lightweight (<500g)


4.3.3.2 Remote Control Power Supply
The table below shows the technical data requirements for the remote control power supply
unit based on the data which was collected. The battery which will be used to power the
remote controller is expected to have the features mentioned below. These features are
suitable for choosing a battery that will be able to power a remote controller which will send
all control commands to the drone.

Table 4.7 Technical Data for the Remote-Control power supply

Parameter Requirements

Current Low

27
Voltage 5V to 12V

Discharge Rate Low

Capacity Sufficient

Physical Dimensions Small size, Lightweight

4.3.4 Motor Control Unit


The table below indicates the requirements of the motor control unit based on the technical
data which was collected. All the motor speed controllers to be used will have to meet the
following ranges of requirements for better operation.

Table 4.8 Data requirements for the motor control unit

Parameter Requirement

Output Current High

Input Voltage 5V to 12V

Physical Dimensions Small size, Lightweight

LiPo battery 2 to 4 cells

4.3.5 Motor Unit


The table below shows the motor unit requirements based on the technical data collected.
Each motor is expected to meet the requirements below for better functionality.

Table 4.9 Technical Data Requirement for motor unit

Parameter Requirement

Torque High

Thrust High

28
Weight Low

Size Small

Current High

Power Consumption low

Number of motors 6

4.3.6 Gripper Unit


The table below indicates the technical data requirements for the gripper unit

Table 4.10 Technical Data Requirement for gripper unit

Parameter Requirements

Voltage 3V-5V

Current <20mA

Physical dimensions Lightweight, medium size (Depend on t ball)

4.3.7 Fire Extinguisher Unit


The table below indicates the technical data required for the Fire Extinguishing Unit which
were collected in various articles and observations.

Table 4.11 Technical Data Requirement for Fire Extinguisher Unit

Parameter Requirement

Weight 1.5Kg

Diameter 150mm

Volume 1770

Extinguisher Dry Chemical Agent

29
4.3.8 Joystick Unit
The joystick unit consists of two joysticks which are used to produce various controls for the
drone. The joystick makes an essential part of a remote controller which acts as an input for
the remote controller. The joysticks chosen will have to meet the following requirements
based on the collection of data that was performed.

Table 4.12 Technical Data Requirements for joystick unit

Parameter Requirement

Physical Dimensions Small size, Lightweight

Potentiometer readings 0 to 255

Potentiometer Centre 127

Maximum Resistance 10 kΩ

Minimum Resistance 0 kΩ

4.3.9 Frame of the Drone


The table below shows the requirements for the frame of the drone-based on the technical
data which was collected. The frame of the drone will be used for supporting, holding, and
protecting all the components which will be used in the drone. The requirements for the
frame of the drone de on the specific application for the drone.
Table 4.13 Technical Data Requirements of the Drone Frame

Parameter Requirement

Maximum Frame Weight 1Kg

Materials Carbon Fiber

Maximum Height 40cm

30
Centre Diameter 25cm

End to end pole length 95cm

4.3.10Transmitter Unit
The table below shows the requirements for the transmitter unit based on the technical data
which was collected
Table 4.14 Technical Data Requirement of a transmitting unit

Parameter Requirement

Power Consumption Low

Distance range 1Km

Frequency 2.4GHz

Data Blocks Small

Rate Low

Cost Low

4.3.11 Receiving Unit


This unit consists of a wireless signals receiver. This will receive signals that will be sent by
the transmitter from the remote controller. It will be connected to the control unit of the drone
and will act as the input. All the commands from the remote controller will be converted
from electromagnetic signals into a voltage that will be suitable for the control unit to
process. The table below shows the requirements for the receiving unit

Table 4.15 Technical Data Requirement of a Receiving unit

Parameter Requirement

Power Consumption Low

Distance range 1Km

31
Frequency 2.4GHz

Data Blocks Small

Rate Low

Cost Low

4.4 Chapter Summary


This chapter contains a summary of data collected through various methods. The data
collected in this chapter proves the problem's existence and information on requirements for
various parts of the proposed system. The collected data has been presented in tables and
graphs. The next chapter will involve an analysis of the data collected in this chapter.

CHAPTER FIVE

5 DATA ANALYSIS
5.1 Introduction
This chapter contains an analysis of the data collected. The analysis covers both qualitative
and quantitative analysis. In the design of the proposed system, the use of the design

32
equations wherever necessary has been included in the chapter. Each block of the proposed
system is analyzed and designed individually before being interfaced together to complete the
overall design of the proposed system.

5.2 Sensing Unit


In this project, the sensing unit has the sole responsibility of capturing the acceleration and
the angular displacement of a drone. It consists of an accelerometer for capturing the
acceleration of the drone and a gyroscope for capturing the angular displacement of the
drone. This unit is responsible for stabilizing the drone while it is flying.

Various sensors can be used in this part. Some are analog sensors and others are digital
sensors. Some sensors have combined functions of both the accelerometer and gyroscope.
Analog sensors give an analog signal as the output bin response to the physical quantity
detected while digital sensors give a digital signal output

5.2.1 Analog Accelerometers


The table below shows the list of analog accelerometers with their features [14].

Table 5.16 Specifications of various analog accelerometers

Specificatio ADXL1005BCP ADXL354CEZ ADXL356BEZ ADXL335BCP


ns Z Z-RL7

Sensor Type: 3-axis 3-axis 3-axis 3-axis

Sensing X, Y, Z X, Y, Z X, Y, Z X, Y, Z
Axis:

Acceleration: 100 g 2g to 8g 10 g to 20 g

Sensitivity: 20 mV/g 400 mV/g 80 mV/g 330mV/g

Output Type: Analog Analog Analog Analog

Voltage – 5.25 V 3.6 V 3.6 V 3.6V


Max

Supply 3V 2.25 V 2.25V 1.8V

33
Voltage -
Min

Operating 1 μA 150 μA 150 μA 140μA


Supply
Current
Minimum - 40 C - 40 C - 40 C
Operating
Temperature:
Maximum +125 C + 125 C + 125 C +85 °C
Operating
Temperature:
Cost: 157,730.84 118,304.64 134,723.45 Tshs 21,234.47 Tshs
Tshs

The above sensors are the ADXL series accelerometers. Other ADXL series accelerometers
are ADXL335 with the price of 35,000 Tshs, ADXL326 with the price of 42,000 Tshs, and
ADXL377 with the price of 50,000 Tshs.

5.2.2 Digital Accelerometers


3-Axis Digital Accelerometer is the key part in projects like orientation detection, gesture
detection, and Motion detection. For generous applications that don't require too large a
measurement range, this is a great choice because it's durable, energy-saving, and cost-
efficient [15]. The most common digital accelerometers are the ADXL series accelerometers
which are ADXL313, ADXL362, GY-45 MMA8452, GY-291 ADXL345, MCU-
MMA8452Q. The table below shows the list of digital accelerometers [16].

Table 5.17 Specifications of digital accelerometers

Specification ADXL313 ADXL362 GY-45 GY-291 MCU-


s MMA8452 ADXL345 MMA8452Q

Voltage 3.3V to 5V 2V to 5V 1.95 V to 3.6 4V to 6V 1.95 V to 3.6


V V

34
Current 0.1μA to 10nA to 30 50 μA 40 μA 30 μA
30μA μA
Low noise 250 μg/√Hz 175μg/√Hz 150 μg/√Hz 100 99 μg/√Hz
performance μg/√Hz

Resolution 10-bit 10-bit 10-bit 10-bit 8 to 12-bit


resolution resolution resolution resolution resolution

Cost 36000 Tshs 6000 Tshs 3000 Tshs 6000 Tshs 7000 Tshs

5.2.3 Analog Gyroscope


The table below indicates the analog gyroscopes [17].

Table 5.18 Specifications of analog gyroscopes

Two-axis analog
Specifications 1-axis analog gyro-ENC03
gyro-ENC03

Supply Voltage 2.7V~5.25V 2.7V~5.25V

Max Angular Velocity +/-300 Degree +/-300 Degree

Output (at Angular 1.35 V DC 1.35 V


Velocity=0):

Scale Factor 0.67 mV/deg/sec. 0.67 mV/deg/sec.

Linearity +/-5%; +/-5%;

Cost 18000 Tshs 42000 Tshs

5.2.4 Digital Gyroscopes


The table below shows the list and features of the digital gyroscopes [18]

Table 5.19 Specifications of various digital gyroscopes

3 Axis Digital Gyroscope Grove - 3-axis Gyro based


Specifications
Sensor – L3G4200 on ITG 3200

35
Dimensions 0.5″ × 0.9″ × 0.1″ (13 × 23 × 3 30 ×20 × 10mm
mm)

Weight without header 0.7 g 1g


pins

Operating voltage 2.5 to 5.5 V 3.6V-5V

Supply current 7 mA 100 μA

Output format (I²C/SPI) one 16-bit reading per axis one 16-bit reading per axis

Sensitivity range ±250°/s, ±500°/s, or ±2000°/s ±3000°/s


(configurable)

Cost 15000 Tshs 45000 Tshs

5.2.5 Combination of accelerometer and gyroscope


To combine the two functionalities (accelerometer and gyroscope) an analog sensor called
MPU6050 was developed [19].

Specifications of MPU6050
i. It is a three-axis gyroscope and three-axis accelerometer
ii. Power Supply: 4.3 to 9 V (on-board KB33 low dropout regulator)
iii. Chip built-in 16bit ADC converter, 16-bit data output
iv. Gyroscope Range: +/-250, +/-500, +/-1000, +/-2000 °/s
v. Acceleration Range: +/-2g, +/-4g, +/-8g, +/-16g
vi. Dimensions: 21.2mm (0.84") length x 16.4mm (0.65") width x 3.3mm (0.13") height
vii. Cost: Tshs. 15,000/=

5.2.6 Selected Sensor for the Sensing Unit


In light of the above explanations on the features of various sensors, MPU6050 is chosen to
be used for the sensing unit.
5.2.6.1 Advantages of MPU6050 over other Sensors
The following are the advantages of MPU6050 over other sensors [20]

36
i. It is the world’s first and only 6-axis motion tracking device hence it combines
accelerometer and gyroscope functionalities.
ii. It has a digital Motion Processor (DMP), which has the property to solve complex
calculations.
iii. Reading raw values is easy in MPU6050 compared to the rest.
The figure below shows an MPU6050 with its pins

Figure 5.8 MPU6050 gyroscope and accelerometer sensor

5.3 Motor Unit


The following are the descriptions of the suitable motor based on the previous chapter where
the requirements for the motor were discussed. The choice of the motor depends on the
weight of the drone to be built. The description below illustrates the steps used to obtain the
motor [21].
i. Finding the total weight of the drone
Weight of the drone = Weight of the frame + Weight of the battery + Weight of the
electronics components + Weight of the motors + Weight of the payload
The following data were used based on the data collected from the previous chapter
Weight of the frame = 1Kg (Using carbon fiber materials)
Weight of the battery + Weight of Electronics components + Weight of motors = 1Kg
Weight of the payload = 1.5Kg
Weight of the gripper = 500g
Total weight of the drone=1Kg + 1Kg + 1.5Kg + 0.5Kg = 4Kg
ii. The second step is to multiply the total weight by 3
This is the factor that is multiplied to get the technical weight of the drone
So,
Total Weight = 4Kg × 3 = 12Kg

37
iii. The third step was to divide the total weight by the number of motors to get
thrust which each motor must have
Number of motors = 6
Thrust required for each motor = 12Kg/6 = 2Kg
So, each motor must have the thrust mentioned above

iv. The last step was to choose a motor with above optimum thrust
Based on the data collected in chapter four on the motor unit there are two types of
Brushless dc motor. These are in-runner and outrunner BLDC motors. Outrunner
BLDC motors are the ones whose permanent magnets are placed on the rotor and the
rotor spins on the outside case. On the inside of the motor are the stator windings
which do not rotate, they are fixed in position. In-runner motors refer to the BLDC
motor whose rotor (runner) is inside the stator. Each type can be used based on the
features it possesses and the type of application needed. The table below shows the
comparison of the outrunner and In-runner motors [22]

Table 5.20 Comparison of In-runner and outrunner BLDC motors

Parameter for comparison In-runner Outrunner

Can Diameter Smaller Larger

Can Length Larger Smaller

RPM per Volt Higher Lower

Motor power Lower Higher

Torque Lower Torque Higher Torque

Efficiency Better Better

Heat Dissipation High Low


According to the required properties, outrunner BLDC which has high torque was chosen.
The table below shows a list of outrunner BLDC motors and their specifications [23]

Table 5.21 Specifications of various outrunner motors

38
Parameter 750kV Motor 350kV Motor D2826 1400kV ML2206S
2400Kv

Motor size: 50*10mm 56*27mm 27.5*30mm 27.8*32mm

Propeller 14-16 inches 14-18 inches 8-10 inches 5-8inches

Thrust 2500g 3350g 2000g 1500g

Weight 80g 100g 47g 68g

VK(rpm/v): 750kV 350kV 1400kV 2400kV

Battery: 2-6s Li-Po 4S-6S LiPo 2-3S LiPo 2-3S LiPo

ESC: 20-40A 20-40A 10-30A 30A

Cost Tshs.37,000/= Tshs.45,000/= Tshs.25,000/= Tshs.15,000/=

Based on the table above the motor which was chosen is a 750kV FlyCat high torque BLDC
motor
The figure below shows the flycat 750kV BLDC motor

Figure 5.9 Flycat 750kV outrunner BLDC motor

The propeller which was selected depending on the specifications of the motor from its data
sheet was a 1470 carbon fiber propeller. This means a carbon fiber with a length of 14 inches
and a pitch of 7 inches.

39
Figure 5.10: 14 inches fiber carbon propeller

5.4 Motor Control Unit


This part has the ESC. ESC is characterized by current and was chosen based on the amount
of current withdrawn by each BLDC motor. From the motor specifications, it was observed
that maximum thrust is observed when current 24A and the motor specifications indicate that
its preferable ESC is from 20A to 40A. So the ESC with 30A was chosen for each motor
where it’s the price is Tshs. 20000/=. [24]
The figure below shows a 30A ESC

Figure 5.11 30A Electronic Speed Controller

Specifications of 30A ESC

i. Output: 30A continuous; 40Amps for 10 seconds


ii. Input voltage: 2-4 cells Lithium Polymer / Lithium Iron battery or 5-12 cells NiMH /
NiCd
iii. BEC : 5V, 3Amp for external receiver and servos
iv. Max Speed: 2 Pole: 210,000rpm; 6 Pole: 70,000rpm; 12 Pole: 35,000rpm
v. Weight: 32gms
vi. Size: 55mm x 26mm x 13mm

40
5.5 Gripper Unit
This part will use the servo motor which will enable the holding and releasing of the ball.
There are three types of servo motors based on their capacity namely: micro, standard and
giant. The table below shows the specifications for each servo motor.

Table 5.22 Specifications of various types of servo motors

Parameter Micro servo motor Standard Giant

Dimensions 23mm x 12.5mm x 39.5mm x 20.5mm x 2.6"x 1.2"x 2.3" or 66


30mm 40.7mm x 30 x 58mm

Speed 0.32 oz (9.0 g) 0.20sec/60degree (4.8v); 4.8/6.0v : 0.19 / 0.14


0.16sec/60degree (6.0v) second

Torque 0.3sec/60degree (4.8V) 9.4kg/cm (4.8v); 4.8/6.0v : 275 / 343


11kg/cm (6v) oz.in. or 19.8 / 24.7
kg.cm

Operating 4.2V – 6V 4.8~ 6.6v 4.8~ 6.6v


Voltage

Gear Type Plastic Metal gear Metal

Range 180° 180° 180°

Weight 20g 55g 152 g.

Temperature 0°-55°C 0°-55°C 0°-55°C

Range

Cost Tshs. 15,000/= Tshs. 15,000/= Tshs. 45,000/=

Based on the above table, the type of servo motor which was chosen is the standard servo
motor. This is because the weight of the payload to be carried is 1.3Kg. A suitable servo
motor is chosen based on its capability to withstand the load that will be carried by the
gripper (Robotic-arm). When the load is large and the servo motor is unable to hold it then
the operation of the gripper will fail to carry that load.

41
The figure below shows the standard servo motor which was chosen after the analysis.

Figure 5.12 A standard type servo motor

5.6 Fire Extinguisher Unit


The following are different fire extinguishers and their features.

5.6.1 Water
The following are features of water as a fire extinguisher

i. Very cheap
ii. Almost available in most of the places
iii. Common method of fire fighting

The only thing that excludes it from being used in a fire fighting drone based on the data
collection made in the last chapter is that much amount of water is required with the strongest
outlet pressure hence use of water would require a very large drone.

5.6.2 Fire extinguisher gas tanks


These have the following features

i. Their effective FAFFA


ii. They are simple to use
The only thing that excludes from being used in a fire fighting drone is that when it is
mounted in a drone then a drone needs to be near the fire for the whole period of fire
fighting. This can cause the drone components to be burnt by fire. So this is not a suitable
extinguishing method to be used with drones.

5.6.3 Fire Extinguisher Balls or Fire Bombs


Fire extinguisher balls also called firebombs to have the following features [25]

42
i. They are just thrown from far into the fire
ii. Upon contacting fire, they burst and releases extinguishing agent
iii. They do not require any skills to be operated

This can be used with drones because they do not need a drone to be near the fire but they
have to be thrown into the fire. Their weight, size, and efficiency are favorable for being
carried by a drone.
The table below shows the specifications of a fire extinguisher ball

Table 5.23 Specifications of a fire extinguisher ball

Parameter Value

Capacity 1.25 kg

Diameter 15 cm

Fire Class A, B, C

Material Non-Toxic Mono Ammonium Phosphate

Weight 1.3 Kg

Noise Approximately 138 decibels (When the ball


explodes)

The figure below shows the fire fighting ball that was selected to be used as a method for
extinguishing the fire.

Figure 5.13 A fire extinguisher ball

43
5.7 Control Unit
The control unit is the brain of the system. it is responsible for monitoring all the processes
performed by a drone and issuing appropriate feedback.

The inputs to this unit are the signals from the sensing unit as well as from the receiving unit.
Whereas the outputs are the signals towards the motor control unit and the gripper.

The table below shows the list of the microcontrollers and their specifications [26]

Table 5.24 Various microcontrollers

Specifications ATmega328P PIC17F877a PIC16F887 ATmegal6

ROM (bytes) 32K 256 Bytes 8K 16K

RAM (bytes) 256 368 bytes 2.0.-5.5 1K

I/O pins 28 or 32 40 15000 44

Operating 1.8- 5.5 2.0V to 5.5V 2.0-5.5 2.7-5.5

voltage (V)

Cost 15000 Tsh 15000 Tsh 20000 Tsh 15000 Tsh

Operating Up to 20MHz 20 MHz clock Up to 40MHz 0 — 20

freque ncy

Built-in ADC Present Present Present Present

The selected control unit is the ATMEGA328. This is selected because:

i. It satisfies the requirements as indicated in Table 4.2, it is small in structure and


requires fewer hardware connections compared to the other options.
ii. Furthermore, it has advantages including cost efficiency, low power dissipation, easy
to program, and has a real timer counter with a separate oscillator.
iii. It has the required number of ports for input and output, it operates at a desirable
voltage and it has enough memory for storing the program. Its CPU also operates at a
desirable rate hence it can process all the commands that will be received.

44
The figure shows the pin diagram of the atmega328p

Figure 5.14 Pin configurations of Atmega328p

5.8 Power Supply Unit


This unit is classified into the drone power supply and the remote controller power supply.

5.8.1 Drone Power Supply


The table below shows various batteries which can be used in a drone with their features [27]
regarding the technical data requirements from Table 4.4

Table 5.25 Specifications of various LiPo batteries

Parameter NiCd NiMH LiPo

Energy Density Low Low High

Rated cell voltage 1.2V 1.2V 3V


discharge

Storing Charge level Full 3.85V-3.9V per cell

Weight High High Low

Internal Resistance High High Low

Life Span Long Long Short

45
Based on the above specifications LiPo battery was chosen because it meets the requirements
mentioned in the technical data in Table 4.4 and it has the following advantages over other
batteries.

i. Have large energy density compared to other batteries


ii. Have a lightweight
iii. Have small shape
iv. Good safety performance
v. Small internal resistance
vi. Good discharge characteristics

The following parameters were studied to know the right LiPo battery to be used

i. Finding the total Current of the system


It can be obtained by finding the total current drawn by motors at the maximum
thrust.
According to the datasheet of motors selected in section 5.3 of this chapter. Each
motor withdraws a maximum current of 10A at a required thrust.
Total current withdrawn = 10A × 6 = 60A
Other electronic components will withdraw the current of 1A
Hence Total Current will be 61A

ii. Finding the value of discharge rate (C) of the battery


When this value is low the battery may be damaged easily. On the other hand, large C
batteries are heavy so the optimum one should be obtained. The standard value for
many high-capacity multi-rotor batteries is in the range of 10-15C.
To avoid the heavyweight of the battery we take C=10
iii. Finding the battery capacity
This is measured in mAh. It was obtained from the formula below
Maximum continuous Amp draw (A) = Battery capacity (Ah) x Discharge rate (C)
A 61
Battery capacity = ×1000 mAh = ×1000 mAh = 61000mAh
c 10
iv. Choosing the battery voltage
The datasheet of the motors selected indicates the voltage of the battery required
which is 2S to 4S. 1S means 1cell of the LiPo battery which has a voltage of 3.7V.

46
So, 2S to 4S means 7.4V to 14.8V. A suitable voltage is chosen based on the flight
time of the drone that is required for a corresponding time.
v. Estimating the flight time
The following formula below is used in estimating the flight time
60 c ×V n
T=η× × [1]
1000 4 × P m + Pe
η - efficiency factor that accounts for different sources of energy losses
Its optimal value is 80%
C - the battery capacity (in mAh) which is 6100mAh
Vna - the nominal battery voltage where we choose between 7.4V and 14.8V
Pm - the electrical power (in W) required by each motor at its peak thrust which is
117.66W from the datasheet of the motor
Pe - the electrical power (in W) required by the aircraft electronics. From the sheet of
the boards of each electronic equipment the value of Pm was 0.462W(for nrf24l01) +
0.00013W(for microcontroller) + 5W(For Standard servo motor) + 0.0005W(For
mpu6050) = 5.5W
Substituting all the values into a formula the flight time for 2S (7.4V) was
4.55minutes, for 11.1V was 6.8 minutes and for 14.8V was 9.1 minutes.

vi. Choosing the suitable battery


Based on the calculations which were performed the LiPo battery with 4cells and
6750mAh was chosen. The battery vendors who were found to have better LiPo
batteries are Gens Ace and Tattu.
The price for this battery is Tshs. 165,000/=

The picture below shows the chosen LiPo battery which was chosen

47
Figure 5.15 Gens Ace 14.8V LiPo battery with 6750mAh

5.8.2 Remote Control Power Supply


This unit provides the required electric power to run the remote controller. The power supply
is designed by interfacing a 12V adapter power supply and a voltage regulator. The voltage
regulator circuit is utilized to maintain and stabilize voltage levels required in the different
units that require a voltage lower than 12V.
From the Atmega328p IC datasheet the following ratings and application circuit are given;

i. Input voltage: 5V

ii. Current rating Ic = lA

iii. Output voltage range = Vmax= 3.3V, Vmin= 5V

The figure below shows the battery that was chosen for the remote controller

Figure 5.16: 12V EW battery

48
5.9 Wireless Communication Unit
This part includes both the transmitter and the receiver. Below are the wireless technologies
and their specifications [28].

Table 5.26 Specifications of various wireless technologies

Parameter Wi-Fi Bluetooth LoRa Zigbee nRF24L01

Distance 46m 10m 5Km 300m 1Km

Data rate 54Mbps 2Mbps 27Kbps 250Kbps 250Kbps

Power 100mW 100mW 20mW 31mW 11.3mA


consumption

Modulation QPSK GFSK GBPSK OQPSK GFSK


Considering the above features nRF24L01 transceiver was chosen based on the technical data
requirements for the wireless communication illustrated in Table 4.12 and Table 4.13. Since
it is a transceiver then it is used as both transmitter and receiver.
The following are the advantages of the nRF24L01 transceiver over others.
i. High stability
ii. Low power consumption
iii. Suitable coverage range
iv. It is a transceiver, that is it acts as both the transmitter and the receiver at the same
time.
The figure below shows an nrf24L01 transceiver

Figure 5.17 nRF24L01 with an antenna

49
5.10 Joystick Unit
This consists of the two joysticks. The following are the specifications of the joystick based
on Table 4-10
i. Its cost is Tshs.15000/=
ii. Panel hole size: 39mm
iii. Mounting hole size: 33.5 × 33.5mm
iv. Weight: 19g
v. Channels: 2
The figure below shows the remote control joysticks

Figure 5.18 Remote Controller joystick

5.11 Pushbutton Unit


This unit consists of 4 pushbuttons. The following are the specifications of the pushbutton
which was chosen to be used for the Remote Controller

i. Current: 3A
ii. Opening: 12mm

The figure below shows the pushbutton that was chosen

Figure 5.19 Pushbuttons

5.12 Chapter Summary


This chapter has shown how the data collected for each block or unit has been analyzed either
quantitatively or qualitatively to obtain the appropriate design for each block in the proposed

50
system and overall system design. Simulation of the designed system and the discussion of its
results are explained in the next chapter

51
CHAPTER SIX

6 SYSTEM DESIGN
6.1 Introduction
This chapter explains the system design from the analysed data in Chapter 5, which are
designed according to specification. Power consumption calculations were made to enable
the motors to produce enough thrust for the drone to take off. Also, to allow each unit that
requires power to function as required. The specifications of each device explained in their
respective datasheet were taken into consideration. The system design have two parts as the
block diagram shows namely: Drone part and Remote control part.

6.2 Remote Control Part


Since the drone is UAV then it needs a Remote Control to guide its operations. As shown on
a block diagram, the Remote Control part consists of joystick unit, switching unit, control
unit and the transmission unit.

6.2.1 Joystick unit


Two joysticks will be used which will enable total guidance of all motions of the drone.
Joysticks have two potentiometers, one in the horizontal axis and another in the vertical axis.
Each potentiometer in a joystick will have a specific motion type to control. Joysticks have
two potentiometers in vertical and horizontal plane. In the first joystick, one potentiometer
will be used for the throttle (that will be used to increase the speed of all four motors at the
same time) and the other potentiometer will be used for yaw movement which will allow the
drone to rotate about its axis. On the other joystick there will be one potentiometer for the
roll motion which is side motion and the other potentiometer will be for the pitch which is the
up and down motion about the vertical axis.

6.2.1.1 Operation principle of the joystick

The basic idea of a joystick is to translate the stick’s position on two axes — the X-axis (left
to right) and the Y-axis (up and down) into electronic information. A potentiometer is
connected to each joystick shaft that interprets the position of the rod as analog readings.
Moving the slotted shafts rotates the contact arm of the potentiometer. In other words, if you
push the stick all the way forward, it will turn the potentiometer contact arm to one end of the
track, and if you pull it back toward you, it will turn the contact arm the other way.

52
6.2.1.2 Joystick Configuration

The joystick module has five pins which are explained below.

 GND is the Ground Pin which we connect the GND pin on the Arduino.
 VCC supplies power for the module. You can connect it to 5V output from your
Arduino.
 VRx gives readout of the joystick in the horizontal direction (X-coordinate) i.e. how
far left and right the joystick is pushed. It is connected to the analog input of the
control unit.
 VRy gives readout of the joystick in the vertical direction (Y-coordinate) i.e., how far
up and down the joystick is pushed. It is also connected to the analog input of the
control unit.
 SW is the output from the pushbutton. It’s normally open, meaning the digital readout
from the SW pin will be HIGH. When the button is pushed, it will connect to GND,
giving output LOW.

To get instantaneous voltage when the joystick is moved the formula below is used.

Rin
 Input voltage= × Vtotal
Rtotal
 Example for resistance of 5.1K
Input voltage = (5.1/10) ×5=2.55V

NOTE: The fifth potentiometer was added to control the servo motor that will be used to the
fire extinguishing part.

The figure below shows the joystick circuit diagram.

53
Figure 6.20 Circuit diagram of the two joysticks

6.2.2 Control Unit


The control unit of the remote control will have the atmega328P as it is discussed in the
previous chapter.

6.2.2.1 Atmega328 Pin Configuration

It is a single-chip microcontroller which has 32Kb ISP flash memory with read-while write
capabilities, 1 Kb EEPROM, 2Kb SRAM, 23 general purpose I/O lines, 32 general purpose
working registers, three flexible timers/counters with compare modes, internal and external
interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SOI serial
port, 6-channel 10-bit A/D converter (8-channel in TQFP and QFN/MLF packages),
programmable watchdog timer with internal oscillator, and five software selectable power
saving modes. The device operates between 1.8 - 5.5V.

54
Figure 6.21: ATmega328p pin diagram

6.2.2.2 Pin description


As seen in Figure 6 above, the most pins are multi-functional. Some of the ports allow analog
/ Digital inputs in it. Other ports are used for different functions and one port can carry more
than one function.
Digital
Analog
Programming / debug
Crystal / CLK
Power
Ground

6.2.2.3 Basic Interface


In order for microcontroller to function, it requires an external oscillator to control the
process and speed of the control unit.
From ATmega328p datasheet, Fig 5.2 demonstrations basic interfacing of interface unit and
the crystal oscillator.

Figure 6.22: ATmege328p Basic Interface and configuration

55
As shown in Figure 5.2, C1 and C2 connected to either side of the crystal are parasitic
capacitor,
which assist the crystal oscillator to maintain and optimize electric condition.
Selection of Parasitic Capacitors
The formula may be used to calculate a parallel resonant capacitor
From;
𝐶𝐿 = [(C 1 ×C 2)/ (C 1+C 2)] + 𝐶𝑠𝑡𝑟𝑎𝑦
Where;
𝐶𝐿 Is load capacitance
𝐶𝑠𝑡𝑟𝑎𝑦 Is shunt capacitance of the oscillator.
Now;
Assuming C 1 =C 2= 𝐶 then:
𝐶𝐿 =[C²/2C] + 𝐶𝑠𝑡𝑟𝑎𝑦
𝐶 = 2× (𝐶𝐿 − 𝐶𝑠𝑡𝑟𝑎𝑦)
According to P ATmega328P datasheet load capacitance,
𝐶𝐿 ranges from 12pF to 16pF while
𝐶𝑠𝑡𝑟𝑎𝑦 ranges between 2pF and 5pF.
Selecting 16MHz crystal then 𝐶𝐿 is 15pF.
Then;
𝐶 = 2× (15𝑝𝐹 − 4𝑝𝐹) = 22𝑝𝐹
There value of parasitic capacitor C 1 and C 2 should be 22pF.
Where; 𝐶𝐿 = Load capacitance of stray
𝐶𝑠𝑡𝑟𝑎𝑦 = capacitance at the pins XTAL1 and XTAL2
C 1=C 2 = 𝐶 = Parallel resonant external load capacitors
The ATmega328p is interfaced with an external oscillator and reset button for controlling
how fast the controller work and reset the system. The external oscillator chosen is 16MHz.

6.2.2.4 Reset Pin for control unit


A high logic on this pin for about two machine cycles will reset the device. According to the
circuit above voltage will tends to flow towards the high impedance which is the ground in
this,
case (approximately infinity ohms). LED of green and red color are chosen as indication of
processes within the system Invalid source specified. The mathematical analysis for reset pin
is as follows;

56
Input voltage of the microcontroller, V = 5Volts
For red LED, V LED=1.8V, I LED =20mA
V −V LED
R8 =
I LED
5V −1.8 V
R8 =
20 mA
R8 = 𝟏𝟔𝟎 𝜴
For Green LED, V LED=3.3V, I LED =10mA (from data sheet)
V −V LED
R9 =
I LED
5V −3.3 V
R9 =
10 mA
R9=220 𝜴
The circuit diagram below shows the general configuration of the control unit for the drone.

Figure 6.23: Control Unit Circuit

6.2.3 Transmitting Unit


The selected component to be used for wireless communication was the nrf24l01.

6.2.3.1 Operation Principle Of nrf24l01

The module can use 125 different channels which gives a possibility to have a network of
125 independently working modems in one place. Each channel can have up to 6 addresses,
or each unit can communicate with up to 6 other units at the same time.

57
6.2.3.2 Nrf24l01 Pin Configuration

The nRF24L01 module works with the Arduino through the SPI communication. The pinout
of the module is as follows

Figure 6.24 Nrf24l01 Pinout

 The MOSI, MISO and the SCK are the SPI pins and these needs to be connected to
the SPI pins of microcontroller.
 The CSN and CE are for setting the module in active mode and for switching between
command and transmit mode. These can be connected to any digital pins of Arduino.
 The IRQ pin is the interrupt pin and you don’t have to connect it.

The figure below shows the circuit diagram of the nrf24l01

58
Figure 6.25 The circuit diagram of nrf24l01

6.2.4 Toggle Switches


The remote control will have six channels. Four for the joysticks, two for the toggle switches
and one for the fire extinguishing control.
The two toggle switches will be for the horizontal mode and the angle mode. The two self-
level modes, Horizon and Angle, are very similar but have one main difference. In angle
mode the transmitter’s stick controls the angle of tilt of the drone. When the stick is at its
maximum position the drone will hold a maximum angle of tilt allowed. When you release
the stick back to the center, the drone will follow the stick back to level with the ground.
Horizon mode will keep the drone level when the sticks are centered and it will also allow the
pilot to do flips and rolls when stick is at its maximum position. However, doing flips in
Horizon mode is not fully acrobatic and is sort of like a toy-grade push button flip.
6.2.4.1 Toggle switches working principle

Unlike the ubiquitous button switch which has a switching cycle of OFF-ON-OFF a simple
toggle switch has a switching cycle of OFF-ON or ON-OFF - it will stay in the switch
position until switched again.

59
6.2.4.2 Toggle Switch Pin Configuration

It has three pins. One is VCC which is connected to 5V, the other is the GND pin that is
connected to the ground and the third pin is the accesories pin which is connected to the
digital pins of the microcontroller.

The figure below shows the toggle switch pinout

Figure 6.26 Pin configuration of the toggle switch

6.2.4.3 Toggle Switch Circuit Diagram

The circuit below shows the toggle swich connection to the microcontroller

Figure 6.27 Toggle Switch circuit

6.2.5 The Overall Remote Control Circuit


The figure below shows the overall remote control circuit

60
6.2.6 Conclusion on Remote Control Design
Generally, the remote control will have seven channels rather than six channels which most
of the commercial RC transmitters has. This is designed so that it can accommodate all the
requirements of the fire fighting drone. All the design circuits of the Remote Control
transmitter has been designed using the Fritzing software which was observed to have most
of the required equipments compared to the commonly used Proteus software.

6.3 Drone part


The drone part will consist of the receiver, accelerometer, gyroscope, power supply,
Electronic Speed Controller, Blushless DC motor and the Servo motor for holding and
releasing the ball.

6.3.1 Control unit


In order to increase effectiveness of the drone I will use two microcontrollers. One will be
used for processing results from the receiver and will give output to the Flight Controller.

61
The flight controller will be using the signal received to perform complex calculations for
balancing the motor speeds to get a required motion.

6.3.1.1 Receiving Part Control Unit

This will consist of the atmega328P. The configuration of the Atmega328P are exactly as
explained in the previous section of the control unit for the Remote Control Part. It will have
two external capacitors with 22pF connected to its pins 10 and 9. It will receive 5V power
through pin 7 and pin 8 will be connected to the ground as shown in the figure below.

Figure 6.28 Atmega328P pin configuration

6.3.1.2 Flight Controller

The flight controller is the nerve center of a drone. This will use the Arduino nano, which
uses the Atmega328P chip on board.

Arduino nano pin configuration

The figure below shows pin configuration of Arduino nano

62
Figure 6.29 Arduino Nano pin configuration
The Atmega328P chip within this Arduino nano is the same as the one explained above. This
Arduino Nano is suitable for the flight controller because it will bring the possibility of
having serial communication with the flight controller for some calibrations while the flight
controller is already onboard. This could be done alternatively by using the Atmega328P and
FTDI module but Arduino Nano is simpler and does not require any circuit configurations to
be done for serial communication.

6.3.2 Receiving Unit


This part will use the nrf24l01 which will be connected to the Atmega328P just as discussed
in the transmitting part because the nrf24l01 is the transceiver. The only difference will be
the program code for the transmitter and the receiver which will be uploaded in the control
unit of each. In this project I will use PPM signal where by one output from the receiving unit
will consists of all the 7 channels of data received.

63
The figure below shows the circuit diagram for the receiver

Figure 6.30 Circuit diagram of the receiver

6.3.3 Sensing unit


This will consist of the mpu6050 which is the three axis gyro and accelerometer module.

6.3.3.1 MPU6050 operation principle

 3-Axis Gyroscope

The MPU6050 consist of 3-axis Gyroscope with Micro Electro Mechanical System (MEMS)
technology. It is used to detect rotational velocity along the X, Y, Z axes as shown below

Figure 6.31 Three axis of the gyroscope


When the gyros are rotated about any of the sense axes, the Coriolis Effect causes a vibration
that is detected by a MEM inside MPU6050.

 The resulting signal is amplified, demodulated, and filtered to produce a voltage that
is proportional to the angular rate.
 This voltage is digitized using 16-bit ADC to sample each axis.
 The full-scale range of output are +/- 250, +/- 500, +/- 1000, +/- 2000.

64
 It measures the angular velocity along each axis in degree per second unit.

3-Axis Accelerometer
The MPU6050 consist 3-axis Accelerometer with Micro Electro Mechanical (MEMs)
technology. It used to detect angle of tilt or inclination along the X, Y and Z axes as shown in
below figure.

Figure 6.32 Three axis of the accelerometer


 Acceleration along the axes deflects the movable mass.
 This displacement of moving plate (mass) unbalances the differential capacitor which
results in sensor output. Output amplitude is proportional to acceleration.
 16-bit ADC is used to get digitized output.
 The full-scale range of acceleration are +/- 2g, +/- 4g, +/- 8g, +/- 16g.
 It measured in g (gravity force) unit.
 When device placed on flat surface it will measure 0g on X and Y axis and +1g on Z
axis.
DMP (Digital Motion Processor)

The embedded Digital Motion Processor (DMP) is used to compute motion processing
algorithms. It takes data from gyroscope, accelerometer and additional 3rd party sensor such
as magnetometer and processes the data. It provides motion data like roll, pitch, yaw angles,
landscape and portrait sense etc. It minimizes the processes of host in computing motion
data. The resulting data can be read from DMP registers.

6.3.3.2 MPU6050 pin configuration

MPU6050 pins are as shown in the figure below

65
Figure 6.33 MPU6050 pins
The MPU-6050 module has 8 pins,

 INT: Interrupt digital output pin.


 AD0: I2C Slave Address LSB pin. This is 0th bit in 7-bit slave address of device. If
connected to VCC then it is read as logic one and slave address changes.
 XCL: Auxiliary Serial Clock pin. This pin is used to connect other I2C interface
enabled sensors SCL pin to MPU-6050.
 XDA: Auxiliary Serial Data pin. This pin is used to connect other I2C interface
enabled sensors SDA pin to MPU-6050.
 SCL: Serial Clock pin. Connect this pin to microcontrollers SCL pin.
 SDA: Serial Data pin. Connect this pin to microcontrollers SDA pin.
 GND: Ground pin. Connect this pin to ground connection.
 VCC: Power supply pin. Connect this pin to +5V DC supply.
 MPU-6050 module has Slave address (When AD0 = 0, i.e. it is not connected to Vcc)
as Slave Write address (SLA+W): 0xD0 and Slave Read address (SLA+R): 0xD1
 MPU-6050 has various registers to control and configure its mode of operation. So,
kindly go through MPU-6050 datasheet and MPU-6050 Register Map.

6.3.3.3 MPU6050 Calculations

Note that gyroscope and accelerometer sensor data of MPU6050 module consists of 16-bit
raw data in 2’s complement form. [29]

Temperature sensor data of MPU6050 module consists of 16-bit data (not in 2’s complement
form). [29]

Now suppose we have selected,

66
- Accelerometer full scale range of +/- 2g with Sensitivity Scale Factor of 16,384
LSB(Count)/g.

- Gyroscope full scale range of +/- 250 °/s with Sensitivity Scale Factor of 131 LSB
(Count)/°/s.then,

To get sensor raw data, we need to first perform 2’s complement on sensor data of
Accelerometer and gyroscope.

After getting sensor raw data we can calculate acceleration and angular velocity by dividing
sensor raw data with their sensitivity scale factor as follows,

Accelerometer values in g (g force)

Acceleration along the X axis = (Accelerometer X axis raw data/16384) g.

Acceleration along the Y axis = (Accelerometer Y axis raw data/16384) g.

Acceleration along the Z axis = (Accelerometer Z axis raw data/16384) g.

Gyroscope values in °/s (degree per second)

Angular velocity along the X axis = (Gyroscope X axis raw data/131) °/s.

Angular velocity along the Y axis = (Gyroscope Y axis raw data/131) °/s.

Angular velocity along the Z axis = (Gyroscope Z axis raw data/131) °/s.

Temperature value in °/c (degree per Celsius)

Temperature in degrees C = ((temperature sensor data)/340 + 36.53) °/c.

For example,
Suppose, after 2’ complement we get accelerometer X axes raw value = +15454
Then Ax = +15454/16384 = 0.94 g.

6.3.3.4 MPU6050 Interfacing with Microcontroller

This IC also has SCL SDA, which are I2C pins and XDA and XCL which are auxiliary Serial
pins, we won’t use them with Arduino for this tutorial, we have AD0 which is address select
between Auxiliary and Primary ports, lastly, we have INT interrupt pin,

connections for our Arduino NANO are as following:

VCC - 5v

67
GND - GND

SCL - A5

SDA - A4

(Only SDA and SCL pins change for other Arduino boards)

The circuit diagram below shows how the MPU is connected to the microcontroller.

6.3.3.5 Flight Controller Circuit Diagram

The figure below shows the circuit diagram of the Flight controller

68
Figure 6.34 Flight Controller Circuit

6.3.4 Electronic Speed Controller (ESC)


This is an electronic circuit that controls and regulates the speed of an electric motor. It may
also provide reversing of the motor. The figure below shows the parts of the electronic speed
controller.

Figure 6.35 Parts of Electronic Speed Controller

69
6.3.4.1 ESC Circuit Diagram

On one side the ESC has three wires that control the three phases of the motor and on the
other side it has two wires, VCC and GND, for powering and three wires one for PWM
signal and the other two signals for 5V. The figure below shows the pins of the ESC.

Figure 6.36 ESC pins

6.3.4.2 Working Principle of the ESC

An ESC or an Electronic Speed Controller controls the brushless motor movement or speed
by activating the appropriate MOSFETs to create the rotating magnetic field so that the
motor rotates. The higher the frequency or the quicker the ESC goes through the 6 intervals,
the higher the speed of the motor will be.

Figure 6.37 The illustration of the ESC


However, here comes an important question, and that’s how do we know when to activate
which phase. The answer is that we need to know the position of the rotor and there are two
common methods used for determining the rotor position.

The first common method is by using Hall-effect sensors embedded in the stator, arranged
equally 120 or 60 degrees from each other.

70
Figure 6.38 Hall effect operation
As the rotors permanent magnets rotate the Hall-effect sensors sense the magnetic field and
generate a logic “high” for one magnetic pole or logic “low” for the opposite pole. According
to this information the ESC knows when to activate the next commutation sequence or
interval.
The second common method used for determining the rotor position is through sensing the
back electromotive force or back EMF. The back EMF occurs as a result of the exact
opposite process of generating a magnetic field or when a moving or changing magnetic field
pass through a coil it induces a current in the coil.

Figure 6.39 Back EMF illustration


So, when the moving magnetic field of the rotor pass through the free coil, or the one that’s
not active, it will induce a current flow in coil and as result a voltage drop will occur in that
coil. The ESC captures these voltage drops as they occur and based on them it predicts or
calculates when the next interval should take place.

So that’s the basic working principle of brushless DC motors and ESCs and it’s the same
even if we increase the number of poles of the both the rotor and the stator. We will still have
a three-phase motor, only the number of intervals will increase in order to complete a full
cycle. The full drone configuration will be as shown in the figure below [30]

71
Figure 6.40 The whole arrangement of the drone
All ESCs will be connected to the battery. Their data pins will be connected to the Flight
controller and each ESC will be connected to one BLDC motor. One 5V pin of the ESC will
be used to power the Arduino Nano and MPU6050.

6.3.5 The Fire extinguishing part


This will consist of the servo motor which will be used to hold and release the fire
extinguisher ball.

6.3.5.1 Servo motor working principle


The servo motor has some control circuits and a potentiometer (a variable resistor, aka pot)
connected to the output shaft. In the picture above, the pot can be seen on the right side of the
circuit board. This pot allows the control circuitry to monitor the current angle of the servo
motor.
If the shaft is at the correct angle, then the motor shuts off. If the circuit finds that the angle is
not correct, it will turn the motor until it is at a desired angle. The output shaft of the servo is
capable of traveling somewhere around 180 degrees. Usually, it is somewhere in the 210-
degree range, however, it varies depending on the manufacturer. A normal servo is used to
control an angular motion of 0 to 180 degrees. It is mechanically not capable of turning any
farther due to a mechanical stop built on to the main output gear. The power applied to the
motor is proportional to the distance it needs to travel. So, if the shaft needs to turn a large

72
distance, the motor will run at full speed. If it needs to turn only a small amount, the motor
will run at a slower speed. This is called proportional control.
The control wire is used to communicate the angle. The angle is determined by the duration
of a pulse that is applied to the control wire. This is called Pulse Coded Modulation. The
servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of the pulse will
determine how far the motor turns. A 1.5 millisecond pulse, for example, will make the
motor turn to the 90-degree position (often called as the neutral position). If the pulse is
shorter than 1.5 milliseconds, then the motor will turn the shaft closer to 0 degrees. If the
pulse is longer than 1.5 milliseconds, the shaft turns closer to 180 degrees. [31]

Figure 6.41 Servo motor position and the pulses

6.3.5.2 Servo motor pin configuration

Servo motors typically have three connections and are as follows:

Figure 6.42 Servo motor pinout

73
 GND is a common ground for both the motor and logic.
 5V is a positive voltage that powers the servo.
 Control is input for the control system. It is connected to the PWM pin of the flight
controller.

6.4 Chapter Summary


This chapter explains in detail how the system is designed. Several devices and components
were used to design the Afya vest system. The design included the design for all blocks of
the system both the remote control part and the drone part. The design has been done block
by block where all the circuit configurations has been designed. The next chapter will include
the circuit simulation of all the parts of the system.

74
CHAPTER SEVEN

7 SIMULATION AND DISCUSSION


7.1 Introduction
This chapter explains the simulation of the system using a software environment. The
environment simulates the real-world inputs and gives preliminary debugging of the system
before implementing the hardware prototype. The stimulating tools, test vector, procedures,
and results are discussed.

7.2 Simulation Tools


The simulation tool used in this project included Proteus 8 Professional. The foundation
circuit was designed in proteus, so it was convenient to simulate many parts in the software.
Also, Proteus is rich in libraries of a variety of electronic components and modules. The
software can be used to generate Gabber files for PCB design. Some parts were not found in
proteus so they were replaced by other parts belonging to the same family.

7.3 Simulation Environments


Some real-world signals are challenging to simulate in the software; hence the following
were adopted signal generators used to simulate various sensing units:

i. nrf24l01 simulation. The nrf24l01 was replaced by rf module which operates at


433MHz. It is the similar wireless communication module to nrf24l01 except that it
has lower range
ii. Each joystick is represented by two potentiometers.
iii. L293D was used instead of ESC but it produces PWM signals just as the ESC.
iv. Brushed DC motors was used instead of blushless DC motor. Their control is nearly
equal and they both use PWM signal.

7.4 Simulation of the Joystick unit

The joysticks will have two potentiometers each. 10K potentiometer will be used. The
potentiometers will have the following values.

Input voltage=(Rin/Rtotal)*Vtotal
Analog value=(input voltage/Vtotal)*255
Example for resistance of 5.1K

75
Input voltage=(5.1/10)*5=2.55V
Analog value=(2.55V/5V)*255=130.0
The figure below shows the simulation of the joystick unit

Figure 7.43 The simulation results for the joystick unit


The table below shows the simulated and calculated values

Table 7.27 Simulated and calculated values


Calculated Values Simulated values

R V THRO THRO

TTLE YAW PITCH ROLL SERVO TTLE YAW PITCH ROLL SERVO

0K 0 0 0 0 0 0 0 0 0 0 0

2.5K 1.2 63.75 63.75 63.75 63.75 63.75 63 63 63 63 63


5

7K 3.5 178.5 178.5 178.5 178.5 178.5 178 178 178 178 178

10k 5 255 255 255 255 255 255 255 255 255 255

7.5 Simulation of the motor unit


Motors are controlled by the PWM signal received from the receiver. This is done via the
motor speed controller. Motor speed controllers are connected to Arduino Nano PWM pins

76
which are digital pins 3,5,6,9,10,11. Speed controller used is the L293D. Its enable pin is
connected to the PWM pins mentioned above. One L293D can carry 2 motors

PWM is a way to control analog devices with a digital output. The figure below shows the
motor unit simulation. The figure shows the PWM results.

Figure 7.44 Motor connetions


The figure below shows the simulation results in form of pulses

Figure 7.45 Simulation results of the motor unit

77
7.6 Overall Simulation results
The system was simulated with all the blocks and the following results were observed.

Figure 7.46 The overall circuit simulation

78
CHAPTER EIGHT

8 PROTOTYPE IMPLIMENTATION
This chapter discusses the implemented Fire fighting drone. Methods used to build the
prototype are given step by step, including translating schematic diagrams to PCB layout
using CAD tools, online interface realization, and client connection to the system. The
chapter also examines the outcomes of testing on the prototype by a selected test vector.
Failures and Successes of the final prototype are discussed.

The system was tested on the pitch at DIT, and the outcomes are explained. Where necessary,
comments are given.

8.1 Prototype Development


This section explains various components and tools used to develop the prototype. The
components replace simulation tools to bring a real-world working Fire fighting drone.
Hardware development, including PCB layout and laying components, is explained, the
software platform is also presented as a whole.

8.1.1 Breadboard Testing


After the previous chapter of simulation, the first thing that was done before making a Fire
fighting drone was to test the circuit on the breadboard. The components were arranged on
the breadboard exactly as the circuit diagrams were shown in chapter six of system design.
This was done so that to make sure that the circuits works perfectly and each equipment
operates well as required and as observed during simulation.

8.1.1.1 Breadboard Overview

Breadboard is a rectangular plastic board with a bunch of tiny holes in it. These holes let you
easily insert electronic components to prototype (meaning to build and test an early version
of) an electronic circuit. The connections are not permanent, so it is easy to remove a
component if you make a mistake, or just start over and do a new project. This makes
breadboards great for testing circuits.

The figure below shows the breadboard connections.

79
Figure 8.47 Breadboard connections
The top and bottom strips (horizontally connected pins) are usually used for power and
ground. The central (vertically connected pins) are used for components.

8.1.1.2 Breadboard test for the remote control transmitter

The first part that was tested is the remote control transmitter. All the components for the
remote were assembled on the breadboard. The microcontroller was programmed using
Arduino platform and the results were observed on the serial monitor which a special tool for
observing results in Arduino.

NOTE:

Before the Atmega328P was used it had to be bootloaded so that it can be programmed. Any
new atmega328P must be bootloaded to activate its memory for the programmes that will be
uploaded in it. The figure below shows how the atmega328P was bootloaded using Arduino
uno.

Figure 8.48 Bootloading an atmega328P using arduino UNO

80
The circuit below was used for bootloading an atmega328P

Figure 8.49 Bootloading circuit


After bootloading the atmega328P chip was placed on Arduino UNO and programmed with
the transmitter code. The figure below shows the breadboard testing of the Remote Control
Transmitter and the receiver.

Figure 8.50 Breadboard testing of the transmitter and the receiver

81
The results were observed in the serial monitor as shown below

Figure 8.51 Serial Monitor test results


The values on the serial monitor were responding exactly as the transmitter joysticks were
being varied. This showed that the transmitter works fine on the breadboard and could then
be printed on the PCB.

8.1.1.3 Breadboard testing of the flight controller

The flight controller was also tested on the breadboard and the results were observed by using
a special software called MULTIWII which is a platform for testing the working of the flight
controller.

Figure 8.52 Flight controller test on the breadboard


The results were observed as shown on a figure below

82
Figure 8.53 Observing results on the multiwii platform
After testing on the breadboard and observing that the whole system works fine then I had to
continue with the next steps towards accomplishing the project prototype which were the
PCB etching.

8.1.2 PCB Etching


is one of the most important elements of the PCB manufacturing process. It involves
removing copper from the surface of the PCB in order to reveal the desired circuit pattern.
During the PCB etching process, all copper is removed except for the circuitry that is
masked.
In this step three circuits were produced which are the Remote Control Transmitter circuit,
the receiver circuit and the flight controller.

The following were the procedures which were followed in PCB etching to produce the
desirable circuit which would be used in the prototype.

83
8.1.2.1 PCB layout design
The PCB layouts of all the circuits were designed by using the Fritzing software. This
software was used because it is simple to use and has almost all the required components
present in the circuit diagrams.
The following are the PCB layouts that were designed

Figure 8.54 PCB layout for the RC transmitter

Figure 8.55 The PCB layout for drone receiver

84
Figure 8.56 PCB layout for the flight controller

8.1.2.2 Pdf Files for each layout

After designing the PCB layouts, the next step was to make a pdf file for each layout. The
figure below shows the pdf of the three PCB layouts which were prepared using Fritzing
software.

Figure 8.57 PDF file for the transmitter

85
Figure 8.58 PDF file for the receiver

Figure 8.59 PDF file for the flight controller

8.1.2.3 Printing the PDF files and ironing them to the PCB board

After extracting the pdf files, they were printed on the hard papers using the laser jet printer
and they were transformed to the PCB board by using an iron. Ironing process took 10 to 15
minutes for the circuit to be completely transferred.

86
Figure 8.60 A circuit that was transfered to the PCB board

8.1.2.4 Etching

After transferring the circuits to the PCB board the next step was etching of the circuits.
Vinegar, Hydrogen Peroxide, Salt and water were used in etching process. These were found
to be the chemicals that are easily available in my area. These made etching easy at home.
The same amount of the hydrogen peroxide and vinegar (30mls) was poured into the
container and salt (half of the tea spoon) was added to the mixture. Little water was added
and the mixture was stirred. After about ten minutes the unwanted copper had been etched
and the masked part which is the circuit diagram part remained. The figure below shows how
etching was done.

87
Figure 8.61 Equipments that were used in etching

Figure 8.62 Etching the circuit

The PCB circuit was taken from the solution and was cleaned. The resulting circuit was as
shown below

Figure 8.63 The etched circuit on PCB board

88
8.1.2.5 Soldering of the components

After etching the components were soldered on the PCB circuit. The figure below shows the
soldered components on the PCB circuit.

Figure 8.64 Soldering components on the RC transmitter

Figure 8.65 The soldered components on the Receiver and the flight controller

8.1.2.6 Mounting the circuits on the component box

The circuits were then placed in the component box and their operation were tested to
observe their operation. The figure below shows the mounting of the flight controller and the
Remote Control Transmitter.

89
Figure 8.66 Inside and outside view of the remote control transmitter

The figure below shows the inside and the outside view of the receiver and the flight
controller which were mounted on the frame of the drone.

Figure 8.67 The receiver and the flight controller mounted on the drone frame

8.1.2.7 ESC calibrations

All the ESCs were calibrated to the pulses with time from 1000ms minimum to 2000ms
maximum. This was done by using the ESC calibration codes and the circuit diagram that
was designed in the system design chapter. The figure below shows the calibration of the
electronic speed controller.

90
Figure 8.68 Calibration of the electronic speed controller

8.1.3 Building a Drone Frame


The type of the drone that is designed is the Quadcopter. This means it will have four motors
as discussed in the design part. There are four commonly used types of quadcopter frames
that can be made as shown below [32].

Figure 8.69 Various Quadcopter designs

91
The type of frame that was chosen in this project is the Quad V. This is due to the thickness
of load that will be carried below the quadcopter frame.
The materials which are suitable for the drone frame are the aluminium and the fiber carbons
since they are light and strong. In this drone frame the materials used were the aluminium
materials and the card boards. The dimensions which were used are as shown below
 The length of each arm from the point of contact with the frame was 18cm
 The length of the cardboard was 23cm and its width was 14cm.
 The height of the drone was 33cm
 The length of the drone frame was 48cm
 The width of the drone frame was 40cm
The figures below shows various views of the drone frame.

92
Figure 8.70 The Fire fighting drone prototype

8.2 Chapter Summary


This chapter has explained the prototype implementation and testing. The results from the
prototype show that specific objectives have been achieved and hence the project's main
objective. The results imply that the prototype implemented is performing well. The next
chapter concludes the project and summarises what has been done and achieved throughout
the project.

93
CHAPTER NINE

9 CONCLUSION AND RECOMMENDATION


9.1 Introduction
This is the last chapter of this project report which gives general information on what was
done to achieve and accomplish the final task of the project. It includes a brief overview of
every chapter discussed and recommendations.

9.2 Conclusion
The report covered the design of the fire fighting drone. Preliminary information such as the
existence of the problem, Fire fighting methods being used currently, and various related
literature reviews from previous researches were discussed. The proposed design, its general
functionality, and the function of each block have also been discussed. The collected data
were analysed and helped in the design of the system. By using various simulation tools, the
system was simulated, and finally, a prototype was implemented.

After designing, the developed prototype was tested according to the test vector put forth and
it worked as the design specification required. The test included flying a drone and observing
the controller outputs, accelerometer outputs. There were more than one test that was done
both indoor and outdoor and finally the system worked after many observations and
corrections. One of the motor was damaged and hence until the time of writing it had not
arrived so instead of building a hexacopter, a quadcopter was built. This reduced the thrust of
the motors but the objective was archieved by using the quadcopter.

The drone test was done at DIT football ground as a safe outdoor experiment and it was seen
to fly well and to drop the fire extinguisher ball well. All the specific objectives were met as
a result the main objective was met also.

This design has targeted to bring advancement in fire fighting to help fire and rescue forces in
their fire fighting activities. The designed system is simple to control and can carry other
important equipments such as camera for recording purposes. This system will add essiciency
to the fire fighting activities. This project will bring future smart technologies into reality in
our country.

94
9.3 Recommendation
The system was designed under budget consideration, so it focused on carrying only one fire
extinguisher ball. For more functionality large torque motors, large propellers and high
capacity Electronic Speed Controllers can be used so that more than one fire extinguisher ball
is carried. Also, other equipments such as camera can be added for recording events,
Temperature sensor can be added for increasing a heat sensing functionality and many more
other sensors can be added onboard. There must be a need to overcome budget constraints as
the design has to use better materials made from nanotechnologies and miniaturization of
sensing units.

More advancement of this project can lead to more functionality. It is good to know that
rather than the fire fighting functionality of this drone the drone can also have many more
other functionalities.

95
REFERENCES

[1] [Online].Available: https://www.sc.edu/ehs/training/Fire/08_howto.htm#:~:text=It's


%20easy%20to%20remember%20how,you%20to%20discharge%20the
%20extinguisher.. [Accessed 20 November 2021].

[2] [Online].Available:https://www.safelincs.co.uk/fire-extinguisher-types/#:~:text=The
%20six%20main%20fire%20extinguisher,suitable%20for%20different%20fire
%20classes.. [Accessed 3 November 2021].

[3] “Dun and bladstreet,” [Online]. [Accessed 15 November 2021].

[4] “Global Tenders,” [Online]. Available: https://www.globaltenders.com/tenders-


tanzania/tanzania-fire-safety-security-tenders.php. [Accessed 15 November 2021].

[5] “Askingot,” [Online]. Available: https://askinglot.com/how-many-gallons-of-water-


does-a-fire-truck-hold. [Accessed 15 November 2021].

[6] “Luxfer,” [Online]. [Accessed 18 November 2021].

[7] “Nevon projects,” [Online]. Available: https://nevonprojects.com/diy-fire-extinguisher-


drone-fire-fighting-drone/. [Accessed 15 November 2021].

[8] “Elide Fire,” April 2016. [Online]. Available: https://www.elidefire.fr/home. [Accessed


2021 November 30].

[9] M. C., “Design and Development of Semi-Autonomous Fire Fighting Drone,” IOSR
Journal of Mechanical and Civil Engineering (IOSR-JMCE), pp. 44-47, 2019.

[10] D. C. G. A. K. Abinesh.D.V, “FIRE FIGHTING DRONE,” International Journal of


Innovative and Emerging Research in Engineering, vol. IV, no. 1, pp. 212-214, 2017.

[11] E. S. J. T. a. M. J. S. Burchan Aydin, “Use of Fire-Extinguishing Balls for a Conceptual


System of,” pp. 1-2, 2019.

[12] A. A, Á. M, S. C, F. G, D. M and Arturo, “Emergency Support Unmanned Aerial


Vehicle for Forest Fire Surveillance,” pp. 1-15, 4 February 2020.

[13] D. R. T. W. &. D. J. C. Griffith, “Unmanned Aerial Systems in the Fire Service:

96
Concepts and Issues”.

[14] G. L, T. Béteille and B. F, “Comparison between analog and digital neural network
implementations for range-finding applications,” pp. 460-470., 2009.

[15] “Seed,” Seeed Technology Co. Ltd, 2008. [Online]. Available:


https://wiki.seeedstudio.com/Grove-3-Axis_Digital_Accelerometer-1.5g/.

[16] M. J, “Accelerometer technologies, specifications, and limitations,” Internationational


Conference on Ambulatory Monitoring and Physical Activity Measurement, pp. 17-19,
2013.

[17] “Analog Devices,” [Online]. Available: https://www.analog.com/en/products/sensors-


mems/accelerometers.htm. [Accessed 3 January 2022].

[18] Balachandran, . G. K, V. P. Petkov and T. , “A 3-axis gyroscope for electronic stability


control with continuous self-test.,” IEEE Journal of Solid-State Circuits, vol. 1, no. 51,
pp. 177-186, 2015.

[19] F. D, Y. I. A and Z. A, “Using of measuring system MPU6050 for the determination of


the angular velocities and linear accelerations,” Automatics & Software Enginery , vol.
1, no. 11, pp. 75-80, 2015.

[20] “Description and questions,” Robotic company, [Online]. Available:


https://www.generationrobots.com/en/402159-mpu-6050-3-axis-gyro-and-
accelerometer-module.html. [Accessed 12 January 2022].

[21] K. K. S. Vimalkumar. R, “Design and Development of Heavy Drone for fire fighting
operations,” International Journal of Engineering Research & Technology (IJERT),
vol. 10, no. 3, pp. 572-576, 2018.

[22] “Brushless Inrunner vs Outrunner motor,” [Online]. Available:


https://www.radiocontrolinfo.com/brushless-inrunner-vs-outrunner-motor/. [Accessed
14 January 2022].

[23] [Online]. Available: https://www.banggood.com/buy/flycat-motor.html. [Accessed 24


January 2022].

[24] [Online]. Available: https://www.amazon.com/RC-Brushless-Electric-Controller-

97
bullet/dp/B071GRSFBD. [Accessed 23 January 2022].

[25] [Online]. Available: https://www.capitalsolutions.pk/advantages-of-fire-extinguisher-


ball/. [Accessed 26 January 2022].

[26] [Online]. Available: https://en.wikipedia.org/wiki/ATmega328. [Accessed 27 January


2022].

[27] [Online]. Available: http://www.farnell.com/datasheets/1754479.pdf. [Accessed 28


January 2022].

[28] [Online]. Available: https://www.watelectronics.com/different-types-wireless-


communication-technologies/. [Accessed 29 January 2022].

[29] “Electronics wings,” [Online]. Available: https://www.electronicwings.com/sensors-


modules/mpu6050-gyroscope-accelerometer-temperature-sensor-module. [Accessed 20
May 2022].

[30] [Online]. Available: http://electronoobs.com/eng_robotica_tut5_1.php. [Accessed 22


May 2022].

[31] [Online]. Available:


https://www.tutorialspoint.com/arduino/arduino_servo_motor.htm#:~:text=A%20Servo
%20Motor%20is%20a,angular%20position%20of%20the%20shaft.. [Accessed 22 May
2022].

[32] [Online]. Available: https://stock.adobe.com/images/motor-order-diagrams-of-the-quad-


drone-or-quadcopter-set-of-vector-infographics-of-airframes-and-types-quad-x-quad-h-
quad-v-and-quad-p/243287639. [Accessed 2 June 2022].

[33] Solon Ohio, “City of solon,” [Online]. Available: https://www.solonohio.org/203/Fire-


Trucks.

[34] “Wikipedia,” [Online]. Available: https://en.wikipedia.org/wiki/Fire_extinguisher.

[35] HIMAX, [Online]. Available: https://himaxelectronics.com/8-advantages-of-lithium-


polymer-batteries/. [Accessed 2019].

[36] [Online]. Available: https://www.aliexpress.com/item/4000164264475.html?


spm=a2g0o.productlist.0.0.502d2bfczT17Dl&algo_pvid=0e57b686-424c-4a08-bf13-

98
5f6dea302d74&algo_exp_id=0e57b686-424c-4a08-bf13-5f6dea302d74-0&pdp_ext_f=
%7B%22sku_id%22%3A%2210000000546188164%22%7D&pdp_pi=-1%.

[37] “Specifications,” Aliexpress, [Online]. Available: https://www-frf-go-


tz.translate.goog/matumizi-sahihi-ya-mitungi-ya-kuzimia-moto/?
_x_tr_sl=sw&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc.

[38] [Online]. Available: https://www.worldlifeexpectancy.com/tanzania-


fires#:~:text=According%20to%20the%20latest%20WHO,Tanzania%20%2323%20in
%20the%20world.. [Accessed 3 November 2021].

[39] Maxim Integrated, “EE-Sim OASIS Simulation Tool,” [Online]. Available:


https://www.maximintegrated.com/en/design/design-tools/ee-sim-design-simulation-
tool/oasis.html. [Accessed 20 01 2021].

[40] T. Hopwood, “Tutorial: Create and run an IoT device simulation,” 08 03 2019.
[Online]. Available: https://docs.microsoft.com/en-us/previous-versions/azure/iot-
accelerators/iot-accelerators-device-simulation-create-simulation. [Accessed 22 01
2021].

APPENDIX 1
DATA COLLECTION FILES

A1.1 Interview Questions Sample


The interviewer used the form below to ask the questions to the firefighters.

DAR ES SALAAM INSTITUTE OF TECHNOLOGY

DEPARTMENT OF ELECTRONICS AND TELECOM ENGINEERING

99
INTERVIEW QUESTIONS

Name of the Institution: …………………………………………………………..


……………..

Interviewee name: ………………………………….. Position ………………………………..

1. What are the instruments used for fire fighting in your fire and rescue force?
Answer ………….………………………………………………………………………
2. How efficient are the above-mentioned instruments based on the following

perspectives?

Instrument Distance Capacity of


Coverage working

3. What is the most common class of fire encountered in your fire fighting activities?
Answer ………….………………………………………………………………………
4. Which areas are hardily accessible using your means of fire fighting?
Answer ………….………………………………………………………………………
5. What are the reasons for being unable to access those areas?
Answer ………….………………………………………………………………………
…………….....………………………………………………….………..
…………………
6. Is there any need to have an instrument that will be controlled remotely with a fire
extinguisher onboard towards an area with fire? Put a tick on a respective answer.
Answer: Yes No
7. Do you have any instrument of that kind?
Answer: Yes No

8. How do you think this instrument will help in your activity?

100
Answer: …………….....………………………………………………….………..
…………………
…………….....………………………………………………….………..
…………………
…………….....………………………………………………….………..
…………………

A1.2 Questionnaire Sample

TAASISI YA TEKNOLOJIA DAR ES SALAAM

IDARA YA ELEKTRONIKI NA MAWASILIANO ANGA

UKUSANYAJI WA DODOSO KUHUSU MAPAMBANO DHIDI YA AJALI ZA MOTO

UTANGULIZI

Karatasi hii imeandaliwa kwa malengo ya kupata taarifa mbalimbali kuhusu ajali za moto na
upambanaji wake. Ikijibiwa kwa usahihi itasaidia kupata taarifa bora zitakazosaidia katika
utatuzi wa changamoto hizo za ajali za moto.

101
Jina: …………………………… Kampuni: ……………………………..

Nafasi: ………………………… Jinsia: ME KE

Umri: ………………………….. Miaka ya uzoefu katika kazi: ……………

Kwa kufuata maelezo katika kila sehemu, jibu maswali yafuatayo

S/N Swali Jibu

1. Kulingana na uzoefu wako wa kazi, idadi ya ajali za moto ikoje


kadili miaka inavyoongezeka? (A:Inaongezeka, B:Inapungua, C:
Inabaki palepale)

2. Taja vifaa mnavyotumia kuzima moto katika kampuni lako

3. Changamoto zipi kubwa mnazokutana nazo wakati wa kuzima


moto hususani pale ajali zinapotokea kwenye majengo marefu na
katikati ya misiti

4. Nini sababu za changamoto hizo?

5. Je, unadhani kwamba kuna uhitaji wa kuwepo kwa kifaa chenye


uwezo wa kubeba vifaa vya kuzima moto kisichohitaji rubani awe
ndani yake. (Jibu Ndiyo au Hapana)

6. Toa sababu za jibu ulilotoa hapo juu hapo juu

7. Ni maeneo gani ambayo unahisi kifaa hicho kitasaidia?

102
A1.3 Interview Responses
The attached documents below are the responses to interviews done at Ilala and
Lugalo fire and rescue forces

103
104
105
106
107
108
109
A1.3 Questionnaire responses
The attached documents below are the responses to the Questionnaire done at
Ilala and Lugalo fire and rescue forces

110
111
APPENDIX 2
PROGRAMS CODES
The codes used are Arduino based codes which uses both C and C++ programming
languages.

A2.1 Transmitter Codes


/*Remote Control Transmitter codes prepared by Victor MOshi Lugaza*/
/*A basic 4 channel transmitter using the nRF24L01 module.*/
/*
/* First we include the libraries. Download it from
my webpage if you donw have the NRF24 library */
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
/*Create a unique pipe out. The receiver has to
wear the same unique code*/
const uint64_t pipeOut = 0xE8E8F0F0E1LL; //IMPORTANT: The same as in the
receiver
RF24 radio(9, 10); // select CSN pin
// The sizeof this struct should not exceed 32 bytes
// This gives us up to 32 8 bits channals
struct MyData {
byte throttle;
byte yaw;
byte pitch;
byte roll;
byte AUX1;
byte AUX2;
byte AUX3;
};
MyData data;
void resetData()
{
//This are the start values of each channal
// Throttle is 0 in order to stop the motors
//127 is the middle value of the 10ADC.
data.throttle = 0;
data.yaw = 127;
data.pitch = 127;
data.roll = 127;
data.AUX1 = 0;
data.AUX2 = 0;
data.AUX3 = 0;
}
void setup()
{
//Start everything up
radio.begin();
radio.setAutoAck(false);
radio.setDataRate(RF24_250KBPS);
radio.openWritingPipe(pipeOut);
resetData();

112
}
/**************************************************/
// Returns a corrected value for a joystick position that takes into
account
// the values of the outer extents and the middle of the joystick range.
int mapJoystickValues(int val, int lower, int middle, int upper, bool
reverse)
{
val = constrain(val, lower, upper);
if ( val < middle )
val = map(val, lower, middle, 0, 128);
else
val = map(val, middle, upper, 128, 255);
return ( reverse ? 255 - val : val );
}

void loop()
{
// The calibration numbers used here should be measured
// for your joysticks till they send the correct values.
data.throttle = mapJoystickValues( analogRead(A0), 0, 585, 1024, true );
data.yaw = mapJoystickValues( analogRead(A1), 0, 575, 1024, true );
data.pitch = mapJoystickValues( analogRead(A2), 0, 580, 1024, true );
data.roll = mapJoystickValues( analogRead(A3), 0, 585, 1024, true );
data.AUX1 = digitalRead(4); //The 2 toggle switches
data.AUX2 = digitalRead(5);
data.AUX3 = mapJoystickValues( analogRead(A4), 34, 522, 1020, true );
radio.write(&data, sizeof(MyData));
}
A2.1 Receiver Test codes
/*Written by Victor Moshi Lugaza*/
/* Test code for the Radio control transmitter
Insta?/ this code to the Arduino UNO
Connect a NRF24 module to it:
Q
Module // Arduino UNO

GND ->cxbg GND


Vcc -> 3.3V
CE -> D9
CSN -> D10
CLK -> D13
MOSI -> D11
MISO -> D12

This code should print the received values to the serial monitor
Please, like share and subscribe : https://www.youtube.com/c/ELECTRONOOBS
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
const uint64_t pipeIn = 0xE8E8F0F0E1LL; //Remember that this code is the
same as in the transmitter
RF24 radio(9, 53);
//We could use up to 32 channels
struct MyData {

113
byte throttle; //We define each byte of data input, in this case just 6
channels
byte yaw;
byte pitch;
byte roll;
byte AUX1;
byte AUX2;
byte SERVO;
};
MyData data;
void resetData()
{
//We define the inicial value of each data input
//3 potenciometers will be in the middle position so 127 is the middle
from 254
data.throttle = 0;
data.yaw = 127;
data.pitch = 127;
data.roll = 127;
data.AUX1 = 0;
data.AUX2 = 0;
data.SERVO = 0;
}
/**************************************************/
void setup()
{
Serial.begin(250000); //Set the speed to 9600 bauds if you want.
//You should always have the same speed selected in the serial monitor
resetData();
radio.begin();
radio.setAutoAck(false);
radio.setDataRate(RF24_250KBPS);

radio.openReadingPipe(1, pipeIn);
//we start the radio comunication
radio.startListening();
}
/**************************************************/
unsigned long lastRecvTime = 0;

void recvData()
{
while ( radio.available() ) {
radio.read(&data, sizeof(MyData));
lastRecvTime = millis(); //here we receive the data
}
}
/**************************************************/
void loop()
{
recvData();
unsigned long now = millis();
//Here we check if we've lost signal, if we did we reset the values
if ( now - lastRecvTime > 1000 ) {
// Signal lost?
resetData();
}

114
Serial.print("Throttle: "); Serial.print(data.throttle); Serial.print("
");
Serial.print("Yaw: "); Serial.print(data.yaw); Serial.print("
");
Serial.print("Pitch: "); Serial.print(data.pitch); Serial.print("
");
Serial.print("Roll: "); Serial.print(data.roll); Serial.print("
");
Serial.print("AUX1: "); Serial.print(data.AUX1); Serial.print("
");
Serial.print("Aux2: "); Serial.print(data.AUX2); Serial.print("
");
Serial.print("SERVO: "); Serial.print(data.SERVO);
Serial.print("\n");
}
/**************************************************/
A2.3 Receiver Codes
/*
PPM receiver codes designed by Victor Moshi Lugaza
A basic receiver test for the nRF24L01 module to receive 6 channels send a
ppm sum
with all of them on digital pin D2.
Install NRF24 library before you compile
Please, like, share and subscribe on my
https://www.youtube.com/c/ELECTRONOOBS
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Servo.h>
////////////////////// PPM CONFIGURATION//////////////////////////
#define channel_number 6 //set the number of channels
#define sigPin 2 //set PPM signal output pin on the arduino
#define PPM_FrLen 27000 //set the PPM frame length in microseconds (1ms =
1000µs)
#define PPM_PulseLen 400 //set the pulse length
//////////////////////////////////////////////////////////////////
int ppm[channel_number];
const uint64_t pipeIn = 0xE8E8F0F0E1LL;
RF24 radio(9, 10);
// The sizeof this struct should not exceed 32 bytes
struct MyData {
byte throttle;
byte yaw;
byte pitch;
byte roll;
byte AUX1;
byte AUX2;
byte AUX3;
};
MyData data;
void resetData()
{
// 'safe' values to use when no radio input is detected
data.throttle = 0;
data.yaw = 127;

115
data.pitch = 127;
data.roll = 127;
data.AUX1 = 0;
data.AUX2= 0;
data.AUX3= 0;
setPPMValuesFromData();
}
void setPPMValuesFromData()
{
ppm[0] = map(data.throttle, 0, 255, 1000, 2000);
ppm[1] = map(data.yaw, 0, 255, 1000, 2000);
ppm[2] = map(data.pitch, 0, 255, 1000, 2000);
ppm[3] = map(data.roll, 0, 255, 1000, 2000);
ppm[4] = map(data.AUX1, 0, 1, 1000, 2000);
ppm[5] = map(data.AUX2, 0, 1, 1000, 2000);
}
/**************************************************/
void setupPPM() {
pinMode(sigPin, OUTPUT);
digitalWrite(sigPin, 0); //set the PPM signal pin to the default state
(off)
cli();
TCCR1A = 0; // set entire TCCR1 register to 0
TCCR1B = 0;
OCR1A = 100; // compare match register (not very important, sets the
timeout for the first interrupt)
TCCR1B |= (1 << WGM12); // turn on CTC mode
TCCR1B |= (1 << CS11); // 8 prescaler: 0,5 microseconds at 16mhz
TIMSK1 |= (1 << OCIE1A); // enable timer compare interrupt
sei();
}
void setup()
{
resetData();
setupPPM();

// Set up radio module


radio.begin();
radio.setDataRate(RF24_250KBPS); // Both endpoints must have this set the
same
radio.setAutoAck(false);
radio.openReadingPipe(1,pipeIn);
radio.startListening();
}
/**************************************************/
unsigned long lastRecvTime = 0;

void recvData()
{
while ( radio.available() ) {
radio.read(&data, sizeof(MyData));
lastRecvTime = millis();
}
}
/**************************************************/
void loop()
{

116
recvData();

unsigned long now = millis();


if ( now - lastRecvTime > 1000 ) {
// signal lost?
resetData();
}

setPPMValuesFromData();
}

/**************************************************/
#define clockMultiplier 2 // set this to 2 if you are using a 16MHz
arduino, leave as 1 for an 8MHz arduino

ISR(TIMER1_COMPA_vect){
static boolean state = true;

TCNT1 = 0;

if ( state ) {
//end pulse
PORTD = PORTD & ~B00000100; // turn pin 2 off. Could also use:
digitalWrite(sigPin,0)
OCR1A = PPM_PulseLen * clockMultiplier;
state = false;
}
else {
//start pulse
static byte cur_chan_numb;
static unsigned int calc_rest;

PORTD = PORTD | B00000100; // turn pin 2 on. Could also use:


digitalWrite(sigPin,1)
state = true;
if(cur_chan_numb >= channel_number) {
cur_chan_numb = 0;
calc_rest += PPM_PulseLen;
OCR1A = (PPM_FrLen - calc_rest) * clockMultiplier;
calc_rest = 0;
}
else {
OCR1A = (ppm[cur_chan_numb] - PPM_PulseLen) * clockMultiplier;
calc_rest += ppm[cur_chan_numb];
cur_chan_numb++;
}
}
}
A2.4 ESC Calibration Codes
/*ESC calibration sketch; author: VICTOR MOSHI LUGAZA */
#include <Servo.h>
#define MAX_SIGNAL 2000
#define MIN_SIGNAL 1000
#define MOTOR_PIN 9
int DELAY = 1000;
Servo motor;

117
void setup() {
Serial.begin(9600);
Serial.println("VICTOR MOSHI ESC calibration...");
Serial.println(" ");
delay(1500);
Serial.println("Program begin...");
delay(1000);
Serial.println("This program will start the ESC.");
motor.attach(MOTOR_PIN);
Serial.print("Now writing maximum output:
(");Serial.print(MAX_SIGNAL);Serial.print(" us in this
case)");Serial.print("\n");
Serial.println("Turn on power source, then wait 2 seconds and press any
key.");
motor.writeMicroseconds(MAX_SIGNAL);
// Wait for input
while (!Serial.available());
Serial.read();
// Send min output
Serial.println("\n");
Serial.println("\n");
Serial.print("Sending minimum output:
(");Serial.print(MIN_SIGNAL);Serial.print(" us in this
case)");Serial.print("\n");
motor.writeMicroseconds(MIN_SIGNAL);
Serial.println("The ESC is calibrated");
Serial.println("----");
Serial.println("Now, type a values between 1000 and 2000 and press
enter");
Serial.println("and the motor will start rotating.");
Serial.println("Send 1000 to stop the motor and 2000 for full throttle");
}
void loop() {
if (Serial.available() > 0)
{
int DELAY = Serial.parseInt();
if (DELAY > 999)
{
motor.writeMicroseconds(DELAY);
float SPEED = (DELAY-1000)/10;
Serial.print("\n");
Serial.println("Motor speed:"); Serial.print(" ");
Serial.print(SPEED); Serial.print("%");
}
}
}

118
APPENDIX 3
PROJECT TIMELINE

Table A3 1 Project Timeline for semester I


Activity Duration of the project in weeks
1 2 3 4 5 6 7 8 9 10 11 12 1
3
A
B
C
D
E
F
G

KEY

A - Selection of project title (Week 1-2)


B - Title defending and re-defending. (Week 3-4)
C - Re-writing the proposal according to the approved title (week 5)
D - Data collection (Week 5-8).
E - Literature review (Week 1-12)
F - Data analysis (Week 9-10)
G - Report writing (Week 11-13)

119
Table: A3.1 Activities Timeline for Semester II

ACTIVITIES

1 2 3 4 5 6 7 8 9 10 11 12 13 14 16

DURATION OF PROJECT IN WEEKS

KEY:

A. Data analysis
B. Design the circuit and simulation of the design circuit
C. Data analysis
D. Building of circuit and testing of prototype
E. Project report writing
F. Literature review

120
APPENDIX 4
APPROXIMATED PROJECT BUDGET

A thorough cost calculation on the bill of materials, research, studies, travel, printing,
stationaries, and electronic components, was done to evaluate the cost of the design. Since no
strict budget constraints are given, there are no upper bounds on the cost. Considering that,
the cost of the project is presented in Table: A5.1.

Table A 2 Approximated Project Budget

S/N ITEM QUANTITY COST


1. Atmega32p 2 30,000/=
2. Arduino UNO 1 35,000/=

3. NRF24L01 radio transmitter 2 30,000/=


4. Brushless DC motor 4 160,000/=

5. Electronic Speed Controller 4 80,000/=


6. Joystick 2 60,000/=
7. Propeller 4 80,000/=
8. LiPo battery 1 100,000/=
9. LiPo battery charger 1 90,0000/=
10. Gyroscope 1 15000/=
11. Stationary and printing 100,000/=

12. Arduino Nano 1 20,000/=

13. Components and fabrication 70,000/=

Grand Total 1,010,000/=

121

You might also like