Sie sind auf Seite 1von 36

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI

Seminar Report On

MIND CONTROLLED DRONE

Submitted by
T.C.GOPAL 2AV15EC049

In partial fulfillment of the requirement for the award of the


Bachelor Degree
In
Electronics and Communication Engineering

Under the Guidance of


Mr. MALLIKARJUN M BILAGI B.E,M.Tech
Asst. Professor

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


A G M Rural College of Engineering and Technology
Navagrah Teerth, Varur – 581 207.
2018-2019
S.D.M. Jainmatt Trust®

A G M RURAL COLLEGE OF ENGINEERING AND TECHNOLOGY


Navagrah Teerth, Varur- 581 207
DEPARTMENT OF ELECTORINCS AND COMMUNICATION ENGINEERING

CERTIFICATE
(Seminar)
This is to certify that the Seminar Report on “MIND CONTROLLED DRONE”
is a bonafied work carried out by T.C.Gopal (2AV15EC049) in partial fulfillment of VIII
Semester, to award the Degree in Electronics and Communication Engineering of the
Visvesvaraya Technological University, Belagavi during the year 2018-2019. It is
certified that all corrections/suggestions indicated for Seminar have been incorporated in
the Report and deposited in the department library.

The Report has been approved as it satisfies all the academic requirements in respect
of Seminar as prescribed for the Degree in Engineering

Name & Signature of: -

Guide Professor & HOD Principal


(Mr. Mallikarjun M Bilagi) (Mrs. Bharathi Menasinakai) (Dr. Sunil Kumar D)
ACKNOWLEDGEMENT
I would like to avail this opportunity to thank all of the people who have stood by
me in, encouraged me, inspired me and have contributed greatly in providing me in with
the joy of achievement and thrill of creative effort experienced by me all the way through
the accomplishment of the seminar work.
It’s my greatest privilege to express gratitude to my project guide Mr.
Mallikarjun M Bilagi, Professor, Electronics and Communication Engineering
Department for his excellent guidance, constant encouragement and help. Under his
constant presence and valuable advice has led to the completion of this seminar.
I would like to take this opportunity to express my gratitude for the support and
guidance of Project Coordinator Mr. Vinayak Jadav, Asst. Professor, Electronics and
communication Engineering Department.
I wish to express my gratitude to my Parents and Friend for their intellectual
support throughout the course of this work.
I wish to express my sincere thanks to Mrs Bharathi Menasinakai, Associate
Professor and HOD, Mechanical Engineering Department for her valuable suggestions,
help and support.
I sincerely thank Dr. Sunil Kumar D, Principal of AGMRCET, Varur for the
support, he had provided in permitting me to undertake this Seminar Work.

iii
ABSTRACT

Brain Computer Interfaces (BCI), also referred to as Mind Machine Interface


(MMI) are devices capable of capturing brain activity. EEG based brain-controlled
systems had initially found applications in military surveillance and biomedical services.
Further research and work in this domain has enabled paralyzed people to control
prosthetic arm with the help of their brain signals.
Recent advancement in BCI Technology has seen a meteoric growth with
contributions in additional fields such as security, lifestyle and entertainment. With the
ever-increasing usability of drones in this era, we have tried to incorporate BCI with
Unmanned Aerial Vehicles (UAVs). In this paper, we discuss the utilization of EEG
signals to manoeuvre a quadrotor drone using a brain-wave-enabled biosensor. One of the
crucial tasks performed by this sensor is to assimilate incoming stimuli and analyse the
cerebral signals to determine accurate results..

iv
CONTENTS
ACKNOWLEDGEMENT iii
ABSTRACT iv
CONTENTS v
LIST OF FIGURES vi
1 INTRODUCTION 1
1.1 Quadator drone 3
1.2 Arduino Development 5
1.3 Arduino boards and compatible systems 5
1.4 Mindwave NeuroFlex 7
2 LITERATURE SURVEY 9
3 HARDWARE AND SOFTWARE 11
3.1 Arduino Hardware and Software 11
3.1.1 Hardware 11
3.1.2 Software 13
3.1.3 Arduino IDE (Integrated Development Environment) 14
3.2 How to program an Arduino 15
3.3 Basic Functions of Arduino Technology 17
3.4 Processing 3 17
4 CONSTRUCTION AND WORKING OF DRONE 19
4.1 BCI 19
4.2 Steps for construction and working of mind controlled drone 19
4.2.1 Drone PCB 19
4.2.2 Digital to analogue 22
4.2.3 The Arduino circuit 24
4.2.4 Mind Control 26
ADVANTAGES 28
APPLICATIONS 28
CONCLUSION 29
REFERENCES 30

v
LIST OF FIGURES

Figure. No. Name Page No.


Figure 1.1 Mind controlled drone 1
Figure 1.2 Mindwave and drone 3
Figure 1.3 Drone (UAV) 4
Figure 1.4 Unarmed Aerial Vehicle 4
Figure 1.5 Mindwave Neurosky 7
Figure 3.1 Arduino MKR1000 Architecture 11
Figure 3.2 Arduino MKR1000 12
Figure 3.3 Arduino Hardware and USB cable 13
Figure 3.4 Arduino Schematic Window 15
Figure 3.5 Processing 3 17
Figure 4.1 Arduino Mega 2560 Board Description 19
Figure 4.2 The inside of controller 20
Figure 4.3 Desolder the joystick 21
Figure 4.4 Single joystick component 21
Figure 4.5 Soldering solid wires 22
Figure 4.6 Prepared controller PCB 22
Figure 4.7 PWM frequency of Oscilloscope 23
Figure 4.8 Lowpass fliter 23
Figure 4.9 Arduino circuit 24
Figure 4.10 Overall circuit setup 24
Figure 4.11 Connection with drone 25
Figure 4.12 Operational drone 25
Figure 4.13 Mindwave Neuroflex 26
Figure 4.14 Control the drone 26

vi
MIND CONTROLLED DRONE

CHAPTER 1
INTRODUCTION
People who cannot use their limbs are, obviously, unable to control objects in their
environment. This is often caused by injury to the motor cortex and frequently occurs after a
stroke. Previous investigations have reported that although patients often regain some of their
motor function after therapy, most remain chronically disabled. Assistive technologies that
translate thought into action can help such people to improve their life and maximize
communication capabilities and independence.
Recently, there has been much interest in developing a BCI technology to enable
disabled people to directly control a drone using their neural signals. The use of this promising
technology (Air Server) is more complex and has only recently started to be studied. Air Server
is an intelligent unmanned aerial vehicle (UAV) that automatically responds to a user’s brain
activity. The drone is smart and autonomous; and it does not need a remote control to fly. It is
especially designed for receiving the command from the user’s brain by reading electrical
signals through the scalp

Figure 1.1: Mind Controlled Drone

Air Server requires that the user wears an Electroencephalography (EEG) cap and learns
to move a virtual object back, forth, left and right on a computer screen through thinking alone.
The BCI system associates those patterns to specific commands and relays them to the Air
Server via a Wi-Fi module. An on board flight controller will receive those commands, and,
depending on the type of brain activity detected, guide the drone to the desired location.
A BCI is a communication system which provides a link between the human brain and

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 1


MIND CONTROLLED DRONE

external devices. This technology allows a person to control electrical objects using their thought
only. The process begins when specific neurons in the motor cortex produce an electrical current
which is detected by the electroencephalography (EEG) headset. The signal from the EEG is
transmitted to the computer which translates the signal pattern into commands and relays it to
the object wirelessly. The primary challenge in translating the signal pattern into commands is to
develop software that is able to control the object without having to use any remote control or
having any other human interaction with it. Most current BCI systems obtain the relevant
information from the brain activity through the EEG. EEG is the recording of electrical signals
from the brain along the scalp. These signals are the sum of the synchronous electrical activities
of millions of neurons. Since the electrical activity of a single neuron is very weak, EEG signals
exhibit a resonance in the range of (1-100Hz).
This range is divided into several intervals: Delta (up to 4Hz), Theta (48Hz), Alpha or
Mu (8-12Hz), Beta (12-30Hz), and Gamma (30-100Hz). Each interval reflects specific activities
inside the brain. In addition to these rhythms, positive peaks resulting from infrequent stimulus
(P300), slow cortical potentials (SCP), visual evoked potentials (VEP), and steady state VEP
(SSVEP) can also be recorded. EEG signal interpretation depends on the position of electrodes
on the scalp. The spatial distribution of electrodes on the scalp follows international standards
10-20. The actual distances between adjacent electrodes are either 10% or 20% of the total front-
back or right-left distance on the skull. The electrodes are named according to the location on the
scalp and given a letter that reflects this position. The letters F, T, C, P and O stand for Frontal,
Temporal, Central, Parietal, and Occipital lobes, respectively. There has been no practical
system that allows the drone to be fully controlled using the power of thought. The goal of this
paper is to develop an assistive drone that can be steered by the electrical activity of the brain
using external electrodes attached to the patient’s scalp. An innovative BCI system was
developed to control the drone using the power of thought only. A drone was designed and built
using commercial components. In this study, we have restricted our work to three cases:
arming/disarming the drone, taking off or landing, and allowing the drone during emergency
situations to fly towards a pre-defined safe area.
The last case required that the drone should be pre-programmed with up-to-date
information. For future work, the latter case will be replaced with an on-board sensor to quickly
identify a suitable landing area.The main contributions of the paper are (i) Designing an
innovative brain computer interface (BCI) system that will respond to patients' brain activity,
and produce a signal commanding the quadrotor to perform some tasks.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 2


MIND CONTROLLED DRONE

Figure 1.2: Mindwave and Drone

(ii) Designing a functioning quadrator drone that will respond to the command received from the
BCI system (iii) Designing a Fuzzy Proportional Derivative (FPD) technique that is capable of
stabilizing quadrotor and is adaptive to the induced disturbance and uncertainty.

1.1 Quadrator drone


A quadrotor is a small flying robot with four rotors: front, back, right and left. Front and back
rotors rotate in a clockwise direction while the other two rotate counter-clockwise. The thrust of
each rotor is adjustable and can be used to gain one of the four degrees of freedom: yaw, roll,
pitch, and altitude. The main structure of the quadrotor has several components: frame, rotors,
propellers, power source (battery), sensors (IMU), microcontroller, electronic speed controller
(ESC), and RC transmitter. As shown in Fig. 3a, the frame is the structure that holds all the
components together. It consists of three parts: the center hub where electronics are mounted,
four arms mounted to the center hub, and four motor mounts connecting the motors to the end of
the arms. The 28 cm long aluminum arms with a thickness of 3x1 cm are used for the
construction of the arms because of their light weight. It consists of three parts: the center hub
where electronics are mounted, four arms mounted to the center hub, and four motor mounts
connecting the motors to the end of the arms.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 3


MIND CONTROLLED DRONE

Figure 1.3: Drone (UAV)

The 28 cm long aluminum arms with a thickness of 3x1 cm are used for the construction
of the arms because of their light weight. The distance between the centers of the two motors on
the same arm is 25 cm. A flight control board from Hobby King Company was used as shown
in Fig. 3c. The board is a combination of an Atmel Mega324PA microcontroller, a 3-axis
accelerometer and a 3-axis gyroscope.

The accelerometer and gyroscope are used to measure acceleration and angular velocity,
respectively. Those measurements allow the Atmel Mega324PA microcontroller to calculate the
changes in the motor speed. An ultrasonic sensor was installed on the drone in order to measure
the distance to the ground. This enables the sensor to keep the quadrotor at a certain distance
from the patient’s head.

Figure 1.4: Unarmed Aerial Vehicle

To control the speed of the brushless motors and the quadrotor, the flight controller board
is attached to four Turnigy Plush 30 amp speed controllers (ESC). Each ESC is controlled by a
pulse-position modulation (PPM) signal and used to generate three different signals and feed
them to the rotors. Four DC brushless motors NTM 28-26 1350KV/310W were used. Finally,
four 11X45 inch propellers were mounted on the motors, two pieces for a standard rotation and

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 4


MIND CONTROLLED DRONE

two pieces for a right-hand rotation.

Two lithium polymer batteries were attached to the drone. The first one is 4000mAh, 11.1 volt
and used to power the flight control board, the ECS’s and the DC motors through the power
distribution board shown in Fig. 3b. The second battery is used to power the printed circuit
board. A voltage regulator was also used for the PCB in order to properly power the
microcontroller and the FlyPort module.

1.2 Arduino development:

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As soon
as it reached a wider community,the Arduino board started changing to adapt to new needs and
challenges, differentiating its offer from simple 8-bit boards to products for IoT
applications, wearable, 3D printing, and embedded environments. All Arduino boards are
completely open-source, empowering users to build them independently and eventually adapt
them to their particular needs.

i. Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller


platforms. The least expensive version of the Arduino module can be assembled by hand, and
even the pre-assembled Arduino modules cost less than $50.

ii. Cross-platform-The Arduino Software(IDE)run son Windows, Macintosh OSX,and Linux


operating systems. Most microcontroller systems are limited to Windows.
iii. Simple, clear programming environment - The Arduino Software (IDE) is easy-to- use
for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers,
it's conveniently based on the Processing programming environment, so students learning to
program in that environment will be familiar with how the Arduino IDE works.

iv. Open source and extensible software - The Arduino software is published as open source
tools, available for extension by experienced programmers. The language can be expanded
through C++ libraries, and people wanting to understand the technical details can make the leap
from Arduino to the AVR C programming language on which it's based. Similarly, you can add
AVR-C code directly into your Arduino programs if you want to.

1.3 Arduino boards and compatible systems:

The hardware and software designs are freely available under copy left licenses, the
DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 5
MIND CONTROLLED DRONE

developers have requested that the name "Arduino" be exclusive to the official product and not
be used for derivative works without permission. The official policy document on the use of the
Arduino name emphasizes that the project is open to incorporating work by others into the
official product. As a result of the protected naming conventions of the Arduino, a group of
Arduino users for the Arduino Diecimila, releasing an equivalent board called Free duino. The
name "Free duino" is not trademarked and is free to use for any purpose. Several Arduino
compatible products commercially released have avoided the "Arduino" name by using "duino"
name variants. The non-exhaustive list of Arduino boards and compatible systems. It lists boards
in these categories:
 Released under the official Arduino name.

 Arduino “shield” compatible.

 Development-environment compatible.

 Based on non-Atmel processors.

1.3.1 Arduino vs Microprocessor vs Microcontroller:

Arduino:

 An Arduino is a PCB containing an Atmel AVR microcontroller and usually providing a set
of connectors in a standard pattern.
 Typical an 8-bit AVR such as the ATmega8, ATmega168, ATmega328, ATmega1280, and
ATmega2560, plus power supplies, crystal, and female headers to interface with various
peripheral boards.
 Arduino programs are written in C orC++

Microprocessor:

 A microprocessor is an IC that contains only a central processing unit(CPU).

 The IC does not contain RAM, ROM or other peripherals.

 The IC may contain cache memory but it is not designed to be usable without any external
memory.
Microcontroller:

 A microcontroller is an IC that contains a CPU as well as some amount or

 RAM, ROM and other peripherals.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 6


MIND CONTROLLED DRONE

 Microcontrollers can function without external memory or storage.

1.4 Mindwave neurosky


Many tools to know the concentration of mind but still using the motion of the human
body. The tools that connected with the brain wave is still expensive. The existence of the
NeuroSky will make it easier and cheaper to use it.
NeuroSky headset Mindwave Mobile is a headset for measuring EEG signals in the
head. The headset uses a single contact sensor on the left forehead and earlobes. Data output
from the headset is 8 EEG signal spectrum (delta, theta, low-alpha, high alpha, low beta, high-
beta and low-gamma), eSense Attention and Meditation. Attention eSense indicate the level of
concentration of the headset, while the Meditation eSense indicate the level of relaxation of the
mind of the headset [1][5]. NeuroSky is shown on the Figure 1.
NeuroSky headset Mindwave Mobile utilization in the control system for the LED
lamp is also very possible. For example, to measure the concentration of a person. The headset
has several output data, which can be used as a control parameter. To test pattern Attention
eSense which is a headset output data stating the headset user mental states associated with
concentration of mind. Some ways to increase the value of this data is to focus the mind on
something, focus on things you like, do mathematical calculations, and listen to someone talk
attentively [2] [3]. The concentration level of the user's mind began to increase when the headset
is said to reach a value eSense meters 60-80 from the total measurement from 0 to 100

Figure 1.5: Mindwave Neurosky

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 7


MIND CONTROLLED DRONE

Many wearable devices can now track your heart rate, steps, speed, balance, body
temperature and sleep. Smart devices are definitely the future and will be used in people’s
everyday lives. A new genration of brain-reading technology was created by the company
Neurosky, with the help of electroencephalography (EEG) biosensors.
One of the first commercial brain wearables launched in 2009 and could be used to
play a game called Mindflex, in which users moved a ball, trying to go through an obstacle
course using just their “brain power”. These devices claim to improve one’s focus and well
being, Detect and reduce stress and even let someone play video games with the use of their
brain.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 8


MIND CONTROLLED DRONE

CHAPTER 2
LITERATURE SURVEY
The human brain is a very complex structure. Over the past few decades, many
researchers have established the connection between the human brain and digital devices. In this
review researchers explained the new technology methods which directly interface the human
brain with digital computer devices and controlled them by capturing electric signals which are
generated in a brain. Basically, Brain Computer Interfacing (BCI) systems provide the
communication channels between the human brain and computers or devices. According to
Taylor in (Kroeker, 2011 ) the main goal of this technology is effectively decoding the brain’s
movement intention and successfully stimulating paralysed muscles to produce movement to
enable paralysed people to move their limbs just by thinking about doing so.
This literature covers a variety of methods, training techniques, problems with devices or
theory and calculation, and some appliances. There are different methods for different functions
in the BCI system. However, the common factor for the entire research is that all of them use the
Electroencephalography (EEG) machine for capturing the electrical signals from the brain. For
this reason, an EEG machine is known as the heart of the BCI system. In the past BCI systems
many scientists were using EEG machines, which had a number of wired connections and
needed gel or paste at the time of the experiment. However, the new device, Emotive EPOC,
changes the aspect of BCI system. Benedetti et al (2014) are scientists who explain the function
and easy set up technique of this Emotive EPOC machine. Although, using this machine Shyu
et al (2013) have built the new appliance which is a hospital bed nursing system, Akaram et al
(2013) built a smart dictionary and Gandhi et al (2014) built a robotic wheelchair which follow
the instruction of the user as they think, such as ; go straight, go back, take right and take left.
` The second theme of the BCI system is signal processing technique. The signal
processing task is most challenging for all researchers. Therefore it is a very important step for
the BCI system. In BCI system the signal processing techniques differ based on the task. Shyu et
al (2013) explained the new method of the signal processing in which they used FPGA (Field
Programming Gate Array) method. This method is related to communication method. The author
invented a hospital bed nursing system which is totally based on the FPGA. It is a programmable
device which contains a high volume of processing data and it also increases the efficiency of
hospital bed nursing devices by about 92.5 per cent. On the other hand, Gao et al (2014)
described a signal processing method based on the telecommunication method which is called
the multiple access method. This method is very secure and accurate compared to other methods.
The method of Shyu et al (2013) is generally used for programmable tasks .For example, the

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 9


MIND CONTROLLED DRONE

hospital bed nursing system only performed limited tasks which are programmed in FPGA
system. For example, they attached the motor which adjusts the attitude of the subject’s back up
and down and knee moving up and down. All these tasks are controlled by the FPGA system.
However, the multiple access method is used for any types of BCI system which are not based
on specific tasks. In addition, in terms of speed, variation, and user training sessions, a
performance of the multiple access method is much better. Additionally, Gandhi et al (2014)
proposed the new method named Adaptive Brain Robot interface. It is used for multiple tasks to
operate the robotic device. Compared to other interfacing techniques, this method provides a
different degree of flexibility to control the robotic wheelchair which Gandhi et al (2014) built.
The next theme of BCI system is evaluating the performance. The term Information
Transfer Rate (ITR) is defined as the rate of transferring information from source to destination
through the communication channel. In many research papers this ITR is often reported
differently and sometimes incorrectly. In previous research the offline and online performance
was distinct to each other. Yuan et al (2013) defined the standard method of calculating the BCI
performance named Wolpaw’s equation. This equation is adapted on the basis of the popular
theory of Shannon and Weaves which gives the information about communication models and
their consequences. According to research on applying this equation in ITR calculation, it gives
accurate results in both online and offline BCI systems. Hasan et al (2013), Shyu et al (2013),
Benedetti et al (2014), Gao et al (2014) and Amiri et al (2013) in these all articles Wolpaw’s
equation did used by researchers for evaluating the performance of the BCI system. Furthermore,
Gao et al (2014) states that this equation executed the accurate estimation information about the
ITR of system.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 10


MIND CONTROLLED DRONE

CHAPTER 3
HARDWARE AND SOFTWARE
Arduino MKR1000. The MKR1000 is described in the official web site as a
powerful board that combines the functionality of the Zero and the Wi-Fi Shield. The main
information regarding the technical specifications for getting started are : Micro-controller -
SAMD21 Cortex-M0+32bit low power ARM MCU as shown in Fig

Figure 3.1: Arduino MKR1000 Architecture

3.1 Arduino Hardware and Software:


3.1.1 Hardware:
Arduino MKR1000 has been designed to offer a practical and cost effective
solution for makers seeking to add Wi-Fi connectivity to their projects with minimal
previous experience in networking. It is based on the Atmel ATSAMW25 SoC (System
on Chip), that is part of the Smart Connect family of Atmel Wireless devices, specifically
designed for IoT projects and devices.

The ATSAMW25 is composed of three main blocks:

 SAMD21 Cortex-M0+ 32bit low power ARM MCU


 WINC1500 low power 2.4GHz IEEE® 802.11 b/g/n Wi-Fi

 ECC508 Crypto Authentication

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 11


MIND CONTROLLED DRONE

Figure 3.2: Arduino MKR1000

The ATSAMW25 includes also a single 1x1 stream PCB Antenna.The design includes a
Li-Po charging circuit that allows the Arduino/Genuino MKR1000 to run on battery
power or external 5V, charging the Li-Po battery while running on external power.
Switching from one source to the other is done automatically.A good 32 bit
computational power similar to the Zero board, the usual rich set of I/O interfaces, low
power Wi-Fi with a Crypto chip for secure communication, and the ease of use of the
Arduino Software (IDE) for code development and programming. All these features make
this board the preferred choice for the emerging IoT battery-powered projects in a
compact form factor.The USB port can be used to supply power (5V) to the board.The
Arduino MKR1000 is able to run with or without the Li-Po battery connected and has
limited power consumption.

The MKR1000 Wifi module supports certificate SHA-256


There are many Arduino compatible and Arduino derived boards. Some are functionally
equivalent to an Arduino and can be used interchangeably. Many enhance the basic Arduino by
adding output drivers, often for use in school level education to simplify the construction of
buggies and small robots.
 An ATMEL Microcontroller chip (the 28-pin oblong in the lower right).
 A USB Connector (The silver square at upper left)
 A USB Interface chip (The UNO and Your Duino examples use a small square
microcontroller chip)
DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 12
MIND CONTROLLED DRONE

Figure 3.3: Arduino Hardware and USB cable

 LEDS that show when Power, TX (Transmit), RX (Receive), or L (Pin 13) are active.
 An External Power connector(lower left),along with voltage regulator circuits.The
Your Duino RoboRED provides much more 5Vcurrent.
 A RESET button to restart whatever program is loaded on the board.

3.1.2 Software:
Arduino programs may be written in any programming language with a compiler that
produces binary machine code. Atmel provides a development environment for their
microcontrollers, AVR Studio and the newer Atmel Studio.
The Arduino project provides the Arduino integrated development environment (IDE),which is
across-platform application written in Java. It originated from the IDE for the Processing
programming language project and the Wiring project. It is designed to introduce programming
to artists and other newcomers unfamiliar with software development. It includes a code editor
with features such as syntax highlighting, brace matching, and automatic indentation, and
provides simple one-click mechanism for compiling and loading programs to an Arduino board.
A program written with the IDE for Arduino is called a "sketch”.
The Arduino IDE supports the C and C++ programming languages using special rules of
code organization. The Arduino IDE supplies a software library called "Wiring" from the Wiring
project, which provides many common input and output procedures. A typical Arduino C/C++
sketch consist of two functions that are compiled and linked with a program stub main () into an
executable cyclic executive program:
setup():a function that runs once at the start of a program and that can initialize settings.
loop(): a function called repeatedly until the board powers off.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 13


MIND CONTROLLED DRONE

Sample program: A typical program for a beginning Arduino programmer blinks a light-
emitting diode (LED) on and off. This program is usually loaded in the Arduino board by the
manufacturer. In the Arduino environment, a user might write such a program as shown below;

#define LED_PIN 13
void setup() {
pinMode(LED_PIN, OUTPUT); // Enable pin 13 for digital output
}
void loop()
{ digitalWrite(LED_PIN, // Turn on the LED
HIGH); delay(1000); // Wait one second (1000 milliseconds)
digitalWrite(LED_PIN, LOW); // Turn off the LED
delay(1000); // Wait one second
}

3.1.3 Arduino IDE (Integrated Development Environment)


This is the free software you will use to create the Behavior of your project.
Here's what it includes:
 An EDITOR to create and edit the text of your software Sketch. It actively highlights
Keywords in the language so typing errors are more obvious.
 A VERIFY system that runs through your Sketch, verifies that there are no errors,and then
compiles it into the machine language program that can be
Uploaded to your Arduino board over the USB cable. (This is often called MAKE in other
systems, and actually is quite complex, running system pre-processor, compiler, linker etc.
"Under the covers").
 An UPLOAD system that communicates with your Arduino Board over USB, loads your
program into Arduino memory, and starts your program running.
 A SERIAL MONITOR window that allows you to receive and send messages from
programs running on your Arduino board.This is often used for testing "debugging"programs.
 Many EXAMPLE software Sketches that show how to use many different devices and
techniques.
 A LIBRARY system containing many pre-written sections of software.
 A FILE system to save and retrieve Sketches.
 A HELP system that includes the entire Arduino Reference document.
Arduino Language: If you haven't written "code" in any computer language yet, you'll have to
get used to writing very specific commands to get things done. But Arduino gives you many
easy to use commands. To turn an LED ON for example, you'd write something like:

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 14


MIND CONTROLLED DRONE

digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) and to turn it off again,
you'd write:
digitalWrite(led,LOW); // turn the LED off by making the voltage LOW Now look
closely at those lines:
 The Gray sections on the right(after"//") are only COMMENT Stotell the reader what the
programmer intended, or explain things. They are ignored by Arduino
 The command ("digitalWrite") is highlighted. If you misspelled it, it would just be black.
 There are special words you'll need to learn like HIGH and LOW.

 Each command ends with a Semicolon character. This is required to show the end of a
command.
Verify is Fussy! If you misspell something, forget the ";", or use unknown words, it will put out
Error messages and try totelly out which line is the problem.
Arduino Libraries:When you start writing Arduino software sketches, you are not in a room
alone. You are in a Library, with many pre-written examples that make it easy to use more
complex functions like connecting to the Internet.Here are the Standard Libraries that come with
the free IDE software install:
 EEPROM - reading and writing to "permanent"storage.
 Ethernet - for connecting to the internet using the Arduino Ethernet Shield.
 Firmata-for communicating with applications on the computer using a standard serial
protocol.
 Liquid Crystal - for controlling liquid crystal displays(LCDs).
 SD - for reading and writing SD cards.
 Servo - for controlling servomotors.
 SPI-for communicating with devices using the Serial Peripheral Interface(SPI) Bus.
 Software Serial - for serial communication on any digital pins. Version 1.0 and later of
Arduino incorporate Mikal Hart's New Soft Serial library as Software Serial.
 Stepper - for controlling stepper motors.
 Wi-Fi - for connecting to the internet using the Arduino Wi-Fi shield.
 Wire - Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices
or sensors.
 Arduino enthusiasts who have figured out how to do more complex things have shared their
work by creating Contribute Libraries. Some of the categories of libraries are:
 Communication (networking and protocols).
 Sensing.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 15


MIND CONTROLLED DRONE

 Displays and LEDs.


 Audio and Waveforms.
 Motors and PWM.
 Timing.
 Utilities.

3.1 How to program an Arduino:

The main advantage of the Arduino technology is; you can directly load the programs
into the device without the need of a hardware programmer to burn the program. This is done
because of the presence of the 0.5KB of boot loader, that allows the program to be dumped into
the circuit. As shown in figure 3.4 the Arduino tool window contains a toolbar with a various
buttons like new, open, verify, upload and serial monitor. And additionally it comprises of a text
editor(employed to write the code), a message space (displays feedback) like showing the errors,
the text console, that displays the o/p & a series of menus just like the file, tool menu & edit.

Figure 3.4: Arduino schematic window

 Programming into the Arduino board is called as sketches. Each sketch contains of three
parts such as Variables Declaration, Initialization and Control code. Where, Initialization is
DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 16
MIND CONTROLLED DRONE

written in the setup function and Control code is written in the loop function.
 The sketch is saved with. ino and any operation like opening a sketch, verifying and
saving can be done using the tool menu.
 The sketch must be stored in the sketch book directory.
 Select the suitable board from the serial port numbers and tools menu.
 Select the tools menu and click on the upload button, then the boot loader uploads the
code on themicrocontroller.

3.3 Basic Functions of Arduino Technology


 Digital read pin reads the digital value of the given pin.
 Digital write pin is used to write the digital value of the given pin.
 Pin mode pin is used to set the pin to I/O mode.
 Analog read pin reads and returns the value.
 Analog write pin writes the value of the pin.
 Serial Begins pin sets the beginning of serial communication by setting the rate of bit.

3.4 Processing 3
Processing is an open-source graphical library and integrated development environment
(IDE) / playground built for the electronic arts, new media art, and visual design communities
with the purpose of teaching non-programmers the fundamentals of computer programming in a
visual context.Processing uses the Java language, with additional simplifications such as
additional classes and aliased mathematical functions and operations. As well as this, it also has
a graphical user interface for simplifying the compilation and execution stage

Figure 3.5: Processing 3

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 17


MIND CONTROLLED DRONE

Processing includes a sketchbook, a minimal alternative to an integrated development


environment (IDE) for organizing projects.
Every Processing sketch is actually a subclass of the PAppletJava class (formerly a subclass of
Java's built-in Applet) which implements most of the Processing language's features.
When programming in Processing, all additional classes defined will be treated as inner classes
when the code is translated into pure Java before compiling. This means that the use of static
variables and methods in classes is prohibited unless Processing is explicitly told to code in pure
Java mode.
Processing also allows for users to create their own classes within the PApplet sketch. This
allows for complex data types that can include any number of arguments and avoids the
limitations of solely using standard data types such as: int (integer), char (character), float (real
number), and color (RGB, RGBA, hex).

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 18


MIND CONTROLLED DRONE

CHAPTER 4
CONSTRUCTION AND WORKING OF DRONE
4.1 BCI
The BCI (Brain Computer Interface) interprets graphical record signals into commands
to maneuver a quadrotor drone. The explanation of the system design is as follows:

Figure 4.1: Arduino Mega 2560 Board Description

A brain–computer interface(BCI), sometimes called a neural-control interface(NCI),


mind-machine interface(MMI), direct neural interface(DNI), or brain–machine interface(BMI),
is a direct communication pathway between an enhanced or wired brain and an external device.
BCI differs from neuro modulation in that it allows for bidirectional information flow. BCIs are
often directed at researching, mapping, assisting, augmenting, or repairing human cognitive or
sensory-motor functions.

4.2 Steps for construction and working of Mind Controlled Drone

4.2.1 Drone PCB

 You can use almost any drone you want. Most of the controllers work with joysticks. Those

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 19


MIND CONTROLLED DRONE

joysticks we are going to bypass.

 First, open the case of your controller. This controller uses two 1.5v batteries which are
approximate 3.3v. This value is the same as the output of the Arduino MKR1000.

 It is possible to use another Arduino of your liking, but be aware you can break the circuit
board if you give it more voltage that the PCB can handle. ( I speak from experience.)

Figure 4.2 :The inside of a controller (another drone, the one that I overpowered..)

 Mesure with a multi-meter what the middle, high and low voltages are of the joysticks once
powered. Write them down for later use.
 Desolder the joystick components from the PCB.
 In reality these joystick components are just potentiometers. A potentiometer is an analogue
variable resistor. You can mesure the maximum resistance with an multimeter. Connect the
multimeter to the + and - to read the resistance.
 Also, solder solid core wires to the + (B+ on this board) and - (B- on this board) ports on the
PCB. And solder solid core wires to the signal ports of the joysticks.Now you have prepared
your controller for the next step.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 20


MIND CONTROLLED DRONE

Figure 4.3: Desolder the joystick

Figure 4.4: Single joystick component

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 21


MIND CONTROLLED DRONE

Figure 4.5: Soldering solid wires

Figure 4.6: Prepared controller PCB

4.2.2 Digital to analogue


 When you use AnalogWrite on with your Arduino the output will be a PWM (Pulse Width

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 22


MIND CONTROLLED DRONE

Modulation) signal. The win will turn its own value HIGH and LOW in a determined
frequency.
 Our prepared PCB does not like PWM, it is expecting a steady voltage.

Figure 4.7: PWM frequency of an oscilloscope

 To create an analogue value we can use a variety of digital to analogue converters like a
DAC chip or an RF Ladder filter.Because of that I want to keep this project so simple as
possible I will learn you how to use a Low Pass Filter, that will give us the desired
output.To create a Low pass filter you need a capacitor and a resistor.

Figure 4.8: Low pass filter


 One of the characteristics of a low pass filter is that the analogue voltage will gradually
change (it takes some time). This circuit works best for me because it gives me the desired
outcome and uses a low amount of parts.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 23


MIND CONTROLLED DRONE

4.2.3 The Arduino Circuit

 The main part of our circuit is the low pass filter we created recently. Make four of them in
a row and we have an analogue voltage for all four of the controller inputs.

Figure 4.9: Arduino circuit

Figure 4.10: Overall circuit setup

 Connect the right outputs to the correct inputs on the controller PCB. Make sure you got it
correctly before uploading the Arduino Sketch.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 24


MIND CONTROLLED DRONE

Figure 4.11: Connection with Drone

 The standard drone layout is as followed:

i. Throttle => up / down on the left side of the controller.


ii. Yaw => left / right on the left side of the controller.
iii. Pitch => up / down on the right side of the controller.
iv. Roll => left / right on the right side of the controller.

 Once everything is connected you can upload your sketch to your Arduino MKR1000. You
can find the sketch at the bottom of this tutorial.

 The Arduino will replace the batteries and can send signals (as voltages) to the bypassed
joysticks. At this moment you can build your own programs en experiments to control the
drone with PWM.

Figure 4.12: Operational drone

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 25


MIND CONTROLLED DRONE

4.2.4 Mind control

 Install all the drivers on your computer. This MindWave sensor comes with a CD.
 Pair the MindWave sensor to your computer with Bluetooth. Hold on button up for 3
seconds and the blue led will blink twice, it is now discoverable.

Figure 4.13: Mindwave neuroflex

 Unzip the library in your libraries folder. You can find the libraries folder in your processing
folder.Make sure your com-ports are correct in the setup, or you will end up with an error.
You can find the com-ports in your device manager.

Figure 4.14: control the drone

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 26


MIND CONTROLLED DRONE

 You can also find the com-port of the Arduino under "Tools" in the Arduino IDE at "Port".

 You can also find the com-port of the MindWave sensor in the ThinkGear Connector
Preferences (you get this program when you instal the drivers) under "Options".

receiver = new Serial(this, "COM10", 115200);

mindSet = new MindSet(this, "COM5");

 Processing communicates with your Arduino via Serial. You can alter the Processing code
to your liking, read the comments in the sketch to understand what is going on.

 Run your Processing sketch and concentrate on your drone. When your concentration level
goes above 40% the drone will lift off. How harder you concentrate the more aggressive the
drone will be. You can land the drone by letting your mind wander off and stop
concentrating.

receiver ;

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 27


MIND CONTROLLED DRONE

ADVANTAGES
 Bomb Dectection.
 Surveillance.
 Air strikes.
 Filming Journalism.
 Shipping and Delivery.
 Disaster Management.
 Rescue Operations and Healthcare.
 Geographical Mapping.
.

APPLICATIONS
 UAV Inspection and Monitoring.
 UAV Surveying and Mapping.
 UAV Precision Agriculture.
 UAV Aerial Imaging - HR Photos.
 UAV Condition Survey and Civil Engineering.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 28


MIND CONTROLLED DRONE

CONCLUSION
The present study shows that it is possible to control the drone with a BCI system. An
innovative control law using fuzzy PD was used successfully to stabilize the states of the drone
and ensure that the brain waves would not overwhelm the drone with too many commands. A
two-input and two-output fuzzy control system was presented. The controller consisted of four
fuzzy logic modules designated for the control of the quadrotor height and orientation. The
controller was simulated in MATLAB/Simulink and then experimentally tested on our prototype,
called AirServer. The source of the control signal was the brain waves recorded from the surface
of the scalp using EEG sensors. The cognitive suite received the EEG waves and converted them
to commands such as pull, push, right and left. These commands were used to control the
AirServer. Simulated results were quite promising and demonstrated the ability of disabled
people to steer the drone with the power of thought and use it to look after their own needs.
Further study is needed to enhance the movement of the drone.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 29


MIND CONTROLLED DRONE

REFERENCES

[1]. Siliveru Ramesh, M.Gopi Krishna, Madhu Nakire kanti,Brain Computer Interface System
for Mind Controlled Robot using Bluetooth, International Journal of Computer
Applications Volume , 104-No 15,October2014.
[2]. Swati Vaid, Preeti Singh, Chamandeep Kaur,EEG Analysis for BCI Interface: A Review,
2015 Fifth International Conference on Advanced Computing & Communication
Technologies.
[3]. Imran Ali Mirza, Amiya Tripathy, Sejal Chopra, Michelle D’Sa, Mind-Controlled
Wheelchair using an EEG Headset and Arduino Microcontroller, 2015 International
Conference on Technologies For Sustainable Development(ICTSD).
[4]. Abdel Ilah N. Alshbatat, Liang Dong, Peter J. Vial,Mind-Controlled Assistive Quadrotor
Drone Aided by an Intelligent Fuzzy PD Controller, Jordan Journal Of Electrical
Engineering Volume 2, No3-2016.
[5]. Luzheng Bi, Xin-An Fan, Yili Liu,EEG-Based Brain controlled Mobile Robots : A survey,
Human-Machine Systems, IEEE Transactions on (Volume: 43, Issue: 2), pp. 161-176,
Mar2013.
[6]. A. O. G. Barbosa, D. R. Achanccaray, and M. A. Meggiolaro,Activation of a mobile robot
through a brain computer interface, in Proc. Conf. Rec. 2010 IEEE Int. Conf. Robot.Au.

DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING, AGMRCET 30

Das könnte Ihnen auch gefallen