Mobile detection

46
Report on “MOBOLE JAMMER & DETECTOR” Submitted By Ankur jain & Abhishek pant (1009531015) (0909533003) Submitted to the Department Of Electronics And Communication Engineering In partial fulfillment of the requirements for the degree of BACHELOR IN TECHNOLOGY IN ELECTRONICS AND COMMUNICATION MAHATMA GANDHI MISSION’S COLLEGE OF ENGINEERING AND TECHNOLOGY NOIDA-201301

Transcript of Mobile detection

Page 1: Mobile detection

Report on

“MOBOLE JAMMER & DETECTOR”

Submitted By

Ankur jain &

Abhishek pant

(1009531015)

(0909533003)

Submitted to the Department Of Electronics And

Communication Engineering

In partial fulfillment of the requirements

for the degree of

BACHELOR IN TECHNOLOGY

IN

ELECTRONICS AND COMMUNICATION

MAHATMA GANDHI MISSION’S

COLLEGE OF ENGINEERING AND TECHNOLOGY

NOIDA-201301

Affiliated to

Mahamaya Technical University,Noida

Page 2: Mobile detection

CERTIFICATE

This is to certify that Report entitled “MOBILE JAMMER & DETECTOR” submitted by Ankur Jain and Abhishek pant in partial fulfillment of the requirement for the award of degree B. Tech in department of Electronics and Telecommunication of U.P Technical University, is a record of the candidate own work carried out by him under my/ our supervision. The matter embodied in this thesis is original and has not been submitted for the award of any other degree.

Date:29/11/2013 Guide: MRS. AJITA SINGH

Page 3: Mobile detection

DECLARATION

I hereby declare that this submission is my own work and that to the best of my knowledge and belief, it contains no material previously published or written by another person no material which to a substantial extent has been accepted for the award of any other degree or diploma of the university or other institute of higher learning, except where due acknowledgement has been made in the text.

Signature:

Name:

ANKUR JAIN

ABHISHEK PANT

Roll No.:

1009531015

0909533003

Date: 29/11/2013

Page 4: Mobile detection

ACKNOWLEDGEMENT

It gives me a great sense of pleasure to present the report of the B. Tech Seminar undertaken during B. Tech Third Year, entitled “MOBILE JAMMER AND DETECTOR”, as a part of curriculum for the partial fulfillment of B. Tech degree under the department of Electronics and Telecommunication.

I owe debt of gratitude to my seminar guide Mrs.AJITA SINGH, Lecturer, Department of Electronics and Telecommunication, who has helped me in some key areas and helped me in making this seminar report better.

I would also like to acknowledge the contribution of Mr. S. Vamsi Krishna, Asst. Professor and Head of Department of Electronics and Telecommunication, for his full support and assistance during the development of this seminar report and presentation.

At Last I would also like to thank my classmates and other lecturers who appreciated and supported me and my work for this project.

CHAPTER 1

Page 5: Mobile detection

1. Introduction

In this project we detect the mobile system on the bases of frequency.

After detection of signal this signal give to microcontroller and microcontroller weep the buzzer and display the message in lcd.

Page 6: Mobile detection

1.1 Component:

Microcontroller (at89s51). Step down transformer. Diode. Led . Resistor (10k, 470ohm, 1k,22k). Capacitor (1000uf,10uf, 27pf). Crystal (12mhz). Buzzer. Npn pnp

CHAPTER 2

Page 7: Mobile detection

CIRCUIT DIAGRAM

TR?

TRAN-2P2S

D?

DIODE

D?

DIODE

C?10p

VI1 VO 3

GND

2

U?7805

C?10p

D?LED

R?10k

XTAL218

XTAL119

ALE30EA31

PSEN29

RST9

P0.0/AD0 39P0.1/AD1 38P0.2/AD2 37P0.3/AD3 36P0.4/AD4 35P0.5/AD5 34P0.6/AD6 33P0.7/AD7 32

P1.0/T21P1.1/T2EX2P1.23P1.34P1.45P1.56P1.67P1.78

P3.0/RXD 10P3.1/TXD 11P3.2/INT0 12P3.3/INT1 13P3.4/T0 14

P3.7/RD 17

P3.6/WR 16

P3.5/T1 15

P2.7/A15 28

P2.0/A8 21P2.1/A9 22P2.2/A10 23P2.3/A11 24P2.4/A12 25P2.5/A13 26P2.6/A14 27

U?

AT89C52

D7

14D6

13D5

12D4

11D3

10D2

9D1

8D0

7

E6

RW

5RS

4

VSS

1

VDD

2

VEE

3

LCD?LM016L

R?

10k

X?

CRYSTAL

C?

10pC?

10p

R?10k

C?10p

R4

DC 7

Q 3

GND

1VCC

8

TR2 TH 6

CV5

U?

555

Q?PNP

Q?NPN

C?10p

R?10k

BUZ1

BUZZER

ANTENNA

3130 AMPLIFIER

FIG.2.1

Page 8: Mobile detection
Page 9: Mobile detection

9

Page 10: Mobile detection
Page 11: Mobile detection
Page 12: Mobile detection
Page 13: Mobile detection
Page 14: Mobile detection
Page 15: Mobile detection
Page 16: Mobile detection
Page 17: Mobile detection

CHAPTER 3

WELCOME TO THE WORLD OF THE MICROCONTROLLERS.

Look around. Notice the smart “intelligent” systems? Be it the T.V,

washing machines, video games, telephones, automobiles, aero

planes, power systems, or any application having a LED or a LCD

as a user interface, the control is likely to be in the hands of a

micro controller!

Measure and control, that’s where the micro controller is at its

best.

Micro controllers are here to stay. Going by the current trend, it is

obvious that micro controllers will be playing bigger and bigger

roles in the different activities of our lives.

So where does this scenario leave us? Think about it……

The world of Micro controllers

What is the primary difference between a microprocessor and a

Page 18: Mobile detection

micro controller? Unlike the microprocessor, the micro controller

can be considered to be a true “Computer on a chip”.

In addition to the various features like the ALU, PC, SP and

registers found on a microprocessor, the micro controller also

incorporates features like the ROM, RAM, Ports, timers, clock

circuits, counters, reset functions etc.

While the microprocessor is more a general-purpose device, used

for read, write and calculations on data, the micro controller, in

addition to the above functions also controls the environment.

We have used a whole lot of technical terms already! Don’t get

worried about the meanings at this point. We shall understand

these terms as we proceed further

For now just be aware of the fact, that all these terms literally

mean what they say.

Bits and Bytes

Before starting on the 8051, here is a quick run through on the

bits and bytes. The basic unit of data for a computer is a bit. Four

bits make a nibble. Eight bits or two nibbles make a byte. Sixteen

bits or four nibbles or two bytes make a word.

1024 bytes make a kilobyte or 1KB, and 1024 KB make a Mega

Page 19: Mobile detection

Byte or 1MB.

Thus when we talk of an 8-bit register, we mean the register is

capable of holding data of 8 bits only.

CHAPTER 4

The 8051

The 8051 developed and launched in the early 80`s, is one of the

most popular micro controller in use today. It has a reasonably

large amount of built in ROM and RAM. In addition it has the

ability to access external memory.

The generic term `8x51` is used to define the device. The value

of x defining the kind of ROM, i.e. x=0, indicates none, x=3,

indicates mask ROM, x=7, indicates EPROM and x=9 indicates

EEPROM or Flash.

A note on ROM

The early 8051, namely the 8031 was designed without any ROM.

This device could run only with external memory connected to it.

Subsequent developments lead to the development of the PROM

or the programmable ROM. This type had the disadvantage of

being highly unreliable.

Page 20: Mobile detection

The next in line, was the EPROM or Erasable Programmable ROM.

These devices used ultraviolet light erasable memory cells. Thus

a program could be loaded, tested and erased using ultra violet

rays. A new program could then be loaded again.

An improved EPROM was the EEPROM or the electrically erasable

PROM. This does not require ultra violet rays, and memory can be

cleared using circuits within the chip itself.

Finally there is the FLASH, which is an improvement over the

EEPROM. While the terms EEPROM and flash are sometimes used

interchangeably, the difference lies in the fact that flash erases

the complete memory at one stroke, and not act on the individual

cells. This results in reducing the time for erasure.

CHAPTER 5Understanding the basic features of the 8051 core

Let’s now move on to a practical example. We shall work on a

simple practical application and using the example as a base,

shall explore the various features of the 8051 microcontroller.

Consider an electric circuit as follows,

Page 21: Mobile detection

The positive side (+ve) of the battery is connected to one side of

a switch. The other side of the switch is connected to a bulb or

LED (Light Emitting Diode). The bulb is then connected to a

resistor, and the other end of the resistor is connected to the

negative (-ve) side of the battery.

When the switch is closed or ‘switched on’ the bulb glows. When

the switch is open or ‘switched off’ the bulb goes off

If you are instructed to put the switch on and off every 30

seconds, how would you do it? Obviously you would keep looking

at your watch and every time the second hand crosses 30

seconds you would keep turning the switch on and off.

Imagine if you had to do this action consistently for a full day. Do

you think you would be able to do it? Now if you had to do this for

a month, a year??

No way, you would say!

The next step would be, then to make it automatic. This is where

we use the Microcontroller.

Page 22: Mobile detection

But if the action has to take place every 30 seconds, how will the

microcontroller keep track of time?

Execution time

Look at the following instruction,

clr p1.0

This is an assembly language instruction. It means we are

instructing the microcontroller to put a value of ‘zero’ in bit zero

of port one. This instruction is equivalent to telling the

microcontroller to switch on the bulb. The instruction then to

instruct the microcontroller to switch off the bulb is,

Setb p1.0

This instructs the microcontroller to put a value of ‘one’ in bit zero

of port one.

Don’t worry about what bit zero and port one means. We shall

learn it in more detail as we proceed.

There are a set of well defined instructions, which are used while

communicating with the microcontroller. Each of these

instructions requires a standard number of cycles to execute. The

Page 23: Mobile detection

cycle could be one or more in number.

How is this time then calculated?

The speed with which a microcontroller executes instructions is

determined by what is known as the crystal speed. A crystal is a

component connected externally to the microcontroller. The

crystal has different values, and some of the used values are

6MHZ, 10MHZ, and 11.059 MHz etc.

Thus a 10MHZ crystal would pulse at the rate of 10,000,000 times

per second.

The time is calculated using the formula

No of cycles per second = Crystal frequency in HZ / 12.

For a 10MHZ crystal the number of cycles would be,

10,000,000/12=833333.33333 cycles.

This means that in one second, the microcontroller would execute

833333.33333 cycles.

Therefore for one cycle, what would be the time? Try it out.

The instruction clr p1.0 would use one cycle to execute. Similarly,

the instruction setb p1.0 also uses one cycle.

Page 24: Mobile detection

So go ahead and calculate what would be the number of cycles

required to be executed to get a time of 30 seconds!

Getting back to our bulb example, all we would need to do is to

instruct the microcontroller to carry out some instructions

equivalent to a period of 30 seconds, like counting from zero

upwards, then switch on the bulb, carry out instructions

equivalent to 30 seconds and switch off the bulb.

Just put the whole thing in a loop, and you have a never ending

on-off sequence.

Simple isn’t it?

Page 25: Mobile detection

CHAPTER 6

OPERATING SYSTEM

Let us now have a look at the features of the 8051

core, keeping the above example as a reference,

1. 8-bit CPU.( Consisting of the ‘A’ and ‘B’ registers)

Most of the transactions within the microcontroller are carried out

through the ‘A’ register, also known as the Accumulator. In

addition all arithmetic functions are carried out generally in the

‘A’ register. There is another register known as the ‘B’ register,

which is used exclusively for multiplication and division.

Thus an 8-bit notation would indicate that the maximum value

that can be input into these registers is ‘11111111’. Puzzled?

The value is not decimal 111, 11,111! It represents a binary

number, having an equivalent value of ‘FF’ in Hexadecimal and a

value of 255 in decimal.

We shall read in more detail on the different numbering systems

namely the Binary and Hexadecimal system in our next module.

2. 4K on-chip ROM

Page 26: Mobile detection

Once you have written out the instructions for the microcontroller,

where do you put these instructions?

Obviously you would like these instructions to be safe, and not

get deleted or changed during execution. Hence you would load it

into the ‘ROM’

The size of the program you write is bound to vary depending on

the application, and the number of lines. The 8051 microcontroller

gives you space to load up to 4K of program size into the internal

ROM.

4K, that’s all? Well just wait. You would be surprised at the

amount of stuff you can load in this 4K of space.

Of course you could always extend the space by connecting to

64K of external ROM if required.

3. 128 bytes on-chip RAM

This is the space provided for executing the program in terms of

moving data, storing data etc.

4. 32 I/O lines. (Four- 8 bit ports, labeled P0, P1, P2, P3)

Page 27: Mobile detection

In our bulb example, we used the notation p1.0. This means bit

zero of port one. One bit controls one bulb.

Thus port one would have 8 bits. There are a total of four ports

named p0, p1, p2, p3, giving a total of 32 lines. These lines can

be used both as input or output.

5. Two 16 bit timers / counters.

A microcontroller normally executes one instruction at a time.

However certain applications would require that some event has

to be tracked independent of the main program.

The manufacturers have provided a solution, by providing two

timers. These timers execute in the background independent of

the main program. Once the required time has been reached,

(remember the time calculations described above?), they can

trigger a branch in the main program.

These timers can also be used as counters, so that they can count

the number of events, and on reaching the required count, can

cause a branch in the main program.

6. Full Duplex serial data receiver / transmitter.

The 8051 microcontroller is capable of communicating with

Page 28: Mobile detection

external devices like the PC etc. Here data is sent in the form of

bytes, at predefined speeds, also known as baud rates.

The transmission is serial, in the sense, one bit at a time

7. 5- interrupt sources with two priority levels (Two

external and three internal)

During the discussion on the timers, we had indicated that the

timers can trigger a branch in the main program. However, what

would we do in case we would like the microcontroller to take the

branch, and then return back to the main program, without

having to constantly check whether the required time / count has

been reached?

This is where the interrupts come into play. These can be set to

either the timers, or to some external events. Whenever the

background program has reached the required criteria in terms of

time or count or an external event, the branch is taken, and on

completion of the branch, the control returns to the main

program.

Priority levels indicate which interrupt is more important, and

needs to be executed first in case two interrupts occur at the

same time.

Page 29: Mobile detection

8. On-chip clock oscillator.

This represents the oscillator circuits within the microcontroller.

Thus the hardware is reduced to just simply connecting an

external crystal, to achieve the required pulsing rate.

CHAPTER 7 Program code of the project

motor_ccw bit p1.4

motor_acw bit p1.5

motor_off bit p1.6

reset_bz bit p1.7

over_t bit p2.0

over_v bit p2.1

over_c bit p2.2

bz_out bit p2.4

out_motor_acw bit p2.5

out_motor_ccw bit p2.6

call_recv bit p2.7

Page 30: Mobile detection

apr_ch0 bit p0.0

apr_ch1 bit p0.1

apr_ch2 bit p0.2

apr_ch3 bit p0.3

apr_ch4 bit p0.4

apr_ch5 bit p0.5

apr_ch6 bit p0.6

apr_bg bit p0.7

input equ p1

input_en bit p3.3

org 0000h

ljmp main

org 0003h

reti

org 000bh

reti

org 0013h

reti

org 001bh

reti

org 0023h

reti

main:

mov psw,#00h

Page 31: Mobile detection

mov sp,#040h

mov tmod,#00h

mov th0,#00h

mov tl0,#00h

mov th1,#00h

mov tl1,#00h

mov tcon,#00h

mov ie,#84h

mov ip,#00h

mov scon,#00h

mov p0,#0ffh

mov p1,#0ffh

mov p2,#0ffh

mov p3,#0ffh

keyloop:

jb motor_ccw,nxt1

clr out_motor_ccw

setb out_motor_acw

setb bz_out

lcall DELAY

jnb motor_ccw,$

lcall DELAY

jnb motor_ccw,$

nxt1:

jb motor_acw,nxt2

Page 32: Mobile detection

setb out_motor_ccw

clr out_motor_acw

setb bz_out

lcall DELAY

jnb motor_acw,$

lcall DELAY

jnb motor_acw,$

nxt2:

jb motor_off,nxt3

setb out_motor_ccw

setb out_motor_acw

setb bz_out

lcall DELAY

jnb motor_off,$

lcall DELAY

jnb motor_off,$

nxt3:

jb over_t,nxt4

jb out_motor_ccw,nxt41

sjmp nxt43

nxt41:

jb out_motor_acw,nxt42

sjmp nxt43

nxt42:

sjmp nxt4

Page 33: Mobile detection

nxt43:

setb out_motor_ccw

setb out_motor_acw

clr bz_out

clr call_recv

lcall DELAY10

setb call_recv

clr ex1

nxt4_nxt1:

jnb reset_bz,nxt4_nxt3

mov a,input

anl a,#0fh

cjne a,#5d,nxt4_nxt1

nxt4_nxt2:

jnb input_en,nxt4_nxt2

call sound0

nxt4_nxt3:

setb ex1

lcall DELAY

jnb over_t,$

lcall DELAY

jnb over_t,$

setb bz_out

nxt4:

jb over_v,nxt5

Page 34: Mobile detection

jb out_motor_ccw,nxt51

sjmp nxt53

nxt51:

jb out_motor_acw,nxt52

sjmp nxt53

nxt52:

sjmp nxt5

nxt53:

setb out_motor_ccw

setb out_motor_acw

clr bz_out

clr call_recv

lcall DELAY10

setb call_recv

clr ex1

nxt5_nxt1:

jnb reset_bz,nxt5_nxt3

mov a,input

anl a,#0fh

cjne a,#5d,nxt5_nxt1

nxt5_nxt2:

jnb input_en,nxt5_nxt2

call sound1

nxt5_nxt3:

setb ex1

Page 35: Mobile detection

lcall DELAY

jnb over_v,$

lcall DELAY

jnb over_v,$

setb bz_out

nxt5:

jb over_c,nxt6

jb out_motor_ccw,nxt61

sjmp nxt63

nxt61:

jb out_motor_acw,nxt62

sjmp nxt63

nxt62:

sjmp nxt6

nxt63:

setb out_motor_ccw

setb out_motor_acw

clr bz_out

clr call_recv

lcall DELAY10

setb call_recv

clr ex1

nxt6_nxt1:

jnb reset_bz,nxt6_nxt3

mov a,input

Page 36: Mobile detection

anl a,#0fh

cjne a,#5d,nxt6_nxt1

nxt6_nxt2:

jnb input_en,nxt6_nxt2

call sound2

nxt6_nxt3:

setb ex1

lcall DELAY

jnb over_c,$

lcall DELAY

jnb over_c,$

setb bz_out

nxt6:

ljmp keyloop

sound0:

clr apr_ch0

lcall DELAY100

setb apr_ch0

go_back0:

lcall DELAY100

jnb apr_bg,go_back0

lcall DELAY100

jnb apr_bg,go_back0

ret

Page 37: Mobile detection

sound1:

clr apr_ch1

lcall DELAY100

setb apr_ch1

go_back1:

lcall DELAY100

jnb apr_bg,go_back1

lcall DELAY100

jnb apr_bg,go_back1

ret

sound2:

clr apr_ch2

lcall DELAY100

setb apr_ch2

go_back2:

lcall DELAY100

jnb apr_bg,go_back2

lcall DELAY100

jnb apr_bg,go_back2

ret

sound3:

clr apr_ch3

lcall DELAY100

setb apr_ch3

go_back3:

Page 38: Mobile detection

lcall DELAY100

jnb apr_bg,go_back3

lcall DELAY100

jnb apr_bg,go_back3

ret

sound4:

clr apr_ch4

lcall DELAY100

setb apr_ch4

go_back4:

lcall DELAY100

jnb apr_bg,go_back4

lcall DELAY100

jnb apr_bg,go_back4

ret

sound5:

clr apr_ch5

lcall DELAY100

setb apr_ch5

go_back5:

lcall DELAY100

jnb apr_bg,go_back5

lcall DELAY100

jnb apr_bg,go_back5

ret

Page 39: Mobile detection

DELAY:

mov r0,#0d

mov r1,#10d

DLP:

djnz r0,DLP

djnz r1,DLP

ret

DELAY100:

mov r0,#150d

DLP100:

mov r1,#0d

DEL100:

djnz r1,DEL100

djnz r0,DLP100

ret

DELAY10:

mov r0,#0d

mov r1,#0d

mov r2,#30d

DEL10:

djnz r0,DEL10

djnz r1,DEL10

djnz r2,DEL10

ret

Page 40: Mobile detection

end