You are on page 1of 9

Development of Unmanned Aerial Vehicle​​ ​(UAV) Control Using Virtual Private Network

(VPN)
Elanthamizhan S​*,! ​,​ ​Giridhar ​Chandrasekaran​#​,​ ​Balaji B​$​,​ ​Mohan Kumar M​*​.
!​
Department of Aeronautical Engineering, KCG college of Technology, Chennai - 600097, India.
$​
Department of Electronics And Communication Engineering, S.A Engineering college, Chennai - 600077.
# ​
Department of Electronics And Communication Engineering, KCG college of Technology, Chennai - 600097.
!Email: elan.dreamspire@gmail.com,​ ​ioccupyspace@gmail.com.

ABSTRACT

The Design and Development of Unmanned Aerial Vehicle (UAV) using Virtual Private Network (VPN)
to increase the range of controllability. The UAV nowadays are operated in 2.4GHz frequency which has less
range controllability. Our project states that, the Unmanned Aerial Vehicle (UAV) can be controlled anywhere
in the world, if the UAV has access to internet. This can be achieved by creating Virtual Private Network
(VPN) between the Unmanned Aerial Vehicle (UAV) and the control station. Here the UAV acts as the Server
and the control station acts as the Client, the Server will respond according to the Client request. The data
transferred between the Server and Client is through the Encrypted VPN tunnel. The request passed by the
Client is Encrypted and transmitted to the Server, so the data is highly secured. The UAV are connected to
internet with help of Raspberry pi and 3G /4G data card and the control station is connected to internet with the
help of local Wi-Fi or Broadband connection.

Keywords: ​Virtual Private Network (VPN), Raspberry Pi, Encrypted VPN Tunnel.

1. INTRODUCTION: approximately in the line of sight . This can be


increased using a power amplifier which will
Unmanned aerial vehicles have become very
intensify the power of signal transmission and in
popular these days both commercially and for
turn extend the range but only by about 2-3
tactical and surveillance uses by the defense and
kilometer*. This paper proposes that instead of
also the law enforcement. Commercial unmanned
using 2.4GHz, the internet can be used as a platform
aerial vehicles which are controlled by a controller
for the transmission of data. As known to most, by
or a joystick use a bandwidth approved by the
using the internet large bits of data can be
Federal Communication Commission (FCC) that is
transmitted at high speeds[1].
readily available to the public i.e. 2.4GHz, which
has a maximum transmitter power of 1Watt and a 2. QUAD COPTER:
Carrier Bandwidth spectrum of 10MHz or higher.
The UAV here is a quad copter or more commonly
This trans-receiver has a limitation, which is range.
known as a quad. A quad is an aerial vehicle which
The range of the transmitter is about 1 miles
has four motors that help it orient itself in space. has to be downloaded from the server onto the
These four motors are controlled by a flight unmanned vehicle and then the instructions have to
controller. The quad can be used for various be executed[6].
surveillance purposes like traffic management and
There are a few disadvantages to this method which
also for tactical roles. As the quad is small and has
are
the minimum number of motors, which is four, it is
easy to maneuver and is very agile. The quad that 1. The unmanned aerial vehicle would need
has been built has certain design specifications a high downloading speed which may or may
which are mentioned in the table below[5], not be available in all areas.
2. It is not very secure as the cloud server
could get hacked.
S.N COMPO TYPE SPECIFICAT
O NENTS ION
3.1.2 DIRECT LINK:
Quad
Carbon S500(500mm
1 copter In this method the unmanned aerial vehicle will be
fibre dia) hosted as server and the joystick acts as the client.
Frame
The data from the client is transmitted to the server,
Brushles Emax which is the unmanned vehicle, and the instructions
2 Motor are executed. But the problem for this method is
s motor Mt2213-935kv
that, a portable internet connection needs a router to
Carbon 10x4.5 be able to configure the unmanned aerial vehicle as
3 Propeller
fibre a server while the router cannot work without a
wired broadband connection. And without the
Lithium 11.1v,
4 Battery router the device cannot be established as a server
polymer 3300MAh,35c as it requires a Dynamic Domain Name System
Hobby wing (DNS) setting which if you can see will be available
5 ESC - in the configuration page of your router. However,
30A
there is a way around this which is the solution or
Flight Multiwii Cruis method being proposed in this paper.
6 -
controller v 2.5
3.1.3 USING ​VIRTUAL PRIVATE
Table 1: Quad Copter Requirements NETWORK (VPN):

3. METHODOLOGY: A virtual private network (VPN) enables users to


send and receive data between two devices as if
There is more than one way in which the unmanned
they were in a local area network. Thus benefit from
aerial vehicle can be controlled using the internet:
the functionality, security and management policies
3.1 CLOUD: of the private network can be availed. Now, this
same concept can be used to send data from the
The simplest method is to establish a cloud link client, which is the joystick, to the server, which is
where the data from the joystick or user will be the unmanned aerial vehicle. The VPN engine will
transmitted to the cloud server. From there the data
create a static IP for both the client and the server. by the user to transmit data to the server. The client
A static IP is a never changing IP address. In this comprises of
case no Dynamic DNS setting is required as
1. Joystick
Dynamic setting is used only for those IPs which
need to be constantly changing. Using the static IP a 2. Encoder
link is established with the client and the server and 3. USB to TTL converter
this link is called an encrypted VPN tunnel which
4. PC/Laptop
has 256 bit encryption. So it is safe to say that
hacking will not be a problem​. ​Fig 1 shows the 4.1 JOYSTICK:
methodology applied in this paper[7]. Joystick is an input device which consists of control
sticks that are mechanically connected to a
potentiometer and the movement of the control stick
varies the resistance. With the help of the
conversion circuit the varying resistance is
converted into analog values that range from
0-1023, and this is nothing but 10-bit analog value
of 5V. Each stick corresponds to different controls
like roll, pitch, yaw and throttle[1].
4.2 ENCODER:

The four inputs are given in analog from (0-1023)


from the joystick to the microcontroller (Encoder)
Fig 1: Client and Server Module is connected as shown in Fig 4. Though these four inputs are
through Encrypted VPN tunnel. given to the microcontroller, data needs to be
analyzed to know which is what. For this very
4.CLIENT AND SERVER MODULE:
purpose an identifier is used. The identifier gives or
codes these values such that yaw, pitch, roll and
throttle can be separated or identified. For example
yaw can be coded as Y0-Y1023 where “Y”
represents Yaw[2].

Fig 2: Client Module Block Diagram.

The client refers to the joystick and it’s supporting


components as shown in Fig 2, which are controlled
Fig 3: Functionality of Encoder in Client
Module.

Once these data are segregated they are then


transferred to the computer serially as shown in Fig
3​, where they are processed and transmitted to the
UAV. Coming to the programming part, python
script is used[2].

4.3 USB TO TTL CONVERTER:

USB to TTL converter is used for converting USB


standard data to Transistor Transfer Logic or vice Fig 4: Server Module Block Diagram.
versa. This enables the data to be transferred from 4.5 3G DATA CARD:
the USB port to the TTL without the need for any
hap-hazard wires[2]. Server module is connected to the internet via the
3G data card. It is a portable device used for
connecting with the internet. The 3G data card is
4.4 PC/LAPTOP: commercially available as well as easy to use and
hence this was chosen. The speed of a 3G data card
A desktop or a laptop can be used to receive the usually varies from 3.6mbps to 21mbps*.
data and transmit it to the server. This encoded data
that is transmitted from the encoder is given through 4.6 RASPBERRY PI B2:
the USB to TTL converter, and from TTL convertor Raspberry pi is a miniature computer which may
to the computer with an internet connection which not have the computational power as a desktop, but
is used to transmit the data from the client to the for its size packs quite a punch. It can do just about
server. This data is the data that is required for anything that can be done with a PC, like browsing
controlling the UAV and also to perform the internet, playing a video, creating documents,
maneuvers. Any standalone laptop or desktop can etc. All of this can be done by using a standard
be used for this purpose; all that is needed is a mouse and keyboard. Raspberry pi has been used in
proper internet connection. many projects because of its flexibility. The
The UAV or the server is where the data is raspberry pi B2 is the second model of the raspberry
received, processed and executed. The server pi series, the first being raspberry pi B+. Similar to
consists of various components as shown in Fig 4, the B+ the B2 also has
which are:
● 4 USB ports
1. 3G Data Card ● 40 GPIO pins
2. Raspberry pi B2 ● Full HDMI port
3. Decoder ● Ethernet port
4. Flight controller ● Combined 3.5mm audio jack and composite
5. BLDC Motors video
6. Electronic Speed Controller ● Camera interface (CSI)
● Display interface (DSI)
● Micro SD card slot width of 2ms makes the BLDC motor to rotate at
● Video Core IV 3D graphics core maximum RPM.

Apart from these the B2 also has a 900MHz 4.8 FLIGHT CONTROLLER:
quad-core ARM Cortex-A7 CPU and 1GB RAM.
This is more than the B+, which housed a 512MB Flight controller is a device that is used to maintain
RAM and an ARM1176 processor. As it has an the stability of the flight and also to orient the flight
ARMv7 processor, it can run Snappy Ubuntu in space. It consists of an on-board accelerometer,
Core, Microsoft Windows 10 as well as the full gyroscope, magnetometer and barometer which are
range of ARM GNU/Linux distributions. the main sensors used for giving data to the flight
controller to help maintain the stability of the flight.
4.7 DECODER: The PWM signal which is generated in the decoder
is given to the flight controller via the GPIO
Decoder processes its inputs, which is a serial input pins[4].
from the raspberry pi as shown in Fig 5 that is
required for flight. The data from the client is added 4.9 BLDC MOTORS:
with the identifier to find which values correspond
to which control. In the decoder the identifier is Commonly used motors for UAV’s these days are
removed and analog value, which ranges between “brushless” motors as they cause minimum friction.
0-1023, is encoded by the client and is converted to A cylindrical shell of magnets rotates on bearings
PWM signals which range from 1ms-2ms as shown around a core of tightly coiled wire. The propeller is
in Fig 5. This signal is taken out through the GPIO attached to the top. These motors are reliable as
pins in the decoder and given to the flight long as dirt is kept out of the bearings and also with
controller. a little bit of maintenance[4].

Motors are assigned various ratings, the most


common is the kv, which refers to the motor
velocity constant with which the rotations per
minute (RPM) is determined. Therefore this number
is very important as it defines the motor’s flight
characteristics based on specifications like battery
voltage and take-off weight.

4.10 ELECTRONIC SPEED CONTROLLER:

Fig 5: Functionality of Decoder in Server The electronic speed controller is basically an


Module electronic circuit which is used to control the speed
of the motor. This is often used in the case of
PWM signal is a method of modulation to encode brushless motors, and is achieved by transistor
the control data into pulsating signal because the switching. It is incorporated with battery eliminator
Electronic Speed Controller which controls the circuit to power the external devices. This is usually
BLDC motor can be operated only with the help of rated with ampere and should be selected carefully
PWM signal. While Pulse width of 1ms makes the depending upon the maximum current drawn by the
BLDC motor to rotate at minimum RPM, Pulse
motor with full load. To be on the safer side the
ampere rating of the ESC should be higher than the
motor ampere rating[4].

5.RESULTS:

Fig 7: Creating Network Name and Defining


Network type

Fig 7 shows the process where the group name is


created which can be named as per the wish of the
Fig 6: Quad copter with Raspberry pi and 3G user and also the network type is chosen, which in
data card. this case is a mesh network.

Fig 6 shows the UAV with Raspberry pi connected


with 3G data card, where these two devices are
powered with separate power source for reliable
function.

The procedure involved in creating a VPN is


explained in detail below:

The network is created using LogMeIn Hamachi


which has to be installed on both the client and the
server. This software is used for creating zero Fig 8: Creating Authentication to join the
configuration VPN which is employed in Network
establishing the link between the server and client.
This network is the one that is used for the Fig 8 shows the process where the server gives a
transmission of data. The encrypted VPN tunnel is request to the Log Mein Hamachi to join a network
established by adding client and server to a where the ‘join requests’ in the page can either be
particular group, a feature which is available in Log automatically accepted or every time a request
Mein Hamachi. appears an approval has to be made by the user.
This should be defined by the user by selecting one
of the options under ‘join requests’ in the page.
Also, if needed, a password and a username can be
created.
Fig 9: Adding Client and Server to the Network

Fig 9 shows where the server and the client to be Fig 11: Pinging the Quad copter IP
grouped should be selected in ‘select members’
Fig 11 shows the ping status of the Quad copter IP.
option in the page and by clicking the finish button
As seen, the reply is positive from the Quad copter
the server and client are grouped into a single
which implies successful functioning.
network. Once the server and client are grouped the
encrypted VPN tunnel is created between the server Functionality of the client is described below. The
and client. We can see the group and the network control data from joystick is encoded by the encoder
has been established from this page and also by adding the identifier to the yaw, pitch, roll, and
connectivity status of the server can be viewed as throttle data from the joystick and this value is
shown in the below Fig 10. packed into serial information. This serial
information is sent to the Pc/Laptop using TTL to
USB converter. The converter is connected to the
particular USB port in the computer and the com
port number can be viewed from the device
manager in control panel. With the help of python
script “import serial” the data from the particular
com port is imported in to pc/laptop and value is
stored in a variable, and with the help of the socket
programming the value stored in variable is pushed
to the Quad IP.
Fig 10: Viewing the Status of the Quad copter in
Log Mein Hamachi GUI.
Server Module) and is serially exported through the
USB to the decoder, where the data is decoded and
converted into PWM signals. PWM signals are sent
to the flight controller and the flight controller will
give the necessary commands to BLDC Motor. By
the above described method we are able to access
the UAV using Internet. Now the UAV can be
controlled from anywhere in the world.

Fig 12: Establishment of connection between PC


and Joystick 7. FUTURE WORK:

Fig 12 shows the establishment of connection In future the plan is to incorporate flight parameter
between pc and joystick. The connection once measuring instruments, like GPS and other sensors
established will enable the transmission of data in the UAV and also to send the information to
from pc to the Quad. client. In the client side creating GUI to visualize
the information sent by the server module will be
Functionality of server is described below. The another aspect of the future works.
information sent by the client is passed through
For Safety reasons a failsafe condition is
direct tunnel and falls into the Quad IP. With the
established, which can be determined by the users.
help of socket programming the data is stored in a
That is they can hover the UAV until it reconnects
variable inside sever and with the help of “import
or make it fly to the target with help the GPS and
serial” the stored data is exported to the decoder.
Autopilot System.
This information gets decoded and is converted into
PWM signals and pushed to flight controller using 8. REFERENCES:
GPIO pins. Here the motor operations are separated 1. Design and Implementation of
and sent to their respective electronic speed e-Surveillance Robot for Video Monitoring
controllers by the flight controller, which adjusts the and Living Body Detection”,
movement of the motor to meet the client’s Dr.ShantanuK.Dixit& Mr S. B.
requirements. Dhayagonde, Volume 4, Issue 4, April 2014,
6. CONCLUSION: ISSN 2250-3153.
2. Priyanka .M and Raja Ramanan .V,
The static IP has been successfully created for both “Unmanned Aerial Vehicle for Video
the client and the server module using virtual Surveillance Using Raspberry Pi”,
private network and imported USB information International Journal of Innovative Research
from the joystick in the client module. This in Science, Engineering and Technology
information is encoded using the encoder and by Volume 3, Special Issue 3, March 2014
using python script the information is transferred to 3. “Wi-Fi Robot for video monitoring &
the static IP. This information which is pushed to surveillance system”, Pavan.C, Dr. B.
the static IP is received by the raspberry pi (The
Sivakumar, Volume 3, Issue 8,
August-2012, ISSN 2229-5518.
4. David Rocky, "Tactical Unmanned Aerial
Vehicles,” volume 18, AUVSI magazine,
pp.28-30, August 2004.

5. http://udel.edu/~sagarptl/QuadcopterFinalRe
port.pdf.
6. https://www.priv.gc.ca/resource/fs-fi/02_05
_d_51_cc_e.pdf.
7. http://www.cisco.com/networkers/nw00/pres
/2400.pdf

You might also like