You are on page 1of 33

CHAPTER 1

INTRODUCTION
Security systems are the demands of the day, which helps to avoid unauthorized entry of
people into the restricted area at the same time keeping a count of number of personnel present
within the area. Confidential Conference Security System (CCSS) allows a certain organization/
governing body to conduct a conference/meeting securely, reducing the possibility of
unauthorized entry. This system also preserves the confidentiality of the events inside the
conference hall.

1.1 PROBLEM DEFINITION


Problem Encountered and its approach:
In the recent times there has been a dramatic rise in crime rate and security breach
incidents across the globe. Hence a lot of importance is being laid on the awareness of
security on public/private transit systems across the globe. Federally mandated threat and
vulnerability assessments have inspired thousands of new innovative cost effective security
systems to come into existence.
Methodology:
The methodology used in this mini-project is to have a system allowing authorized entry
with digital authentication and also to have the count of people present within the hall. It
should also safeguard the privacy of the proceedings taking place within the hall.
Construction:
Here we have used P89V51 microcontroller to keep a count of the attendance inside the
hall and also to pre-screen the visitors entering the hall. The proceeding inside the hall is
maintained confidential with the help of a cell phone transmission detector.

Working:
The operation of our system can be described in 3 levels. In the first level, the
microcontroller continuously scans the authenticity of the visitors. Second level deals with

~1~

keeping a track of the attendance inside the hall. Third level consists of a RF transmission
detector which detects any sort of wireless transmission inside the hall.
1.2 REVIEW OF LITERATURE
Monitoring and security systems have scope in various fields . The automated control of
systems can be achieved using both analog control schemes and digital control schemes.
Present trend is more towards the digital controllers because of their ruggedness, features can
be added easily, easy to interface with PCs and declining prices of c. The 8 bit c are popular
among small scale applications. The recent happenings viz., the Karnataka assembly scam,
bugs in finance ministry, in PMO have revealed the sorry state of affairs of our security
arrangements even at the highest levels. Taking this scenario and analyzing this situation in a
much broader perspective led us to the idea of designing a prototype that it is electronically
compact and can be easily upgraded in future.
This inspired us to design Confidential Conference Security System which can be easily
implemented in various places.
1.3 ORGANIZATION OF THIS REPORT
This report consists of 6 chapters, references, future enhancement and appendix in total. The
frame work for the report is as follows:
Chapter 1 provides brief introduction about CCSS.
Chapter 2 briefs the System Overview and gives the information about the complete
system.
Chapter 3 gives in depth information about cell phone transmission detector.
Chapter 4 deals with information regarding bidirectional visitor counter.
Chapter 5 explains the working of digital lock.
Chapter 6 provides the hardware details of the complete system and schematic of the
system.
Chapter 7 provides the software details, both system and application, with the help of
figures.
Chapter 8 explains the system and results obtained.
Chapter 9 presents the applications, conclusion and references.

~2~

CHAPTER 2
SYSTEM OVERVIEW
Our system consists of three subsystems- Digital Lock, Bidirectional Visitor Counter and
Cell Phone Transmission Detector, which are assembled to form end product.
The system is based on 8951 single chip c and associated circuitry. The 8951
controller is used to reduce the overall system cost due to its rich peripheral set and in-system
programming capability, and also free software tools available to develop the complete system
without any limitations in its features. RS 232 is used for communication with PC.
2.1 SALIENT FEATURES
The following are the salient features of the system
1. Continuous monitoring of credible visitor entry.
2. Inexpensive, microcontroller based design.
3. Audible alerting system.
4. Visual display of instructions to the visitor.
5. Programmable.
6. Compact and portable.
7. Low power device (5V).
8. Reliable and long life.
9. Easy to operate.

2.2 SYSTEM DESCRIPTION


The Figure 2.1 shows the block diagram of the system. The various functional blocks of the
system are explained below.

Mobile transmission detector or sniffer can sense the presence of an activated mobile
cell phone from a certain distance. The circuit can detect the incoming and outgoing
calls, SMS and video transmission. The moment the mobile bug detects RF transmission
signal from an activated mobile phone, it starts sounding a beep alarm and the LED
blinks

~3~

An electronic lock or digital lock is a device which has an electronic control assembly
attached to it. They are provided with an access control system. This system allows the
user to unlock the device with a password. The password is entered by making use of a
keypad. The user can also set his password to ensure better protection.

A bidirectional visitor counter, that counts both the entering and exiting visitor of the
auditorium or hall where it is placed. Depending upon the interrupt from the sensors, the
system identifies the entry and exit of the visitor and displays the number of visitor
present in the hall.

Fig 2.1: Block diagram of Confidential Conference Hall Security System

2.3 SYSTEM CONFIGURATION


INPUT
The input to the system is obtained through
1. Keypad.
2. IR sensors.
3. Antenna.

~4~

OUTPUT
The outputs of the system are
1. LCD unit for displaying instructions and messages.
2. Buzzer used for alerting system.
3. Seven segment display for displaying count.
CONTROL UNIT
The 8051 forms the heart of the system. It is an 8-bit c with the following features
-

8-bit CPU with registers A (the accumulator) and B.

16-bit program counter (PC) and data pointer (DPTR).

8-bit program status word (PSW).

8-bit stack pointer (SP).

Internal ROM of 4K.

Internal RAM of 128 bytes.

32 I/O pins arranged as four 8-bit ports: P0-P3.

Two 16-bit timers/counters: T0 and T1.

Oscillator and clock circuits.

~5~

CHAPTER 3
MOBILE TRANSMISSION DETECTOR
CONCEPT:
Mobile phone uses high frequency RF wave in the micro wave region carrying huge
amount of electromagnetic energy. AM Radio uses frequencies between 180 kHz and 1.6 MHz.
FM radio uses 88 to 180 MHz, while TV uses 470 to 854 MHz. The transmission frequency of
mobile phones ranges from 0.9 to 3 GHz with a wavelength of 3.3 to 10 cm. This signal has high
frequency with huge energy.
Ordinary LC (Coil-Capacitor) circuits are used to detect low frequency radiation in the
AM and FM bands. The tuned tank circuit having a coil and a variable capacitor retrieve the
signal from the carrier wave. But such LC circuits cannot detect high frequency waves near the
microwave region. Hence a capacitor is used to detect RF from mobile phone considering that,
a capacitor can store energy even from an outside source and oscillate like LC circuit.
When the mobile phone is active, it transmits the signal in the form of sine wave which
passes through the space. The encoded audio/video signal contains electromagnetic radiation
which is picked up by the receiver in the base station. Mobile phone system is referred to as
Cellular Telephone system because the coverage area is divided into cells each of which has
a base station. The transmitter power of the modern 2G antenna in the base station is 20-100
watts.

Fig 3.1: Circuit diagram of mobile transmission detector

~6~

ROLE OF CAPACITOR:

The circuit in fig3.1 uses a 0.22F disk capacitor (C3) to capture the RF signals from the
mobile phone. The lead length of the capacitor is fixed as 18 mm with a spacing of 8 mm
between the leads to get the desired frequency.

The non polarized disc capacitor is used to pass AC and reject DC. It stores energy and
passes AC signals during discharge.

One lead of the capacitor gets DC from the positive rail and the other lead goes to the
negative input of IC1. So the capacitor gets energy for storage. This energy is applied to
the inputs of IC1 so that the inputs of IC are almost balanced with. In this state output is
zero.

When a small current is induced to the inputs of the comparator, a natural


electromagnetic field is created around the capacitor caused by the 50Hz from electrical
wiring.

When the mobile phone radiates high energy pulsations, capacitor oscillates and release
energy in the inputs of IC. This oscillation is indicated by the flashing of the LED and
beeping of Buzzer.

In short, capacitor carries energy and is in an electromagnetic field. So a slight change in


field caused by the RF from phone will disturb the field and forces the capacitor to
release energy.

The disk capacitor along with the leads acts as a small gigahertz loop antenna (receiver)
to collect the RF signals from the mobile phone.

ROLE OF COMPARATOR CA 3130:


This IC is a 15 MHz BiMOS Operational amplifier with MOSFET inputs and Bipolar
output. The inputs contain MOSFET transistors to provide very high input impedance and very
low input current as low as 10pA. It has high speed of performance and suitable for low input
current applications.
ROLE OF NE555:
This timer IC is used as a monostable multivibrator in the circuit

~7~

WORKING:
Op-amp IC CA3130 (IC1) is used in the circuit as a current-to-voltage converter with
capacitor C3 connected between its inverting and non-inverting inputs. It is a CMOS version
using gate-protected p-channel MOSFET transistors in the input to provide very high input
impedance, very low input current and very high speed of performance. The output CMOS
transistor is capable of swinging the output voltage to within 10 mV of either supply voltage
terminal.
Capacitor C3 in conjunction with the lead inductance acts as a transmission line that
intercepts the signals from the mobile phone. This capacitor creates a field, stores energy and
transfers the stored energy in the form of minute current to the inputs of IC1. This will upset the
balanced input of IC1 and convert the current into the corresponding output voltage.
Capacitor C4 along with high-value resistor R1 keeps the non-inverting input stable for
easy swing of the output to high state. Resistor R2 provides the discharge path for capacitor C4.
Feedback resistor R3 makes the inverting input high when the output becomes high. Capacitor
C5 (47pF) is connected across strobe and null inputs of IC1 for phase compensation and gain
control to optimise the frequency response.
When the cell phone detector signal is detected by C3, the output of IC1 becomes high
and low alternately according to the frequency of the signal as indicated by LED1. This triggers
monostable timer IC2 through capacitor C7. Capacitor C6 maintains the base bias of transistor
T1 for fast switching action. The low-value timing components R6 and C9 produce very short
time delay to avoid audio nuisance.
POWER SUPPLY: 9V dry cell.
DETECTION RANGE OF PROTOTYPE: 1 meter.

~8~

CHAPTER 4
DIGITAL LOCK
CONCEPT :
The circuit diagram of Digital Lock is shown in fig4.1. The circuit uses a 4x3 matrix
keypad as an input device to enter the password. A 16x2 LCD is used as a output device to
display password validity messages. The microcontroller used is P89V51 manufactured by
NXP. 5V supply is obtained by connecting IC7805 across a 9V dry cell.

Fig4.1: Circuit diagram of digital lock

~9~

WORKING:
A four digit predefined password needs to be specified the user. This password is stored
in the system. While unlocking, if the entered password from keypad matches with the stored
password, then the lock opens and a message is displayed on LCD.
Port P2 of microcontroller P89V51 is used as data input port which is connected to data
pins (7-14) of LCD. P1.0, P1.1 and P1.2 pins of microcontroller are connected to control pins
RS, RW and EN of LCD. Port P0 is used to take input from keypad. P0.7 has been used as lock
output pin of controller.
As the program starts, string Enter Password is displayed on LCD. The keypad is
scanned for pressed digits one by one. Every time, row and column of the key pressed is
detected and a * is displayed on LCD corresponding to the entered number. After the four
digits are entered, the user is prompted to Confirm Password and again the input is taken
through LCD. If the passwords do not match, a message is displayed to indicate Wrong
Password; otherwise the user is prompted to unlock the device.

To unlock, user needs to Enter Password through keypad. Again the keypad is scanned
for pressed keys and corresponding digits are identified. The passkey is displayed as **** on
the LCD screen. After the four digits are entered, they are compared with the pre-set password.
If all the four digits match with set password, LCD displays Access Granted and the lock output
pin goes high. If the security code is wrong, Wrong Password is sent to be displayed on
LCD. The system gets locked if more than three attempts are made with wrong password to
open the electronic lock. The system needs to be reset in such a case.

POWER SUPPLY: 5V regulated from 9V dry cell using IC 7805.


CODE:
//Program to make a code lock with user defined password
#include<reg51.h>
#define port P1
#define dataport P2
#define key P0
#define sec 100
sbit rs = port^0;

~ 10 ~

sbit rw = port^1;
sbit en = port^2;
sbit col1=key^4;
sbit col2=key^5;
sbit col3=key^6;
sbit row1=key^0;
sbit row2=key^1;
sbit row3=key^2;
sbit row4=key^3;
sbit lock_output=P0^7;
int check=0;
int digit[4]={0,0,0,0};
int dig_input[4]={0,0,0,0};
int dig_input_recheck[4]={0,0,0,0};
int i,k;
void delay(unsigned int msec)
{
int i,j ;
for(i=0;i<msec;i++)
for(j=0;j<1275;j++);
}

// Time delay function

void lcd_cmd(unsigned char item)


{
dataport = item;
rs= 0;
rw=0;
en=1;
delay(1);
en=0;
return;
}

// Function to send command to LCD

void lcd_data(unsigned char item)


{
dataport = item;
rs= 1;
rw=0;
en=1;
delay(1);
en=0;
return;
}
void lcd_data_string(unsigned char *str)
{
int i=0;

// Function to send data to LCD

// Function to send data to string

~ 11 ~

while(str[i]!='\0')
{
lcd_data(str[i]);
i++;
//delay(10);
}
return;
}
void lcd(unsigned char str[10])
{
lcd_cmd(0x38);
lcd_cmd(0x0e);
lcd_data_string(str);
}

void ans()
{
if(check>3)
{
lcd_cmd(0x01);
lcd_cmd(0x82);
lcd_data_string(" ACCESS GRANTED");
lock_output=1;
delay(300);
}
else
{
lcd_cmd(0x01);
lcd_cmd(0x82);
lcd_data_string(" WRONG PASSWORD");
lock_output=0;
delay(300);
}
}
void code_check()
{
if(i<=3 )
{
switch((i+1))
{
case 1: {
if(dig_input[0]==digit[0])
{
check=check+1;
}
break;
}
case 2: {

// Function to check password

~ 12 ~

if(dig_input[1]==digit[1])
{
check=check+1;
}
break;
}
case 3: {
if(dig_input[2]==digit[2])
{
check=check+1;
}
break;
}
case 4: {
if(dig_input[3]==digit[3])
{
check=check+1;
}
break;
}
}
}
delay(10);
if(i==3)
{
ans();
}
}
void display(int a)
{
switch(a)
{
case 1:{
lcd_data('*');
delay(100);
digit[i]=1;
code_check();
break;
}
case 2:{
lcd_data('*');
delay(100);
digit[i]=2;
code_check();
break;
}
case 3:{
lcd_data('*');
delay(100);
digit[i]=3;

//Display function

~ 13 ~

code_check();
break;
}
case 4:{
lcd_data('*');
delay(100);
digit[i]=4;
code_check();
break;
}
case 5:{
lcd_data('*');
delay(100);
digit[i]=5;
code_check();
break;
}
case 6:{
lcd_data('*');
delay(100);
digit[i]=6;
code_check();
break;
}
case 7:{
lcd_data('*');
delay(100);
digit[i]=7;
code_check();
break;
}
case 8:{
lcd_data('*');
delay(100);
digit[i]=8;
code_check();
break;
}
case 9:{
lcd_data('*');
delay(100);
digit[i]=9;
code_check();
break;
}
case 0:{
lcd_data('*');
delay(100);
digit[i]=0;
code_check();
break;

~ 14 ~

}
}
}
void check_col1()
{
row1=row2=row3=row4=1;
row1=0;
if(col1==0)
display(1);
row1=1;
row2=0;
if(col1==0)
display(4);
row2=1;
row3=0;
if(col1==0)
display(7);
row3=1;
row4=0;
if(col1==0)
{
row4=1;
}
}
void check_col2()
{
row1=row2=row3=row4=1;
row1=0;
if(col2==0)
display(2);
row1=1;
row2=0;
if(col2==0)
display(5);
row2=1;
row3=0;
if(col2==0)
display(8);
row3=1;
row4=0;
if(col2==0)
display(0);
row4=1;
}

void check_col3()
{
row1=row2=row3=row4=1;

~ 15 ~

row1=0;
if(col3==0)
display(3);
row1=1;
row2=0;
if(col3==0)
display(6);
row2=1;
row3=0;
if(col3==0)
display(9);
row3=1;
row4=0;
if(col3==0)
{
row4=1;
}
}
void check_password_col1()
{
row1=row2=row3=row4=1;
row1=0;
if(col1==0)
dig_input[k]=1;
row1=1;
row2=0;
if(col1==0)
dig_input[k]=4;
row2=1;
row3=0;
if(col1==0)
dig_input[k]=7;
row3=1;
row4=0;
if(col1==0)
{
row4=1;
}
}
void check_password_col2()
{
row1=row2=row3=row4=1;
row1=0;
if(col2==0)
dig_input[k]=2;
row1=1;
row2=0;
if(col2==0)
dig_input[k]=5;

~ 16 ~

row2=1;
row3=0;
if(col2==0)
dig_input[k]=8;
row3=1;
row4=0;
if(col2==0)
{
dig_input[k]=0;
row4=1;
}
}
void check_password_col3()
{
row1=row2=row3=row4=1;
row1=0;
if(col3==0)
dig_input[k]=3;
row1=1;
row2=0;
if(col3==0)
dig_input[k]=6;
row2=1;
row3=0;
if(col3==0)
dig_input[k]=9;
row3=1;
row4=0;
if(col3==0)
{
row4=1;
}
}
void pass_set()
{
row1=row2=row3=row4=0;
while(col1==1 && col2==1 && col3==1);
for(i=0;i<4;i++)
{
k=i;
delay(50);
lcd_cmd(0xc4+i);
delay(100);
row1=row2=row3=row4=0;
while(col1==1 && col2==1 && col3==1);
row1=row2=row3=row4=0;
if(col1==0)
check_password_col1();
else

~ 17 ~

if(col2==0)
check_password_col2();
else
if(col3==0)
check_password_col3();
lcd_data('*');
delay(50);
}
}
void main()
{
int e,j=0,count=1;
col1=col2=col3=1;
//FOR PASSWoRD INPUT
do
{
lcd_cmd(0x01); //Clear LCD screen
lcd_cmd(0x81);
lcd("ENTER PASSWORD:");
pass_set();
for(e=0;e<4;e++)
dig_input_recheck[e]=dig_input[e];
lcd_cmd(0x01);
lcd("CONFIRM PASSWORD:");
pass_set();
for(e=0;e<4;e++)
{
if(dig_input_recheck[e]==dig_input[e])
j++;
}
if(j<4)
{
lcd_cmd(0x01);
lcd_cmd(0x85);
lcd("PASSWORD");
lcd_cmd(0xC2);
lcd("NOT MATCH");
delay(300);
}
}
while(j<4);
while(count<4)//Code input and check
{
lcd_cmd(0x01);
lock_output=0;
lcd_cmd(0x82);
lcd("ENTER PASSWORD");
check=0;
row1=row2=row3=row4=0;

~ 18 ~

while(col1==1 && col2==1 && col3==1);


for(i=0;i<4;i++)
{
delay(100);
lcd_cmd(0xc4+i);
row1=row2=row3=row4=0;
while(col1==1 && col2==1 && col3==1);
row1=row2=row3=row4=0;
if(col1==0)
check_col1();
else
if(col2==0)
check_col2();
else
if(col3==0)
check_col3();
}
count++;
delay(1);
}
if(count==4)
{
lcd_cmd(0x01);
lcd_cmd(0x86);
lcd("SORRY");
lcd_cmd(0xc1);
lcd("NO MORE TRIALS");
}
}

~ 19 ~

CHAPTER 5
BIDIRECTIONAL VISITOR COUNTER
CONCEPT:
A counter that can change its state in either direction, under control of an updown
selector input, is known as an updown counter. The circuit given here can count numbers from
0 to 9999 in up and down modes depending upon the state of the selector. It can be used to
count the number of persons entering a hall in the up mode at entrance gate. In the down mode,
it can count the number of persons leaving the hall by decrementing the count at exit gate. It
can also be used at gates of parking areas and other public places.
This circuit divided in three parts: sensor, controller and counter display. The sensor
would observe an interruption and provide an input to the controller which would run the counter
in up/down mode depending upon the selector setting. The same count is displayed on a set of
7-segment displays through the controller.
WORKING:
In the counter circuit shown in fig 5.1, two infrared (IR) sensor modules are used each
for up and down counting respectively. Whenever an interruption is observed by the first IR
sensor, it increments the counter value. Similarly, when the second sensor detects an obstacle,
the count is decremented.
The count value is calculated depending upon the sensors input and is displayed on a
set of four seven segment displays by using the concept of multiplexing (using transistors). The
data pins of each 7-segment display are connected to port P2 of the microcontroller P89V51.
The first four pins of port 1 (P1.0 to P1.3) are connected to control pins to enable a particular 7segment. Pins 12 and 13 are configured as input pins at which the sensors are connected and
interrupt is detected.

~ 20 ~

Fig5.1: Circuit diagram of bidirectional visitor counter

The sensor inputs are defined as up and down selector modes for the counter in the
code. Each time the first sensor is blocked, it gives a negative edge triggered signal at pin13
and the count value gets incremented. The value gets decremented when pin12 connected to
second sensor, gives negative edge triggered input. At each step, the value of the counter is
sent to be displayed on the segments.
POWER SUPPLY: 5V regulated from 9V dry cell using IC 7805.

~ 21 ~

CODE:

#include <reg51.h>
unsigned int dig_val[10]={0x40,0xF9,0x24,0x30,0x19,0x12,0x02,0xF8,0x00,0x10};
unsigned int dig[4]={0,0,0,0};
unsigned int i,num,test=0;
void up(void) interrupt 0
{
test++
;
num=test;
dig[3]=num%10;
num=num/10;
dig[2]=num%10;
num=num/10;
dig[1]=num%10;
dig[0]=num/10;
if (test==9999)
test=0;
for(i=0;i<4;i++)
{
P2=dig_val[dig[i]];
if(i==0)
P1=0x01 ;
else if(i==1)
P1=0x02 ;
else if(i==2)
P1=0x04;
else if(i==3)
P1=0x08;
}
}
void down(void) interrupt 2
{
test--;
num=test;
dig[3]=num%10;
num=num/10;
dig[2]=num%10;
num=num/10;
dig[1]=num%10;
dig[0]=num/10;
if (test==0)
test=0;
for(i=0;i<4;i++)
{

~ 22 ~

P2=dig_val[dig[i]];
if(i==0)
P1=0x01 ;
else if(i==1)
P1=0x02 ;
else if(i==2)
P1=0x04 ;
else if(i==3)
P1=0x08 ;
}
}
void main()
{
while(1)
{
IE=0x85;
IT0=1;
IT1=1;
for(i=0;i<4;i++)
{
P2=dig_val[dig[i]];
if(i==0)
P1=0x01 ;
else if(i==1)
P1=0x02 ;
else if(i==2)
P1=0x04 ;
else if(i==3)
P1=0x08 ;
}
}

//loop forever

//set external interrupt 0 edge-triggered


//set external interrupt 1 edge-triggered

~ 23 ~

CHAPTER 6
HARDWARE DESCRIPTION
1. SEVEN SEGMENT DISPLAY
A seven segment display is the most basic electronic display device that can display
digits from 0-9. They find wide application in devices that display numeric information like digital
clocks, radio, microwave ovens, electronic meters etc. The most common configuration has an
array of eight LEDs arranged in a special pattern to display these digits. They are laid out as a
squared-off figure 8. Every LED is assigned a name from 'a' to 'h' and is identified by its name.
Seven LEDs 'a' to 'g' are used to display the numerals while eighth LED 'h' is used to display the
dot/decimal.

A seven segment is generally available in ten pin package. While eight pins correspond
to the eight LEDs, the remaining two pins (at middle) are common and internally shorted. These
segments come in two configurations, namely, Common cathode (CC) and Common anode
(CA). In CC configuration, the negative terminals of all LEDs are connected to the common pins.
The common is connected to ground and a particular LED glows when its corresponding pin is
given high. In CA arrangement, the common pin is given a high logic and the LED pins are
given low to display a number.

~ 24 ~

2. LIQUID CRYSTAL DISPLAY


LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various
devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no
limitation of displaying special & even custom characters (unlike in seven segments),
animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to be displayed on the LCD.

~ 25 ~

3. KEYPAD
Keypad is organized as a matrix of switches in rows and column. We use a 4X3
matrix keypad in our mini-project.

The concept of interfacing keypad with the MCU is simple. Every number is
assigned two unique parameters, i.e., row and column number (n(R, C). Hence every
time a key is pressed the number is identified by detecting the row and column number
of the key pressed.

Initially all the rows are set to zero by the controller and the columns are scanned
to check if any key is pressed. In case no key is pressed the output of all the columns
will be high. Whenever a key is pressed the row and column corresponding to the key
will get short, resulting in the output of the corresponding column goes to go low (since
we have made all the rows zero). This gives the column number of the pressed key.

~ 26 ~

Once the column number is detected, the controller sets all the rows to high.
Now one by one each row is set to zero by controller and the earlier detected column is
checked if it becomes zero. The row corresponding to which the column gets zero is the
row number of the digit.
The above process is very fast and even if the switch is pressed for a very small
duration of time the controller can detect the key which is pressed. The controller
displays the number corresponding to the row and column on the LCD.

4. Microcontroler

The P89V51RD2 is 80C51 microcontroller with 16/32/64 kB Flash and 1024


bytes of data RAM.The Flash program memory supports both parallel programming and
in serial In-System Programming (ISP). Parallel programming mode offers gangprogramming at high speed, reducing programming costs and time to market. ISP allows
a device to be reprogrammed in the end product under software control. The capability
to field/update the application firmware makes a wide range of applications possible. The
P89V51RD2 is also In-Application Programmable (IAP), allowing the flash program
memory to be reconfigured even while the application is running.

~ 27 ~

FEATURES

1. 80C51 CPU
2. 5 V operating voltage from 0 MHz to 40 MHz
3. 16/32/64 kB of on-chip flash user code memory with ISP and IAP
4. Supports 12-clock (default) or 6-clock mode selection via software or ISP
5. Four 8-bit I/O ports with three high-current port 1 pins (16 mA each)
6. Three 16-bit timers/counters
7. Programmable watchdog timer
8. Eight interrupt sources with four priority levels
9. Second DPTR register
10. TTL- and CMOS-compatible logic levels

~ 28 ~

CHAPTER 7

SOFTWARE OVERVIEW
7.1 Embedded C
Embedded C is a set of language extensions for the C Programming language by the C
Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires nonstandard
extensions to the C language in order to support exotic features such as fixed-point
arithmetic, multiple distinct memory banks, and basic I/O operations.

7.2 Keil Vision4


Vision4 is used for compiling, debugging and creating the HEX file to the selected
target device.
7.3 Flash Magic
This is a freeware which is used to burn hex files onto NXP microcontrollers, which can
be verified and erased as required.

~ 29 ~

CHAPTER 8
Our working model worked as visioned, satisfying all the conditions in the problem
defined, the step by step execution of the CCSS and its output is shown below in the following
images.

Fig 8.1: Front view of CCSS model

Fig 8.2: Back view of CCSS model

Fig8.3: Top view of CCSS model

~ 30 ~

Step 1: Visitor entry authentication


The visitor needs to enter the correct password in order to enter the hall. The validity of
the visitors entry will be detected by digital lock which is placed at the entry point of the hall.

Fig 8.4: Digital lock


Step 2: Counting of attendance inside the hall
The bidirectional visitor counter keeps a count of the number of people inside the hall. IR
sensors placed in the entry and exit point (as in fig8.3) deal with visitor detection.

Fig8.5: Bi- directional visitor counter

~ 31 ~

Step 3: Detection of unauthorized data transmission via cell phone


The cell phone transmission detector placed in the underground cellar of the hall (as
shown in fig8.2) detects any call, sms or video transmission inside the hall.

Fig8.6: Cell phone transmission detector

~ 32 ~

CHAPTER 9
APPLICATIONS:

Mobile Bug can be used to prevent use of mobile phones in examination halls,
confidential rooms, etc

Mobile Bug is also useful for detecting the use of mobile phone for Spying and
unauthorized video transmission.

Counter gives us the accurate number of people present in a given place., viz
conference hall, stadiums, exhibition etc.

Simple off-line installation of the system is possible on any type of door, including those
with narrow frames.

Digital locks can be used in banks, lockers etc.

CONCLUSION

The working prototype was successfully designed and implemented.

There is scope for applying more efficient software control.

Power consumption is relatively less, thereby yielding an efficient system although


improvements can be made to provide input through AC mains.

Reliability can be highly improved by using more sophisticated components and opting
for higher end technology.

REFERENCES
Bibiliography

The 8051 Microcontroller and Embedded Systems by Muhammad Ali Mazidi.

Magazine-Electronics For You.

Internet sources

http://www.engineersgarage.com/

http://www.electronicsforu.com/electronicsforu/default.asp

http://electroschematics.com/

~ 33 ~

You might also like