DESIGN

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 1

CHAPTER 1
INTRODUCTION

1.1 PURPOSE
This thesis examines domestic aviation security measures that have been implemented since the
September 11, 2001, terrorist attacks on the Unites States. The purpose is to determine if the
domestic Aviation Transportation System is more secure now than it was prior to September 11.

1.2 BACKGROUND
By 8:00 a.m. on the morning of September 11, 2001, nineteen hijackers had defeated the civil
aviation security measures that America had in place in order to prevent a hijacking. The 9/11
Commission made multiple recommendations in their report including gaining international
support to counter terrorism and track terrorist financing, stopping the spread of weapons of
mass destruction, improvements to border security, emergency disaster response improvements,
and improvements to the nations intelligence operations.
This thesis will focus on an additional area identified by the 9/11 Commission requiring
improvement, aviation security. Where are we now in terms of aviation security? What security
improvements have been completed and is the Aviation Transportation System more or less
secure from the threat of terrorism? The United States Aviation Transportation System is a
critical infrastructure. As such, it must be enveloped with a level of security that will ensure both
the safety of travelers from the threat of terrorism, and also facilitate the secure mass movement
of both people and goods.
In 2003 alone, U.S air carriers transported over 595 million passengers aboard commercial
aircraft. In that same year, over 20,000 persons were intercepted at airport screening checkpoints
carrying box cutters. The importance of effective aviation security is crucial in order to protect
the public traveler, but it is also a necessary deterrent to terrorist threats. The threat to aviation
security is persistent. A lack of diligence in aviation security will almost certainly welcome the

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 2

persistent threat of terrorism. Determining where efforts or measures have been implemented
may help to focus efforts on areas that have not been fortified. Have the current implementation
of post 9/11 security measures reduced the vulnerability of commercial aviation to terrorist
attack? What are the deficiencies of the system? Where future efforts should be focused?
Security efforts in aviation have been under continual scrutiny following 9/11, and viewpoints on
the effectiveness of those efforts vary considerably. Opinions range from suggesting that the
entire security strategy is flawed, to the U.S. has overreacted to terrorism, to the stance that
current security improvements have had little effect on securing commercial aviation. Some
aviation security experts contend that increased security efforts essentially have little or no
effect.
The Aviation and Transportation of Security Act of 2001 created the Transportation Security
Administration, federalized airport screeners, and directed the screening of all checked baggage
for explosives. Some aviation security analysts argue that the 100% screening of all checked
baggage mandated by Congress actually was a detriment to national security due to the fact that
the measures diverted funds, attention, and resources from passenger and carry-on baggage
screening. A similar view is that the heavy emphasis on passenger screening leaves other areas
vulnerable to attack such as airline cargo security. While passenger checked luggage is required
to be screened for explosives, only a small portion of air cargo is ever inspected. The
federalization of airport screeners was another post 9/11 measure. The goal was to standardize
screening efforts at all airports through centralization of control under the Transportation
Security Administration.
The Government Accountability Office has found that current airport screening efforts are little
better than what existed prior to the ?federalized? effort. The report highlights areas of concern
such as efforts to hire baggage screeners as well as the ability to effectively train the screening
workforce. The evidence cited tends to strengthen the argument that post 9/11 provisions have
had little impact on security efforts. Chairman of the Subcommittee on Aviation, Congressman
John Mica stated, "TSA’s current baggage screening system …does not even afford us more
effective security screening.? Another stronger argument about the current approach to aviation
security is that it is fundamentally flawed.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 3

One basic flaw that is pointed out in the current security model is that it is premised on an equal-
risk model. Current procedures presume that all air travelers are equally likely to be a threat, and
-therefore all travelers require equal attention in terms of screening measures. This creates a non-
focused security effort rather than steering resources to pinpoint persons of risk. A second
criticism is that the current efforts are too focused on detecting or restricting dangerous objects
as opposed to people. The contention is that the focus of security is more aligned with preventing
another 9/11 scenario by keeping dangerous items off of aircraft. If inflicting mass casualties was
the sole desire, a terrorist could simply target travelers in a crowded airport, therefore the focus
of the effort should be aimed at targeting dangerous people, not objects. While the point is valid,
a counter argument is that the last two foiled aviation related terrorist incidents, the shoe bomber
and the liquid-gel bombing plot, highlight the reoccurring theme of attempting to get aboard an
aircraft in order to inflict damage while airborne.
Terrorists continue to innovate new methods to bypass or breach aviation security in order to
utilize commercial aircraft as a means to an end. Even after increased international aviation
security efforts following 9/11, terrorist Richard Reid managed to board an American Airlines
flight in Paris in December 2001 with explosives contained in his shoe. Security measures in
other countries followed the U.S. by focusing efforts on passengers’ shoes. Then in August 2006,
British authorities arrested twenty-four suspects plotting to simultaneously blow up ten U.S.
bound passenger aircraft using yet another technique, liquid explosives hidden in their carry-on
luggage. TSA Administrator David Stone told the Senate Commerce, Science and Transportation
Committee in 2005 that ?the greatest risk is still that a plane may be targeted for attack or used to
carry out an attack.
One other viewpoint is that the threat of terrorism has been completely blown out of proportion.
That perceived risks are usually much greater than actual risks, and spectacular risks are more
grossly exaggerated than common risks. For example, there were over 38,000 motor vehicle-
related fatalities in the same year as the September 11 terrorist attacks. By sheer body count,
vehicle accidents take a far greater toll of life than September 11. A motor vehicle related
incident is also far more probable for the average U.S. citizen to experience, than being a victim
of a terrorist attack. Yet traffic and highway safety is in no way on equal footing to safeguarding
the public and critical infrastructures from possible acts of terrorism.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 4

Given a persistent threat to aviation security and the varied views of security measures what is
the status of aviation security within the U.S.? Have security efforts reduced the vulnerability of
commercial aviation? Have 9/11 deficiencies been rectified and if not what is the causal reason?
Where security efforts should be focused?

1.3 OBJECTIVES
? To Build a System to prevent the Hijacking attempt of the Aircraft by disabling the
manual input of the aircraft from the cockpit.?
? To Build a proof of concept for a Fail Safe Method using Radio Frequency Identication
Devices.?

1.4 SUMMARY
An ideal system is developed and demonstrated to prevent hijacking attempt of a passenger
aircraft. This system is designed using RFID (Radio Frequency Indication Devices). The system
will disable manual control of the aircraft from the cockpit, if the system is triggered using
RFID tags. The system is triggered when the RFID tags present of the crew members are in
range of activation for more than a period of 15 seconds. The system is located in a certain
passage or bay of the aircraft that is not frequently visited by the members of the Crew. The
triggering of this system will mean a confirmation on the attempt of Hijacking. After triggering,
the system will not allow any manual input such as disabling the system since that means, This
system cannot be shutdown manually or remotely or electronically from the aircraft and thus
incase is a failsafe concept. This is achieved because this can result in vulnerability of the
aircraft crew and passengers. From the past experience, all the proposed mechanisms have a
drawback of either operating from the cabin or a possibility to disable the system manually. The
current project includes, two RFID sensors and tags, two servos and one joy stick are being
used in the development. This system is developed by developing the individual systems first,
followed by the the integration of them later. This system is shown to work based on the
concept described above and is an idea that is being brought to life with the said components.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 5

CHAPTER 2
LITERATURE SURVEY

2.1 HIJACKINGS
The literature survey carried out will compare security measures before and after 9/11. A
comparative study of security measures will describe and examine security initiatives, the
implementation of those initiatives, and security policies.
The first aircraft hijacked within the United States occurred in 1961. Antuilo Ramirez Ortiz
forced a National Airlines Convair flight crew at gunpoint to fly the aircraft to Communist Cuba.
This marked the starting point of a rash of aviation hijacking events in the United States, which
gained a significant swell in the latter part of the decade. Between 1968 and 1972, 326 aircraft
hijack attempts occurred throughout the world. Of those 326 hijackings, 124 occurred within the
United States. In 1968 alone there were twenty aircraft hijackings in the U.S. Initially, the
rationale for hijacking an aircraft was for transportation, but the rationale soon expanded. Robert
Holden’s article, ?The Contagiousness of Aircraft Hijacking,? placed aircraft hijackings into one
of two main categories depending on the demand or desired objective of the hijacker, either
hijacking for extortion or hijacking for transportation. 1

2.2 IMPLICATIONS FOR SECURITY
In the earliest days of aviation, hijacking was a minor concern. It was not an element of focus
even though the act of hijacking an aircraft became more prevalent. U.S. hijacking incidents in
the late 1960s became commonplace for passengers and flight crews. In 1969 at least one
hijacking occurred each month. Aircrews began to carry approach information for airports in
Cuba, and aircrew training emphasized compliance with hijackers as diplomatic procedures were
in place for the return of aircraft and passengers. Compliance and non-resistance were the focal
points to eventually gain the release of passengers and crew. Hijackers would issue their

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 6

demands, be delivered to their destination and eventually, passengers and aircraft would be
returned to the U.S. From the U.S. perspective, this is how hijackings occurred. It wasn’t until
1971 that the first passenger was killed in the U.S. during an aircraft hijack. Hijackings became
more violent, as the killing of passengers and aircrews or the bombing of aircraft incidents
escalated. In September 1970, the Popular Front for the Liberation of Palestine (PFLP),
simultaneously hijacked and later destroyed four commercial airliners, two of which were U.S.
aircraft. This event was essentially the culmination or turning point of aviation hijackings for the
era. It struck an international chord and drove the need to establish an international legal stance
to counter problem of hijacking. 2
As a result of the rising rate of airline hijackings, the Hague Convention for the Suppression of
Unlawful Seizure of Aircraft was held in 1970. Sixty cooperating states agreed on provisions to
enact legislation against hijacking, arrest and trial provisions, and active response measures such
as blocking the runway or disabling the aircraft while on the ground to prevent it from taking off.
The Hague Convention also framed the difficult subject of jurisdiction. Hijacking had become
not only an international problem but it created a gray area of jurisdictional boundary that
hijackers traveling from country to country could exploit. Where did each country’s authority
begin and end? The Hague Convention sought to narrow that jurisdictional gap. The Hague
convention facilitated the groundwork to apprehend hijack perpetrators, as it was more punitive
in nature than the Tokyo Convention of 1963, which tended to focus more on the return of
aircraft. 3
Domestically, from 1961 through 1976, as the apprehension rates of domestic hijackers grew, the
number of domestic hijacking incidents subsequently declined. Prison sentences also increased in
duration, which had a corollary impact. The average sentence for those convicted of hijacking
between 1972 and 1974 was thirty years. The treaty between the U.S. and Cuba to curb the
Cuba-hijack-movement also had a significant impact. Both countries signed a treaty in 1973
agreeing to either extradite or punish hijackers. This treaty essentially alleviated the safe haven
for asylum seekers regardless of which direction they were traveling, either to or from Cuba. 4
The security policies governing airport and airline security procedures also became more
stringent. The Federal Aviation Administration provided the airlines the authority to deny travel
to persons that would not consent to a search of their persons or luggage. Warning signs were

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 7

also posted in airports as reminders that it was a federal offense to carry concealed weapons or to
hijack an aircraft.
In the face of ever increasing violent hijack events coupled with the aforementioned PFLP
hijacking, on September 11, 1970, President Nixon introduced an anti-hijacking program that
included expanding the Federal Sky Marshal program started in 1961. These initial efforts were
noteworthy, but in 1972 two U.S. aircraft were hijacked within days of each other resulting in the
death of one airline employee, and another five persons injured. This incident spawned the 100%
screening of boarding passengers policy, a mandatory inspection of carry-on luggage in January
1973, and the placement of armed guards at all airport boarding gates. These security efforts
were not limited only to policy as then current advanced technologies and science were also
employed to enhance security operations such as the procurement of electronic security detection
devices. In 1972, $3.5 million dollars was allotted to procure detection devices, resulting in the
installation of metal detectors in airports by 1973. 5
The use of behavioral science was also employed to develop behavioral profiling training for
airport personnel in order to identify potential hijackers. Following 1972, there was a rapid
decline in the number of hijackings in the U.S., and there were zero hijackings in the first eight
months of 1973. An increasing number of anti-hijack related laws, security policies and applied
security technologies were put into place that had a significant impact on the declining hijacking
rate. These security measures had positive results. But it was an applied combination of
international response, implemented legal tools with harsh penalty, improved security policy
coupled with advanced technologies that successfully curbed the hijacking dilemma of the late
1960s and early 1970s. There were still sporadic accounts of aircraft hijackings, but for a period
of eight years following 1992, there were no hijack events within the United States. Prior to 9/11,
there was a significant lull in domestic hijack activity. 6

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 8

CHAPTER 3
DESIGN AND DEVELOPMENT

3.1 CURRENT SCENARIO
The current invention is a computerized control system for aircraft which will prevent
catastrophic damage and loss of life associated with terrorists hijacking large aircraft and using
them as flying bombs to destroy buildings, military bases and government installations, and to
kill people. The system works stand-alone or with existing aircraft equipment to monitor aircraft
position, velocity, and acceleration and give warnings to the pilot and to authorities when an
aircraft enters a prohibited airspace. The system further incorporates an override system which
will take control of an aircraft which has entered or is about to enter a designated prohibited
three-dimensional area. It also includes a code-entered override, which can be transmitted to the
pilot via radio, in the event that the aircraft is damaged and must land in a prohibited area such as
at a military base. This invention differs greatly from prior art (deker), in that it actively will
control the aircraft away from no zones, and work in conjunction with air traffic con trollers to
ensure safety within the no zone. It also will continuously calculate possible breaches in no
zones, and record all data pertaining to these breaches for investigation. This invention will also
keep aircraft from veering off-course when approaching runways while landing. This will protect
buildings and sensitive areas immediately around airports as well. 7

To paraphrase some of the more precise language appearing in the claims, an airplane anti-
hijacking system includes components on board an airplane for producing informational signals
reflecting conditions on board the airplane. Communications equipment on board the airplane
that can be activated during a hijack attempt or other emergency by onboard airplane personnel,
or by personnel at a remote station (eg a ground controller), automatically sends the
informational signals to a ground station or other remote station to provide real-time information
to the remote station.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 9

One embodiment sends audio, video, and sensor information along With the cockpit audio and
flight recorder information already being recorded by an onboard black box system, and the
communications equipment can be activated by cockpit personnel, predetermined senior flight
attendants, and onboard security personnel. Preferably, the communications equipment on board
the airplane is adapted to provide two-Way communications With the remote station and
includes means for enabling personnel at the remote station to activate the communications
equipment and to actuate control components on board the airplane that perform various onboard
operations (e.g., dumping fuel, controlling ?Ight, and destroying the airplane). In other
Words,personnel at the remote station can monitor onboard activities and, if desired, take over
?Ight control from those on board the airplane (including preventing onboard flight control), and
?Y the airplane by remote control. Thus, the invention provides a better Way to thwart hijacking
attempts Where the hijackers intend kamikaze style use of the plane they have hijacked. The
following illustrative drawings and detailed description make the fore going and other objects,
features, and advantages of the invention more apparent. 8

3.2 DESIGN CONCEPT

3.2.1 RADIO-FREQUENCY IDENTIFICATION (RFID)
A radio-frequency identification system uses tags, or labels attached to the objects to be
identified. Two-way radio transmitter-receivers called interrogators or readers send a signal to
the tag and read its response.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 10

Figure 3.1: RFID tags

RFID tags can be either passive, active or battery-assisted passive. An active tag has an on-board
battery and periodically transmits its ID signal. A battery-assisted passive (BAP) has a small
battery on board and is activated when in the presence of an RFID reader. A passive tag is
cheaper and smaller because it has no battery; instead, the tag uses the radio energy transmitted
by the reader. However, to operate a passive tag, it must be illuminated with a power level
roughly a thousand times stronger than for signal transmission. That makes a difference in
interference and in exposure to radiation.
Tags may either be read-only, having a factory-assigned serial number that is used as a key into a
database, or may be read/write, where object-specific data can be written into the tag by the

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 11

system user. Field programmable tags may be write-once, read-multiple; “blank” tags may be
written with an electronic product code by the user.
RFID tags contain at least three parts:
a. an integrated circuit for storing and processing information
that modulates and demodulates radio-frequency (RF) signals
b. a means of collecting DC power from the incident reader signal;
c. an antenna for receiving and transmitting the signal.
The tag information is stored in a non-volatile memory. The RFID tag includes either fixed or
programmable logic for processing the transmission and sensor data, respectively.
An RFID reader transmits an encoded radio signal to interrogate the tag. The RFID tag receives
the message and then responds with its identification and other information. This may be only a
unique tag serial number, or may be product-related information such as a stock number, lot or
batch number, production date, or other specific information. Since tags have individual serial
numbers, the RFID system design can discriminate among several tags that might be within the
range of the RFID reader and read them simultaneously.

Table 3.1: Features of the different RFID tags

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 12

Table 3.1: Comparison between Active and Passive RFID tags

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 13

3.2.2 WORKING OF RFID SYSTEM
A RFID system is made up of two parts: a tag or label and a reader. RFID tags or labels are
embedded with a transmitter and a receiver.

Figure 3.2: Working of an RFID system

The RFID component on the tags have two parts: a microchip that stores and processes
information, and an antenna to receive and transmit a signal. The tag contains the specific serial
number for one specific object.
To read the information encoded on a tag, a two-way radio transmitter-receiver called an
interrogator or reader emits a signal to the tag using an antenna. The tag responds with the
information written in its memory bank. The interrogator will then transmit the read results to an
RFID computer program.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 14

3.3 COMPONENT DETAILS
All the components used in this project are specified below with their respective configurations.
The components used are,
1. Raspberry Pi PC
2. DC Motor
3. Joystick
4. Micro Servos

3.3.1 RASPBERRY PI
Raspberry Pi board is a miniature marvel, packing considerable computing power into a footprint
no larger than a credit card.
The processor at the heart of the Raspberry Pi system is a Broadcom BCM2835 system-on-chip
(SoC) multimedia processor. This means that the vast majority of the system’s components,
including its central and graphics processing units along with the audio and communications
hardware, are built onto that single component hidden beneath the 256 MB memory chip at the
center Developed by Acorn Computers back in the late 1980s, the ARM architecture is a
relatively uncommon sight in the desktop world. Where it excels, however, is in mobile devices:
the phone in your pocket almost certainly has at least one ARM-based processing core hidden
away inside. Its combination of a simple reduced instruction set (RISC) architecture and low
power draw make it the perfect choice over desktop chips with high power demands and
complex instruction set (CISC) architectures.
The ARM-based BCM2835 is the secret of how the Raspberry Pi is able to operate on just the
5V 1A power supply provided by the onboard micro-USB port. It’s also the reason why you
won’t find any heat-sinks on the device: the chip’s low power draw directly translates into very
little waste heat, even during complicated processing tasks.
It does, however, mean that the Raspberry Pi isn’t compatible with traditional PC software. The
majority of software for desktops and laptops is built with the x86 instruction set architecture in

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 15

mind, as found in processors from the likes of AMD, Intel and VIA. As a result, it won’t run on
the ARM-based Raspberry Pi.
The BCM2835 uses a generation of ARM’s processor design known as ARM11, which in turn is
designed around a version of the instruction set architecture known as ARMv6. This is worth
remembering: ARMv6 is a lightweight and powerful architecture, but has a rival in the more
advanced ARMv7 architecture used by the ARM Cortex family of processors. Software
developed for ARMv7, like software developed for x86, is sadly not compatible with the
Raspberry Pi’s BCM2835—although developers can usually convert the software to make it
suitable.
Another important difference between the Raspberry Pi and your desktop or laptop, other than
the size and price, is the operating system—the software that allows you to control the computer.
The majority of desktop and laptop computers available today run one of two operating systems:
Microsoft Windows or Apple OS X. Both platforms are closed source, created in a secretive
environment using proprietary techniques.
These operating systems are known as closed source for the nature of their source code, the
computer-language recipe that tells the system what to do. In closed-source software, this recipe
is kept a closely-guarded secret. Users are able to obtain the finished software, but never to see
how it’s made.
The Raspberry Pi, by contrast, is designed to run an operating system called GNU/Linux—
hereafter referred to simply as Linux. Unlike Windows or OS X, Linux is open source: it’s
possible to download the source code for the entire operating system and make whatever changes
you desire. Nothing is hidden, and all changes are made in full view of the public. This open
source development ethos has allowed Linux to be quickly altered to run on the Raspberry Pi, a
process known as porting. At the time of this writing, several versions of Linux—known as
distributions—have been ported to the Raspberry Pi’s BCM2835 chip, including Debian, Fedora
Remix and Arch Linux.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 16

Figure 3.3: Raspberry Pi

The Pi’s hardware is controlled by settings contained in a file called config.txt, which is located
in the /boot directory (see Figure). This file tells the Pi how to set up its various inputs and
outputs, and at what speed the BCM2835 chip and its connected memory module should run.
If you’re having problems with graphics output, such as the image not filling the screen or
spilling over the edge, config.txt is where you’ll be able to fix it. Normally, the file is empty or—
on some distributions—simply not present; this just means that the Pi will operate using its
preset defaults. If you want to make changes and the file isn’t there, just create a new text file
called config.txt and fill in the settings you want to change.
The config.txt file can control almost all aspects of the Pi’s hardware, with the exception of the
way the central processing unit (CPU) and graphics processing unit (GPU) sections of the
BCM2835 apportion the memory.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 17

Figure 3.4: Contents of the boot directory

3.3.2 DC TOY / HOBBY MOTOR – 130 SIZE
These are standard ‘130 size’ DC hobby motors.
They come with a wider operating range than most toy motors, that is, from 4.5 to 9VDC instead
of 1.5-4.5V.
This range makes them perfect for controlling with an Adafruit Motor Shield, or with an Arduino
where you are more likely to have 5 or 9V available than a high current 3V setting. They’ll fit in
most electronics that already have 130-size motors installed and there’s two breadboard-friendly
wires soldered on already for fast prototyping.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 18

Figure 3.5: DC Hobby motor

Specifications:
Operating Temperature: -10°C ~ +60°C
Rated Voltage: 6.0VDC
Rated Load: 10 g*cm
No-load Current: 70 mA max
No-load Speed: 9100 ±1800 rpm
Loaded Current: 250 mA max
Loaded Speed: 4500 ±1500 rpm
Starting Torque: 20 g*cm
Starting Voltage: 2.0
Stall Current: 500mA max

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 19

Body Size: 27.5mm x 20mm x 15mm
Shaft Size: 8mm x 2mm diameter
Weight: 17.5 grams

3.3.3 JOYSTICK
Lots of robotic projects need a joystick. This module offers an affordable solution to that. The
Joystick module is similar to analog joysticks found in gamepads. It is made by mounting two
potentiometers at a 90 degrees angle. The potentiometers are connected to a short stick centered
by springs.
This module produces an output of around 2.5V from X and Y when it is in resting position.
Moving the joystick will cause the output to vary from 0v to 5V depending on its direction. If
you connect this module to a microcontroller, you can expect to read a value of around 512 in its
resting position (expect small variations due to tiny imprecisions of the springs and mechanism)
When you move the joystick you should see the values change from 0 to 1023 depending on its
position.

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 20

Figure 3.6: Joystick
Specifications:
Directional movements are simply two potentiometers – one for each axis Compatible with
Arduino interface
The biaxial XY Joystick Module KY-023 applies ARDUINO
Dimensions: 1.57 in x 1.02 in x 1.26 in (4.0 cm x 2.6 cm x 3.2 cm)
5 Pin
Color: Black

Pin Configuration:
GND: ground
+5V: 5V DC
VRx: voltage proportional to x position

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 21

VRy: voltage proportional to y position
SW: switch pushbutton

Figure 3.7: Schematic Diagram of Joystick

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 22

Figure 3.8: Wiring diagram of Joystick
3.3.4 MFRC522 STANDARD PERFORMANCE MIFARE AND NTAG
FRONTEND
The MFRC522 is a highly integrated reader/writer IC for contactless communication at 13.56
MHz. The MFRC522 reader supports ISO/IEC 14443 A/MIFARE and NTAG.
The MFRC522’s internal transmitter is able to drive a reader/writer antenna designed to
communicate with ISO/IEC 14443 A/MIFARE cards and transponders without additional active
circuitry. The receiver module provides a robust and efficient implementation for demodulating
and decoding signals from ISO/IEC 14443 A/MIFARE compatible cards and transponders. The
digital module manages the complete ISO/IEC 14443 A framing and error detection (parity and
CRC) functionality.
The MFRC522 supports MF1xxS20, MF1xxS70 and MF1xxS50 products. The MFRC522
supports contactless communication and uses MIFARE higher transfer speeds up to 848 kBd in
both directions.
The following host interfaces are provided:

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 23

? Serial Peripheral Interface (SPI)
? Serial UART (similar to RS232 with voltage levels dependant on pin voltage supply)
? I2C-bus interface

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 24

Figure 3.9: Detailed Block Diagram of MFRC522

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 25

Figure 3.10: Pin configuration

Table 2.3: Pin Description

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 26

Table 3.3: Pin description (contd)

1 Pin types: I = Input, O = Output, I/O = Input/Output, P = Power and G = Ground.
2 The pin functionality.
3 Connection of heat sink pad on package bottom side is not necessary.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 27

3.3.5 MICRO SERVO
Tiny and lightweight with high output power. Servo can rotate approximately 180 degrees (90 in
each direction), and works just like the standard kinds but smaller. You can use any servo code,
hardware or library to control these servos. Good for beginners who want to make stuff move
without building a motor controller with feedback & gear box, especially since it will fit in small
places. It comes with a 3 horns (arms) and hardware.

Figure 3.11: Micro Servo

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 28

Specifications
Weight: 9 g
Dimension: 22.2 x 11.8 x 31 mm approx.
Stall torque: 1.8 kgf·cm
Operating speed: 0.1 s/60 degree
Operating voltage: 4.8 V (~5V)
Dead band width: 10 ?s
Temperature range: 0 ºC – 55 ºC

Figure 3.12: Servo specifications

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 29

Figure 3.13: Servo wiring

3.4 WORKING PRINCIPLE
? An anti –hijack system is an electronic system fitted to aircraft to deter criminals from
hijacking
? An approved anti –hijacking system will achieve a safe, quick shutdown of the vehicle it
is attached
? Component used in the system is raspberry pi, RFID tag and reader servo motor ,joystick
,bread board, all these component are connected by jumper cables to the bread board
? Raspberry pi is the small computer ,from controlling hardware with python ,to using it
as a media center and it has multi media and 3d graphics capabilities
? Joystick is used to operate the primary control surface ,rudder and elevator control
surface
? There are 2 servo motor ,we have used 9g servo to move the control surface as the
joystick is operated

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 30

? RFID reader and rfid tag is used ,RFID reader is continuously sends radio waves of
particular frequency if the object om which passive RFID tag is attached is within the
range of this radio waves then it sends the feedback to this RFID reader
? Here we use 2 RDID tag both should be detected together ,it will detect only the tag is
more than 10 sec
? After 10 sec the system go to auto mode

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 31

Figure 3.14: Developed Proof of Concept

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 32

Figure 3.15: Near field RF waves Detection device

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 33

Figure 3.16: Raspberry Pi PC controller

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 34

Figure 3.17: Servo motor for Control Surface actuation

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 35

Figure 3.18: Developed User Interface of control

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 36

3.5 ASSEMBLY AND WORKING
A typical block diagram of the system is shown below. The response from every component is
shown in a detailed way.
The signal input from the RFID tag is sent to the Raspberry pi. A constant current circuit is
established between the Micro Controller and the Tagging Devices.
A Stipulated advanced response systems is used to retract the information from every step using
determinants. This information is used to determine the response of each step in the output
frequency.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 37

Figure 3.19: Block Diagram of working principle

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 38

Wiring Diagram consists a detail section of joining and making connections to and from from the
bread board to all the other components.
The Raspberry Pi Consists of pins that connect from the microcontroller to all the components of
the system.
The Jumper cables run from the pins to the bread board to the Raspberry pi PC
The Raspberry pi Pc acts as the Computer of the system, thus sending and receiving signals
from the RFID system.
In the development of the proof of concept the system, the system is initially started using
a Power supply.
The System is switched ON is connected to a computer or a Monitor to view the program. The
aircraft simulation mode is then turned on.
The system is actuated using the Joystick control. The joystick control is determined in the X and
Y axis. The actuation of the rudders and Elevators are done via the the controls of the Joystick.
The AUTHORISED RFID tags are brought closer to the system, the Anti- Hijacking system is
activated.
If the RFID tags remain in the triggered location for a period of 10secs, the system is activated
and the manual input to the system is terminated. The Aircraft runs in the Pre-Determined
location on autopilot.
The safe location is entered depending on every flight plan.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 39

Figure 3.20: Wiring Diagram

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 40

3.6 DEVELOPMENT OF PYTHON CODE
Flexible and powerful, Python was originally developed in the late 1980s at the National
Research Institute for Mathematics and Computer Science by Guido van Rossum as a successor
to the ABC language. Since its introduction, Python has grown in popularity thanks to what is
seen as a clear and expressive syntax developed with a focus on ensuring that code is readable.
Python is a high-level language. This means that Python code is written in largely recognizable
English, providing the Pi with commands in a manner that is quick to learn and easy to follow.
This is in marked contrast to low-level languages, like assembler, which are closer to how the
computer ?thinks? but almost impossible for a human to follow without experience. The high-
level nature and clear syntax of Python make it a valuable tool for anyone who wants to learn to
program. It is also the language that is recommended by the Raspberry Pi Foundation for those
looking to progress from the simple Scratch to more ?hands-on? programming.
Python is published under an open-source license, and is freely available for Linux, OS X and
Windows computer systems. This cross-platform support means that software written using
Python on the Pi can be used on computers running almost any other operating system as well—
except where the program makes use of Pi-specific hardware such as the GPIO Port.
A Python project is, at heart, nothing more than a text file containing written instructions for the
computer to follow. This file can be created using any text editor. For example, if you enjoy
working at the console or in a terminal window, you can use nano; or if you prefer a graphical
user interface (GUI), you can use Leafpad. Another alternative is to use an integrated
development environment (IDE) such as IDLE, which provides Python-specific functionality
that’s missing from a standard text editor, including syntax checking, debugging facilities and
the ability to run your program without having to leave the editor. This chapter gives you
instructions on how to create Python files using IDLE, but of course, the IDE program that you
choose to use for programming is up to you. The chapter also includes instructions for running
your created files directly from the terminal, which can be used in conjunction with any text
editor or other IDE.
To begin the project, open IDLE from the Programming menu in the Debian distribution’s
desktop environment. If you’re not using IDLE, create a blank document in your favourite text

DESIGN ; DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 41

editor and skip the rest of this paragraph. By default, IDLE opens up in Python shell mode, so
anything you type in the initial window will be immediately executed.
To open a new Python project which can be executed later, click on the File menu and choose
New Window to open a blank file.
Normally, the only way to run a Python program is to tell the Python software to open the file.
With the shebang line at the top of the file, however, it’s possible to execute the file directly
without having to call Python first. This can be a useful way of making your own tools that can
be executed at the terminal: once copied into a location in the system’s $PATH environment
variable, the Python program can be called simply by typing its name.
First, you need to tell Linux that the Python file should be marked as executable—an attribute
that means the file is a program. To protect the system from malware being downloaded from the
Internet this attribute isn’t automatically set, since only files that are marked as executable will
run.
The following is the python code developed:

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 42

CHAPTER 4
RESULTS AND DISCUSSIONS

4.1 PROGRAM RESULTS

Figure 4.1: Activated System – The Red Light shows that the developed system is active and
working for Inputs

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 43

Figure 4.2: The System is initiated using a python code.

The code sufficiently runs the developed program and initializes a GUI to demonstrate the
working of the System.

Figure 4.3: GUI of the developed program

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 44

Figure 4.4 (a)

Figure 4.4 (b)
Figure 4.4 (a) & (b): On Actuation of the rudder from the Joystick, the GUI shows Deflection.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 45

Figure 4.5 (a)

Figure 4.5 (b)
Figure 4.5 (a) & (b): On Actuation of the ELEVATOR from the Joystick, the GUI shows
Deflection.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 46

Figure 4.6 (a)

Figure 4.6 (b)
Figure 4.6 (a) & (b): When the 2 RFID tags are placed on the RFID sensors, the System detects
the presence of the RFID tags and the sends the command to the PROGRAMMED GUI. The
system is initiated and the COUNTDOWN is begun.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 47

Figure 4.7: The Control System is then DISABLED and AUTOPILOT is ENGAGED.

Hence the proof of concept for the developed project is PROVED SUCESSFULLY.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 48

CHAPTER 5
CONCLUSIONS

? A proof of concept system is developed and demonstrated to prevent hijacking attempt of
aircraft.
? The system is mainly based on Raspberry Pi PC and the control program is written in the
scripting language Python
? The system will disable manual control of the aircraft, if a particular condition is met
persistently beyond the predefined time limit.
? The condition to be met is simultaneous detection two authorised RFID tags for more than a
predefined time period of 10 seconds
? The system is seen to be operated till the time period of 10 seconds and becomes inoperative
and is seen to take control of aircraft by triggering auto pilot beyond 10 seconds.
? The system will not allow any manual input such as disabling the system since this can result
in vulnerability
? As a part of the literature survey is carried out to get details of other anti aircraft hijacking
systems explored in the past
? As seen in the literature survey, all the proposed mechanism have a drawback of either operating
from the cabin or a possibility to disable the system manually
? Two RFID sensors and tags, two servos and one joy stick were used in this work
? The system is developed by developing the individual systems first followed by the the
integration of them later.
? The system is shown to work based on the concept described above.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 49

CHAPTER 6
FUTURE SCOPE

The proof of concept for the MANUAL DISABLEING OF THE SYSTEM is developed. In the
near future this concept can be applied to the actual aircraft working.
A Inertial Navigation System or a Instrument Navigation system can be incorporated with the
present developed system and made to work with additions to the AUTOPILOT system.
If worked upon, then the aircraft can be successfully steered away from an Attempt of Hijacking
and thus proving a way of stopping a Hijacking attempt on Civil aviation and thus saving lives.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 50

REFERENCES

1 ?Hijacking of Aircraft, Aviation Security and Terrorist Activity Latest Update 24,? vol. 1, no.
October, pp. 1–7, 2014.
2 Ahlers, Mike. ?Report: felons hired in rush to fill screener jobs.? CNN.Com, Available from
(accessed Oct 2007).
3 Aircraft Owners and Pilots Association. ?Senate to consider enhanced TFR enforcement over
weapons storage facilities.? AOPA Online. Available from (accessed Dec 2006).
4 Aircraft Owners and Pilots Association. ?Serious security — Air Force says it will shoot
Super Bowl TFR violators.? AOPA Online. Available from (accessed Dec 2006).
5 Anderson, John Ward and Karen De Young. ?Plot to Bomb U.S.-Bound Jets Is Foiled.?
Washington Post, 11 Aug 2006. Available from (accessed May 2007).
6 Berrick, Cathleen A. Aviation Security: DHS Has Made Progress in Securing the
Commercial Aviation System, But Key Challenges Remain. Washington D.C.: Government
Accountability Office, 2007.
7 Bryan, Richard H. Testimony before the Subcommittee on Aviation of the Committee on
Commerce, Science and Transportation. Congress No. 106, Session No. 2. 6 Apr 2000.
8 Bush, George W. The Department of Homeland Security: Administration Homeland
9 Bush, George W. The National Strategy for the Physical Protection of Critical
10 C. Liu, ?(19) United States (12),? vol. 1, no. 19, 2008.
11 CBS News. ?Bulletproof Cockpit Doors a Reality.? CBS News Online (accessed Oct
2007).
12 D. G. Ryan, ?United States Patent 1191 I I l l,? 1976.
13 Dillingham, Gerald. Testimony before the Subcommittee on Aviation of the Committee
on Commerce, Science and Transportation. Congress No. 106, Session No. 2. 6 Apr 2000.
14 Dugan, Laura, Gary Lafree, Alex R. Piquero. 2005. ?Testing A Rational Choice Model of
Airline Hijackings.? Criminology, Vol. 43, No. 4.
15 Elias, Bart, and William J. Krouse. Terrorist Watchlist Checks and Air Passenger
Screening. Washington D.C.: Congressional Research Service, 2006.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 51

16 Elias, Bart, William Krouse and Ed Rappaport. Homeland Security: Air Passenger
Prescreening and Counterterrorism. Washington D.C.: Congressional Research Service,
2005.
17 Elias, Bartholomew. Air Cargo Security. Washington D.C.: Congressional Research
Service, 2003.
18 H. M. Valencia, ?nm f,? vol. 1, no. 19, 2003.
19 Infrastructures and Key Assets. Washington D.C., 2003.
20 J. Simon and T. Tipton, ?United States Patent v 19 ,? 1990.
21 M. Ord, ?Airplane Hijacking Prevention System,? pp. 1–5, 1972.
22 M. Paul, ?Securing the aviation transportation system NAVAL POSTGRADUATE by,?
2007.
23 P. A. Publication, ?x,? vol. 1, no. 19, 2003.
24 S. Clara et al., ?(12) United States Patent,? vol. 2, no. 12, 2012.
25 S. Kirsch,; ?l RELAY,? vol. 1, no. 10, 2003.
26 S. Kong, F. Application, and P. Data, ?( 12 ) United States Patent,? vol. 2, no. 12, pp. 12-
15, 2011.
27 S. Ram, ?United States Patent,? vol. 1, no. 12, pp. 1–6, 2002.
28 Security Actions Since September 11. The White House. Available from (accessed Oct
2007).
29 T. Kumagai, ?( 2 ) Patent Application Publication ( 10 ) Pub . No .: US 2003 / 0060534
A1,? vol. 1, no. 19, 2003.
30 T. S. Administration, ?Aviation Security,? pp. 1–94, 2008.

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 52

APPENDIX

DEVELOPMENT OF CODE TO RUN MOTOR:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

“””
Class in Python 2.7 for simultaneous reading of RFID tags through two modules
RFID-RC522 using the SPI interface of Raspberry Pi through the MFRC522 driver.

Credits and License: Created by Mario Gómez, adapted by Erivando Sena(2016)

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
“””

import signal
from module.MFRC522 import MFRC522
from module.pinos import PinoControle
import time

##from MFRC522 import MFRC522
##from pinos import PinoControle

__author__ = “Erivando Sena Ramos (Adaptations)”
__copyright__ = “Mario Gómez”
__email__ = “[email protected]
__status__ = “Prototype”

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 53

class Nfc522(object):

pc = PinoControle()
MIFAREReader = None
RST1 = 22 #GPIO
RST2 = 22 #GPIO
SPI_DEV0 = ‘/dev/spidev0.0’
SPI_DEV1 = ‘/dev/spidev0.1’

def obtem_nfc_rfid(self, autenticacao=False):
try:
self.MIFAREReader = MFRC522(self.RST1, self.SPI_DEV0)
## while True:
(status, TagType) =
self.MIFAREReader.MFRC522_Request(self.MIFAREReader.PICC_REQIDL)
(status, uid) = self.MIFAREReader.MFRC522_Anticoll()

if status == self.MIFAREReader.MI_OK:
## print “Ganesh 1”
gid1 = self.obtem_tag(self.MIFAREReader, status, uid, autenticacao)
## return gg
## print “GID1:” + str(gg)
else:
self.pc.atualiza(self.RST1, self.pc.baixo())
## print “GID1: No”

gid1 = 0

except Exception as e:
print e

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 54

try:
self.MIFAREReader = MFRC522(self.RST2, self.SPI_DEV1)

#while True:
(status, TagType) =
self.MIFAREReader.MFRC522_Request(self.MIFAREReader.PICC_REQIDL)
(status, uid) = self.MIFAREReader.MFRC522_Anticoll()

if status == self.MIFAREReader.MI_OK:

gid2= self.obtem_tag(self.MIFAREReader, status, uid, autenticacao)
## print “GID2:” + str(ggg)
else:
self.pc.atualiza(self.RST2, self.pc.baixo())
## print “GID2: No”
gid2=0
## return None

except Exception as e:
print e
#finally:
#self.MIFAREReader.fecha_spi()

return gid1,gid2

def obtem_tag(self, MIFAREReader, status, uid, autenticacao):
try:
if autenticacao:

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 55

# Chave padrão para a autenticação
key = 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
MIFAREReader.MFRC522_SelectTag(uid)
status =
MIFAREReader.MFRC522_Auth(MIFAREReader.PICC_AUTHENT1A, 8, key, uid)
if status == MIFAREReader.MI_OK:
MIFAREReader.MFRC522_Read(8)
MIFAREReader.MFRC522_StopCrypto1()
else:
print “Erro na autenticação!”
return None
tag_hexa = ”.join(str(hex(x)2:4).zfill(2) for x in uid:-1::-1) #Returns
in hexadecimal
return int(tag_hexa.upper(), 16) #Returns in decimal
except Exception as e:
print e

# Capture SIGINT for cleanup when the script is aborted
def end_read(signal,frame):
global continue_reading
print “Ctrl+C captured, ending read.”
continue_reading = False
## GPIO.cleanup()

# Hook the SIGINT
signal.signal(signal.SIGINT, end_read)

nfc = Nfc522()

continue_reading = True
print ”
Waiting for Tag
—————”

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 56

while continue_reading:
print_opt = 0

gid1,gid2 = nfc.obtem_nfc_rfid()
##print “G Read TAG Number: ” +str(id)

if not gid1==0:
print “ID of first Tag is:” + str(gid1)
print_opt = 1
if not gid2==0:
print “ID of SecondTag is:” + str(gid2)
print_opt = 1

if print_opt==1:
print ”
Waiting for Tag
—————”
time.sleep(1)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 57

DEVELOPMENT OF CODE TO READ RFID:

import RPi.GPIO as GPIO # import GPIO librery

from time import sleep

GPIO.setmode(GPIO.BCM)

Motor1A = 18# set GPIO-02 as Input 1 of the controller IC

Motor1B = 23 # set GPIO-03 as Input 2 of the controller IC

Motor1E = 24 # set GPIO-04 as Enable pin 1 of the controller IC

GPIO.setup(Motor1A,GPIO.OUT)

GPIO.setup(Motor1B,GPIO.OUT)

GPIO.setup(Motor1E,GPIO.OUT)

pwm=GPIO.PWM(24,100) # configuring Enable pin means GPIO-04 for PWM

pwm.start(100) # starting it with 50% dutycycle

print “GO forward”

GPIO.output(Motor1A,GPIO.HIGH)

GPIO.output(Motor1B,GPIO.LOW)

GPIO.output(Motor1E,GPIO.HIGH)

sleep(2)

# this will run your motor in forward direction for 2 seconds with 50% speed.

pwm.ChangeDutyCycle(30) # increasing dutycycle to 80

print “GO backward”

GPIO.output(Motor1A,GPIO.HIGH)

GPIO.output(Motor1B,GPIO.LOW)

GPIO.output(Motor1E,GPIO.HIGH)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 58

sleep(2)

# this will run your motor in reverse direction for 2 seconds with 80% speed by supplying 80%
of the battery voltage

print “Now stop”

GPIO.output(Motor1E,GPIO.LOW)

pwm.stop() # stop PWM from GPIO output it is necessary

GPIO.cleanup()

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 59

DEVELOPMENT OF CODE TO RUN MODULES AND COMPLETE
PROGRAM:

# Simple example of reading the MCP3008 analog input channels and printing
# them all out.
# Author: Tony DiCola
# License: Public Domain
import time

# Import SPI library (for hardware SPI) and MCP3008 library.
##import Adafruit_GPIO.SPI as SPI
import Adafruit_MCP3008.MCP3008 #as Adafruit_MCP3008

#importing GUI elements
from PyQt4 import QtGui,QtCore
from joy_stick_mcp3008_raspberry_pyqt_gui import Ui_MainWindow
import sys
import RPi.GPIO as GPIO

#For RFID
import signal
from module.MFRC522 import MFRC522
from module.pinos import PinoControle

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 60

import time

#For DC motor
from random import *
# Software SPI configuration:
CLK = 5
MISO = 6
MOSI = 13
CS = 19
mcp = Adafruit_MCP3008.MCP3008(clk=CLK, cs=CS, miso=MISO, mosi=MOSI)

# Hardware SPI configuration:
# SPI_PORT = 0
# SPI_DEVICE = 0
# mcp = Adafruit_MCP3008.MCP3008(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE))

#initiating PWM for servos

gpin1=20
gpin2=21

GPIO.setmode(GPIO.BCM)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 61

GPIO.setup(gpin1, GPIO.OUT)
pwm1 = GPIO.PWM(gpin1, 100)
pwm1.start(5)
pwm1.ChangeDutyCycle(5)

GPIO.setup(gpin2, GPIO.OUT)
pwm2 = GPIO.PWM(gpin2, 100)
pwm2.start(5)

Motor1A = 18# set GPIO-02 as Input 1 of the controller IC

Motor1B = 23 # set GPIO-03 as Input 2 of the controller IC

Motor1E = 24 # set GPIO-04 as Enable pin 1 of the controller IC

GPIO.setup(Motor1A,GPIO.OUT)

GPIO.setup(Motor1B,GPIO.OUT)

GPIO.setup(Motor1E,GPIO.OUT)

pwm=GPIO.PWM(24,100) # configuring Enable pin means GPIO-04 for PWM
pwm.start(0)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 62

motor_on=0

class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.setupUi(self)
self.dial.valueChanged.connect(self.dialchange)
self.dial_2.valueChanged.connect(self.dial2change)
self.spinBox_motor.valueChanged.connect(self.motorchange)

def dialchange(self, value):
## print(“G – ” + value)
duty = float(value) / 10.0 + 2.5

pwm1.ChangeDutyCycle(duty)
QtGui.qApp.processEvents()

def dial2change(self, value):
duty = float(value) / 10.0 + 2.5
pwm2.ChangeDutyCycle(duty)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 63

QtGui.qApp.processEvents()

def motorchange(self, value):
global motor_on
if motor_on==0:
pwm1.stop
pwm2.stop
motor_on=1

duty = float(value)
pwm.ChangeDutyCycle(duty)
QtGui.qApp.processEvents()
class Nfc522(object):

pc = PinoControle()
MIFAREReader = None
RST1 = 22 #GPIO
RST2 = 22 #GPIO
SPI_DEV0 = ‘/dev/spidev0.0’
SPI_DEV1 = ‘/dev/spidev0.1’

def obtem_nfc_rfid(self, autenticacao=False):
try:

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 64

self.MIFAREReader = MFRC522(self.RST1, self.SPI_DEV0)
## while True:
(status, TagType) =
self.MIFAREReader.MFRC522_Request(self.MIFAREReader.PICC_REQIDL)
(status, uid) = self.MIFAREReader.MFRC522_Anticoll()

if status == self.MIFAREReader.MI_OK:
## print “Ganesh 1”
gid1 = self.obtem_tag(self.MIFAREReader, status, uid, autenticacao)
## return gg
## print “GID1:” + str(gg)
else:
self.pc.atualiza(self.RST1, self.pc.baixo())
## print “GID1: No”

gid1 = 0

except Exception as e:
print e

try:
self.MIFAREReader = MFRC522(self.RST2, self.SPI_DEV1)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 65

#while True:
(status, TagType) =
self.MIFAREReader.MFRC522_Request(self.MIFAREReader.PICC_REQIDL)
(status, uid) = self.MIFAREReader.MFRC522_Anticoll()

if status == self.MIFAREReader.MI_OK:

gid2= self.obtem_tag(self.MIFAREReader, status, uid, autenticacao)
## print “GID2:” + str(ggg)
else:
self.pc.atualiza(self.RST2, self.pc.baixo())
## print “GID2: No”
gid2=0
## return None

except Exception as e:
print e
#finally:
#self.MIFAREReader.fecha_spi()

return gid1,gid2

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 66

def obtem_tag(self, MIFAREReader, status, uid, autenticacao):
try:
if autenticacao:

key = 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
MIFAREReader.MFRC522_SelectTag(uid)
status =
MIFAREReader.MFRC522_Auth(MIFAREReader.PICC_AUTHENT1A, 8, key, uid)
if status == MIFAREReader.MI_OK:
MIFAREReader.MFRC522_Read(8)
MIFAREReader.MFRC522_StopCrypto1()
else:
print “Error”
return None
tag_hexa = ”.join(str(hex(x)2:4).zfill(2) for x in uid:-1::-1) #Returns
in hexadecimal
return int(tag_hexa.upper(), 16) #Returns in decimal
except Exception as e:
print e

# Capture SIGINT for cleanup when the script is aborted
def end_read(signal,frame):

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 67

global continue_reading
print “Ctrl+C captured, ending read.”
continue_reading = False

# Hook the SIGINT
signal.signal(signal.SIGINT, end_read)

nfc = Nfc522()

app = QtGui.QApplication(sys.argv)
window = MainWindow()
window.show()
no_of_sec_waited = 0
cont_refuse = 0
##i = 10
def update_label():
## current_time = str(datetime.datetime.now().time())
global no_of_sec_waited, cont_refuse, motor_on

if not cont_refuse == 1:
adc0 = mcp.read_adc(0)
xval = adc0*180/1024
yval = mcp.read_adc(1)*180/1024

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 68

window.dial.setValue(xval)
window.dial_2.setValue(yval)

green_led = “icons/green-led.png”
red_led = “icons/red-led.png”

## window.rfid_led1.setPixmap(QtGui.QPixmap(red_led))

id1 = 3643121787
id2 = 3643057763
id1_on = 0
id2_on = 0
no_of_secs_to_wait = 10

gid1,gid2 = nfc.obtem_nfc_rfid()
##print “G Read TAG Number: ” +str(id)

if gid1==id1 or gid1==id2:
id1_on = 1
if gid2==id1 or gid2==id2:
id2_on = 1

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 69

if id1_on==1 and id2_on==0:
detection_status=”First ID Detected”
if id1_on==0 and id2_on==1:
detection_status=”Second ID Detected”
if id1_on==1 and id2_on==1:
detection_status=”Both ID’s Detected”
if id1_on==0 and id2_on==0:
detection_status=”None Detected”

if not id1_on==0:

## print_opt = 1
window.rfid_led1.setPixmap(QtGui.QPixmap(red_led))
window.tagid1.setText(str(gid1))
else:
window.rfid_led1.setPixmap(QtGui.QPixmap(green_led))
window.tagid1.setText(“ID1”)
if not id2_on==0:
window.rfid_led2.setPixmap(QtGui.QPixmap(red_led))
window.tagid2.setText(str(gid2))
else:
window.rfid_led2.setPixmap(QtGui.QPixmap(green_led))

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 70

window.tagid2.setText(“ID2”)

window.rfid_status.setText(detection_status)

if detection_status == “Both ID’s Detected”:
no_of_sec_waited = no_of_sec_waited + 0.1
if no_of_sec_waited > no_of_secs_to_wait:
window.cont_led.setPixmap(QtGui.QPixmap(red_led))
window.cont_status.setText(“Control Disabled. Autopilot Triggered. safe coordinates
set”)
window.dial.setValue(180)
window.dial_2.setValue(0)
cont_refuse = 1
window.cont_status_2.setText(“”)
pwm.ChangeDutyCycle(100)

else:
rem_seconds = no_of_secs_to_wait – no_of_sec_waited
sts2_text = “Auto pilot will be triggered after ” + str(rem_seconds) + ” seconds”
window.cont_status_2.setText(sts2_text )
time.sleep(0.1)
else:
window.cont_status_2.setText(“”)

DESIGN & DEVELOPMENT OF A SYSTEM TO DISABLE MANUAL CONTROL OF AN AIRCRAFT
Department of Aeronautical Engineering, DSCE Page 71

no_of_sec_waited = 0

else:
## window.dial.setValue(180)
motor_val=90+10*random()
window.spinBox_motor.setValue(motor_val)

pwm.ChangeDutyCycle(float(100))
QtGui.qApp.processEvents()
time.sleep(0.1)
## print(xval)
## window.dialchange(xval)

## i = i+ 10

timer = QtCore.QTimer()
print “g”
timer.timeout.connect(update_label)
timer.start(100) # every 10,000 milliseconds##window.listen()
sys.exit(app.exec_())