touchscreen based controller of security scanner

International Journal of Industrial Electronics and Electrical Engineering, ISSN: 2347-6982
Volume-2, Issue-6, June-2014
Dept. of Electronics and Telecommunication, Army Institute of Technology, Pune, India
Abstract- The aim of this paper is to design a touchscreen based security scanner of Bharat Electronics which can replace the
regular controller that they have. the controller will be interfaced with both the computer and the IR sensor of the conveyer
belt. The interfacing with the computer will enable us to control the functions like Zoom In, Zoom Out, Negative, Next Image,
Previous Image etc. Interfacing with the IR sensor will enable us to move the conveyer belt forward, reverse, or to stop it based
on what is required.
Keywords- Adruino Duemilanove w/ATmega328, Graphical Liquid Crystal Display, Keyboard Waveforms, Security
emitting screen receives the beam after it has passed
through the object and emits a light pattern in
accordance with the characteristics of the object being
scanned. The light output of the screen is received by
an array of photodetectors which generate electrical
signals in accordance with the intensity of the light
received thereby. The outputs of the photo-detectors
are sequentially sampled to provide a series of signals
in accordance with the photo-detector outputs. These
signals are converted to digital form and stored in a
memory. The output of the memory is fed through
appropriate video output circuits to a video monitor
where an image of the object being scanned is
While you are stepping through the metal detector,
items are going through
the X-rayssystem. A conveyor belt carries each item
past an X-ray machine. X-rays are like light in that
they are electromagnetic waves, but they are more
energetic, so they can penetrate many materials. The
machine used in airports usually is based on
a dual-energy X-ray system. This system has a single
X-ray source sending out X-rays, typically in the range
of 140 to 160kilovoltpeak (KVP). KVP refers to the
amount of penetration an X-ray makes. The higher the
KVP, the further the X-ray penetrates.
Figure .2: In A Dual-Energy X-Ray System, The X-Rays Pass
Through A Detector, A Filter And Then Another Detector.
Since different materials absorb X-rays at different
levels, the image on the monitor lets the machine
operator see distinct items inside your bag. Items are
typically colored on the display monitor, based on the
range of energy that passes through the object, to
represent one of three main categories:
While the colors used to signify "inorganic" and
"metal" may vary between manufacturers, all X-ray
systems use shades of orange to represent "organic."
Figure 1: X-ray Based Security Scanner.
A baggage system which employs a fan-shaped x-ray
beam which scans baggage on a conveyor belt and
produces images of the contents of the baggage on a
video monitor. The output of an x-ray source is
collimated into a narrow linear beam.
Objects to be scanned are exposed to this beam with
successive slices of the object being as exposed as the
conveyor moves the object past the beam. A light
Touchscreen Based Controller of Security Scanner
International Journal of Industrial Electronics and Electrical Engineering, ISSN: 2347-6982
This is because most explosives are organic. Machine
operators are trained to look for suspicious items -and not just obviously suspicious items like guns or
knives, but also anything that could be a component of
an improvised explosive device (IED). Since there is
no such thing as a commercially available bomb, IEDs
are the way most terrorists and hijackers gain control.
An IED can be made in an astounding variety of ways,
from basic pipe bombs to sophisticated,
electronically-controlled component bombs.
Volume-2, Issue-6, June-2014
A. Description of a PC Keyboard
The original keyboard design had a single chip
microprocessor, but we are using a customized
controller chip. This keyboard controller chip takes
care of all keyboard matrix scanning, key de-bouncing
and communications with the computer, and has an
internal buffer if the keystroke data cannot be sent
immediately. The PC motherboard decodes the data
received from the keyboard via the PS/2 port using
interrupt IRQ1. The one thing that these keyboards do
not generate is ASCII values. With a typical AT
keyboard having more than 101 keys, a single byte
could not store codes for all the individual keys, plus
these keys along with shift, control, or alt, etc. Also for
some functions there is no ASCII equivalent, for
example ‘page up’, ‘page down’, ‘insert’, ‘home’, etc.
Once the keyboard controller finds that a key has been
pressed or released, it will send this keystroke
information, known as scan codes, to the PIC
micro-controller. There are two different types of scan
codes - make codes and break codes. The
communications protocol is bi-directional, but here we
only discuss the keyboard to host part.
B. Make code
A make code is sent whenever a key is pressed or held
down. Each key, including ‘shift’, ‘control’ and ‘alt’,
sends a specific code when pressed. The make code is
preceded by ‘E0’h to indicate an extended code. The
only exception is the ‘pause’ key that starts with a
unique ‘El’h byte.
C. Break code
A break code is sent when a key is released. The break
code is the make code preceded by ‘F0’h byte.The only
exception is the ‘pause’ key as it does not have a break
code and does not auto-repeat when held down.
D. Key code
Every key is assigned its own unique code so that the
host computer processing the information from the
keyboard can determine exactly what happened to
which key simply by looking at the scan codes
received. There is no direct relationship between the
scan code generated by a particular key and the
character printed on the key top.
E. Scan code
If, for example, one pressses ‘shift’ and ‘A’ then both
keys will generate their own scan codes, the ‘A’ scan
code value is not changed if a shift or control key is
also pressed.
Figure 3: An X-Ray of A Bag Notice That All Organic Items Are
A Shade of Orange.
A PS/2 keyboard connects to the XSA Board through
two signals:
1. A data signal carries a serial stream of bits
from the keyboard as each key is pressed and
released. Each key is assigned an eight-bit
scancode that is transmitted least-significant
bit to most-significant bit with a preceding
start bit and a terminating parity bit and stop
2. A clock signal is output by the keyboard and
the falling edge of this signal indicates when
to sample the logic level on the data signal.
The keyboard interface accepts the serial data stream
and outputs the eight-bit scancode in parallel along
with a ready pulse that indicates a valid scancode is
available. An additional busy signal goes high as the
bits are received.
The ready pulse is generated after 11 bits have been
received (start bit + 8 data bits + parity bit + stop bit)
and the clock signal goes high and stays there. The
sequencing of these signals is shown in Figure 1.
Pressing the letter ‘A’ generates ‘lC’h make code and
when released the break code is ‘F0’h, ‘lC’h. Pressing
‘shift’ and ‘A’ keys will generate the following scan
•The make code for the ‘shift’ key is sent ‘12’h.
•The make code for the ‘A’ key is sent ‘lC’h.
•The break code for the ‘A’ key is sent ‘F0’h, ‘lC’h.
•The break code for the ‘shift’ key is sent ‘F0’h,‘12’h.
A single scancode is transmitted when a key is
pressed. But two scancodes are transmitted when the
key is released: an initial scancode of 11110000 to
indicate the key release, and then the scancode for the
key is sent again. The keyboard interface generates the
ready pulse only after the key has been released.
Touchscreen Based Controller of Security Scanner
International Journal of Industrial Electronics and Electrical Engineering, ISSN: 2347-6982
If the right shift was pressed then the make code is
‘59’h and break code is ‘F0’h,
‘59’h. By analyzing these scan codes the PC software
can determine which key was
pressed. By looking at the shift keystroke the software
can distinguish between upper and
lower case.
F.Scan Codes
Volume-2, Issue-6, June-2014
A fifth wire can sometimes be found. This was once
upon a time implemented as a Keyboard Reset, but
today is left disconnected on AT Keyboards. Both the
KBD Clock and KBD Data are Open Collector
bi-directional I/O Lines. If desired, the Host can talk to
the keyboard using these lines.
H. The Keyboard's Protocol
H.1Keyboard to Host
As mentioned before, the PC's keyboard implements a
bi-directional protocol. The keyboard can send data to
the Host and the Host can send data to the Keyboard.
The Host has the ultimate priority over direction. It
can at anytime (although the not recommended) send
a command to the keyboard.
The diagram below shows the Scan Code assigned to
the individual keys. The Scan code is shown on the
bottom of the key. E.g. The Scan Code for ESC is 76.
All the scan codes are shown in Hex.
The keyboard is free to send data to the host when both
the KBD Data and KBD Clock lines are high (Idle).
The KBD Clock line can be used as a Clear to Send
line. If the host takes the KBD Clock line low, the
keyboard will buffer any data until the KBD Clock is
released, ie goes high. Should the Host take the KBD
Data line low, then the keyboard will prepare to accept
a command from the host.
Figure.4 : Keyboard With It’s Hex Values
As you can see, the scan code assignments are quite
random. In many cases the easiest way to convert the
scan code to ASCII would be to use a look up table.
Below is the scan codes for the extended keyboard &
Numeric keypad.
The transmission of data in the forward direction, ie
Keyboard to Host is done with a frame of 11 bits. The
first bit is a Start Bit (Logic 0) followed by 8 data bits
(LSB First), one Parity Bit (Odd Parity) and a Stop Bit
(Logic 1). Each bit should be read on the falling edge
of the clock.
Figure 7: Keyboard To Host
The above waveform represents a one byte
transmission from the Keyboard. The keyboard may
not generally change it's data line on the rising edge of
the clock as shown in the diagram. The data line only
has to be valid on the falling edge of the clock. The
Keyboard will generate the clock. The frequency of the
clock signal typically ranges from 20 to 30 Khz. The
Least Significant Bit is always sent first.
Figure 5: Numerical Pad
G.The Keyboard's Connector
The PC's AT Keyboard is connected to external
equipment using four wires. These wires are shown
below for the 5 Pin DIN Male Plug & PS/2 Plug.
H.2 Host to Keyboard :
The Host to Keyboard Protocol is initiated by taking
the KBD data line low. However to prevent the
keyboard from sending data at the same time that you
attempt to send the keyboard data, it is common to take
the KBD Clock line low for more than 60us. This is
more than one bit length. Then the KBD data line is
taken low, while the KBD clock line is released. The
keyboard will start generating a clock signal on it's
KBD clock line. This process can take up to 10mS.
Figure 6: Keyboard Connector
Touchscreen Based Controller of Security Scanner
International Journal of Industrial Electronics and Electrical Engineering, ISSN: 2347-6982
After the first falling edge has been detected, you can
load the first data bit on the KBD Data line. This bit
will be read into the keyboard on the next falling edge,
after which you can place the next bit of data. This
process is repeated for the 8 data bits. After the data
bits come an Odd Parity Bit.
Volume-2, Issue-6, June-2014
A GLCD has 20 pins which is allotted as 14 digital
pins and 6 analog pins.
Figure 8: Host To Keyboard
Once the Parity Bit has been sent and the KBD Data
Line is in a idle (High) state for the next clock cycle,
the keyboard will acknowledge the reception of the
new data. The keyboard does this by taking the KBD
Data line low for the next clock transition. If the KBD
Data line is not idle after the 10th bit (Start, 8 Data bits
+ Parity), the keyboard will continue to send a KBD
Clock signal until the KBD Data line becomes idle.
FIGURE 10: Flowchart of The Methodology
As the touch screen is mounted on the GLCD it
doesn’t have enough pins to accommodate it thus
another Adruino Duemilanove is required for the
The display screen will show some function and when
we will touch the desired function the controller will
be coded in such a way that the associated function
touch will reperesent a voltage level in the touchscreen
and thus the keyboard waveform technique is applied
and thus the associated keyboard alphabet is sent.
For Example: if we have associated ‘negative image
function’ as ‘A’ then “1C” which is the associated
keyboard wave will be sent through the DB-9 port.
Figure 9: Full Interface Diagram of Keyboard
The interface between the computer and the conveyer
belt is our main concern area. Our controller has to be
built in such a way that it can cater both. The
microcontroller we are using to perform the designed
task is Adruino Duemilanove w/ATmega328.
We have the task to display the image transform
functions like Organic Images, Inorganic Images,
Open, Save, Negative Image, Zoom in, Zoom out.
Apart from this our controller can also control the IR
sensor of the conveyer belt which will further drive the
belt’s movement.
It has 14 digital input/output pins (of which 6 can be
used as PWM outputs), 6 analog inputs, a 16 MHz
crystal oscillator, a USB connection, a power jack, an
ICSP header, and a reset button. It contains everything
needed to support the microcontroller; simply connect
it to a computer with a USB cable or power it with a
AC-to-DC adapter or battery to get started. The
Arduino Duemilanove can be powered via the USB
connection or with an External Power Supply. The
power source is selected automatically.
So the forward of the belt, reverse of the belt and the
stop function are also included in the belt for all these
functions. These signals will be sent through the
DB-15 male female connectors.
As we have mentioned that this project can bring
about a revolution in the controllers by itself being
unique in the company that we have got the
sponsorship and similarly to the airport baggage
scanners this technology is yet to be implemented .The
proposed project can have the following future
It consists of a 3x5 cm Resistive Touchscreen and
64x128 Graphical Liquid Crystal Display (GLCD).
The touchscreen is mounted above the GLCD to use it
as a Graphical User Interface.
Touchscreen Based Controller of Security Scanner
International Journal of Industrial Electronics and Electrical Engineering, ISSN: 2347-6982
A wireless format can be developed so that it can
be controlled without the use of any wires .
Audio recognition can be added and this can then
be controlled on the voice commands and there
will be no use of pressing any buttons.
Volume-2, Issue-6, June-2014
of the microcontroller and thus it becomes very helpful
for the personnel who are working in the specific
security area.
[1]. Adam Chapweske - The AT-PS/2 Keyboard Interface, 2001
[2]. Craig Peacock - Interfacing the AT keyboard, 19 Aug. 2001.
The tendency of a bomb blast or any other dangerous
weaponry can never be predicted and thus in areas of
high population and risk use of conveyer belt Is a
must. We attempt to reduce the efforts of the person
using this conveyer belt by giving him/her all the
functions that are used in the computer directly in the
hands with which he/she can control the conveyer belt
and also can produce his choice of image by just
touching the screen of our controlling mechanism. By
improving the technology of microcontroller and the
speed efficiency we can improve the overall working
[3]. Novel method to detect and recover the keystroke of ps/2
keyboard – Yulei Du.
[4]. Patent US 4530006 A: Intrinsic object sensing in a digital fan
beam X-ray inspection system.
[5]. Bondarenco, N. & Price, A. (2009). Baggage Improvement
Programmed Strategy Paper – 2009, IATA Simplifying the
Business Programmed, IATA.
[6]. Mecham, M. (2005). Radio ID. Aviation Week and Space
Technology, Vol. 162 No.18. (May 2, 2005), ISSN
Touchscreen Based Controller of Security Scanner
Download PDF
Similar pages
SERVICE MANUAL - 北京天勤安捷技术发展有限公司
Origin Storage KB-9PR5P
Origin Storage KB-MRVHY
Origin Storage KB-0YXFH
Origin Storage KB-XDJ4M
Origin Storage KB-FP0T0