INTRODUCTION
Mobile phones are often used in prohibited area .In order to avoid the usage of mobile phones in
such protected area we design a system within the mobile phone that makes mobile disable with
its keypad and speaker to avoid attending the call and playing audio respectively. This system
will be active for only mobile phone comes under the coverage of protected area with RF range.
We are sending a four bit data by a RF Transmitter after ASK modulation in the microcontroller
and after getting that Data microcontroller will deactivate the required component like
keypad etc by the help of Relay. We cannot receive the call in that area.
RESTRICTED AREA
POWER SUPPLY
ENCODER
Fig. 1.1
RF TRANSMITTER
speaker,
MOBILE SECTION:
GSM
RELAY 1
RF RECEIVER
MCU
RELAY 2
LCD
Fig. 1.2
In In restricted area will have RF Transmitter to inform the mobile about the restriction.
In mobile section RF receiver will get the signal from restricted area.
Then the microcontroller will block the keypad and speaker in the phone through relay.
LCD will display the status of mobile phone
Once the user go out of the protected area means then the mobile will work in a normal mode
In restricted area Mobile jammer is planted and it kills the communication completely.
Jammer generates Noise signal .
We may miss some important incoming calls as we wont get the notification about it.
We may keep the mobile in silent mode but it is manually done and only if the user wishes.
1.4
PROPOSED SYSTEM:
Automatic operation.
Restricted area will have RF Transmitter to inform the mobile about the restriction.
In mobile section RF receiver will get the signal from restricted area.
Then the microcontroller will block the keypad and speaker in the phone through relay.
It doesnt depend on the wish of the user of the mobile but on the rules of the restricted area.
10uF
C2
RST
VCC
P3 _0
P3 _1
P3 _2
P3 _3
P3 _4
P3 _5
P3 _6
P3 _7
10
11
12
13
14
15
16
17
9
R2
8K 2
18
19
11 .0 592 MHz
X1
C4
33 PF
P1 .0
P1 .1
P1 .2
P1 .3
P1 .4
P1 .5
P1 .6
P1 .7
P3 .0 /RX D
P3 .1 /TX D
P3 .2 /INTO
P3 .3 /INT1
P3 .4 /TO
P3 .5 /T1
P3 .6 /WR
P3 .7 /RD
RST
XTA L2
XTA L1
C3
33 PF
80 51
Fig. 1.3
3
20
GND
1
2
3
4
5
6
7
8
C1
VCC
P1 _0
P1 _1
P1 _2
P1 _3
P1 _4
P1 _5
P1 _6
P1 _7
40
0.1u F
U1
P0 .0 /AD0
P0 .1 /AD1
P0 .2 /AD2
P0 .3 /AD3
P0 .4 /AD4
P0 .5 /AD5
P0 .6 /AD6
P0 .7 /AD7
EA/VP P
AL E/P ROG
PSE N
P2 .7 /A1 5
P2 .6 /A1 4
P2 .5 /A1 3
P2 .4 /A1 2
P2 .3 /A1 1
P2 .2 /A1 0
P2 .1 /A9
P2 .0 /A8
39
38
37
36
35
34
33
32
P0 _0
P0 _1
P0 _2
P0 _3
P0 _4
P0 _5
P0 _6
P0 _7
31
30
29
28
27
26
25
24
23
22
21
P2 _7
P2 _6
P2 _5
P2 _4
P2 _3
P2 _2
P2 _1
P2 _0
CHAPTER 2
D1
VDD
JP2
+4
220 VAC
VIN VOUT
C5
470 uF
GND
2 -
VDD
U2
7805
C6
100 uF
D2
LED
Fig. 2.1
R4
220 ohm
C7
0.1 uF
2
1
Fig 2.2
2.1.2 TRANSFORMER:
The potential transformer will step down the power supply voltage (0-230V) to (0-6V) level.
Then the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of opamp. The advantages of using precision rectifier are it
will give peak voltage output as DC, rest of the circuits will give only RMS output.
The path for current flow is from point B through D1, up through RL, through D3, through
the secondary of the transformer back to point B. this path is indicated by the solid arrows.
Waveforms (1) and (2) can be observed across D1 and D3.
One-half cycle later the polarity across the secondary of the transformer reverse, forward
biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be from point A
through D4, up through RL, through D2, through the secondary of T1, and back to point A. This
path is indicated by the broken arrows. Waveforms (3) and (4) can be observed across D2 and
D4. The current flow through RL is always in the same direction.
CHAPTER-3
MICROCONTROLLER
3.1 DESCRIPTION
contains two separate buses for both program and data. So, it has two distinctive memory spaces
of 64K X 8 size for both program and data. It is based on an 8 bit central processing unit with an
8 bit Accumulator and another 8 bit B register as main processing blocks. Other portions of the
architecture include few 8 bit and 16 bit registers and 8 bit memory locations.
Each 8031 device has some amount of data RAM built in the device for internal
processing. This area is used for stack operations and temporary storage of data.
This base architecture is supported with on chip peripheral functions like I/O ports,
timers/counters, versatile serial communication port. So it is clear that this 8031 architecture was
designed to cater many real time embedded needs.
Now you may be wondering about the non- mentioning of memory space meant
for the program storage, the most important part of any embedded controller. Originally this
8031 architecture was introduced with on chip, one time programmable version of Program
Memory of size 4K X 8. Intel delivered all these microcontrollers (8051) with users program
fused inside the device.
The memory portion was mapped at the lower end of the Program Memory area. But, after
getting devices, customers couldnt change anything in their program code, which was already
made available inside during device fabrication.
So, very soon Intel introduced the 8031 devices (8751) with re-programmable type of
Program Memory using built-in EPROM of size 4K X 8. Like a regular EPROM, this memory
can be re-programmed many times. Later on Intel started manufacturing these 8031 devices
without any on chip Program Memory.
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes
of In-System Programmable Flash memory. The device is manufactured using Atmels high9
density nonvolatile memory technology and is compatible with the Indus-try-standard 80C51
instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed
in-system or by a conventional nonvolatile memory pro-grammar. By combining a versatile 8-bit
CPU with In-System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a
powerful microcontroller which provides a highly-flexible and cost-effective solution to many
embedded control applications. The AT89S51 provides the following standard features: 4K bytes
of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit
timer/counters, a five-vector two-level interrupt architecture, a full duplex serial port, on-chip
oscillator, and clock circuitry.
In addition, the AT89S51 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode stops the
CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue
functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator,
disabling all other chip functions until the next external interrupt or hardware reset.
10
25
24
23
22
21
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
(T0)P3.4
(T1)P3.5
P1.6
P1.7
XTAL1
XTAL2
RST
(RXD)P3
(TXD)P3.1
.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
Fig. 3.1
11
GND
(INT0)P3.
2
(INT1)P3.
3
(RD)P3.7
(WR)P3.6
Vcc
P0.0(AD0)
P0.1(AD1)
P0.2(AD2)
P0.3(AD3)
P0.4(AD4
)P0.5(AD5)
P0.6(AD6
P0.7(AD7)
)
EA/VPP
3.3.2 PORT 0:
Port 0 is dual-function in that it in some designs port 0s I/O lines are
available to the developer to access external devices while in other designs it is used to access
external memory. If the circuit requires external RAM or ROM, the microcontroller will
automatically use port 0 to clock in/out the 8-bit data word as well as the low 8 bits of the
address in response to a MOVX instruction and port 0 I/O lines may be used for other functions
as long as external RAM isnt being accessed at the same time. If the circuit requires external
code memory, the microcontroller will automatically use the port 0 I/O lines to access each
instruction that is to be executed. In this case, port 0 cannot be utilized for other purposes since
the state of the I/O lines are constantly being modified to access external code memory.
Note that there are no pull-up resistors on port 0, so it may be necessary to include your
own pull-up resistors depending on the characteristics of the parts you will be driving via port
0.here small decoupling capacitor is connected in this port 0.
3.3.3 PORT 1:
Port 1 consists of 8 I/O lines that you may use exclusively to interface to external parts.
Unlike port 0, typical derivatives do not use port 1 for any functions themselves. Port 1 is
commonly used to interface to external hardware such as LCDs, keypads, and other devices.
12
With 8052 derivatives, two bits of port 1 are optionally used as described for extended timer 2
functions. These two lines are not assigned these special functions on 8051s since 8051s dont
have a timer 2. Further, these lines can still be used for your own purposes if you dont need
these features of timer 2.
P1.0 (T2): If T2CON.1 is set (C/T2), then timer 2 will be incremented whenever there is
a 1-0 transition on this line. With C/T2 set, P1.0 is the clock source for timer 2. P1.1 (T2EX): If
timer 2 is in auto-reload mode and T2CON.3 (EXEN2) is set, a 1-0 transition on this line will
cause timer 2 to be reloaded with the auto-reload value. This will also cause the T2CON.6
(EXF2) external flag to be set, which may cause an interrupt if so enabled.
3.3.4 PORT 2:
Like port 0, port 2 is dual-function. In some circuit designs it is available for accessing
devices while in others it is used to address external RAM or external code memory. When the
MOVX @DPTR instruction is used, port 2 is used to output the high byte of the memory address
that is to be accessed. In these cases, port 2 may be used to access other devices as long as the
devices are not being accessed at the same time a MOVX instruction is using port 2 to address
external RAM.
automatically use the port 2 I/O lines to access each instruction that is to be executed.
In this case, port 2 cannot be utilized for other purposes since the state of the I/O lines are
constantly being modified to access external code memory.
3.3.5 PORT 3:
Port 3 consists entirely of dual-function I/O lines. While the developer may access all
these lines from their software by reading/writing to the P3 SFR, each pin has a pre-defined
function that the microcontroller handles automatically when configured to do so and/or when
necessary. P3.0 (RXD): The UART/serial port uses P3.0 as the receive line. In circuit designs
that will be using the microcontrollers internal serial port, this is the line into which serial data
will be clocked. Note that when interfacing an 8052 to an RS-232 port that you may not connect
13
this line directly to the RS-232 pin; rather, you must pass it through a part such as the MAX232
to obtain the correct voltage levels. This pin is available for any use the developer may assign it
if the circuit has no need to receive data via the integrated serial port.
P3.1 (TXD): The UART/serial port uses P3.1 as the transmit line. In circuit designs that
will be using the microcontrollers internal serial port, this is the line that the microcontroller will
clock out all data which is written to the SBUF SFR. Note that when interfacing an 8052 to an
RS-232 port that you may not connect this line directly to the RS-232 pin; rather, you must pass
it through a part such as the MAX232 to obtain the correct voltage levels. This pin is available
for any use the developer may assign it if the circuit has no need to transmit data via the
integrated serial port.
P3.2 (-INT0): When so configured, this line is used to trigger an External 0 Interrupt.
This may either be low-level triggered or may be triggered on a 1-0 transition. Please see the
chapter on interrupts for details. This pin is available for any use the developer may assign it if
the circuit does not need to trigger an external 0 interrupt.
P3.3 (-INT1): When so configured, this line is used to trigger an External 1 Interrupt.
This may either be low-level triggered or may be triggered on a 1-0 transition. Please see the
chapter on interrupts for details. This pin is available for any use the developer may assign it if
the circuit does not need to trigger an external 1 interrupt.
P3.4 (T0): When so configured, this line is used as the clock source for timer 0. Timer 0
will be incremented either every instruction cycle that T0 is high or every time there is a 1-0
transition on this line, depending on how the timer is configured. Please see the chapter on timers
for details. This pin is available for any use the developer may assign it if the circuit does not to
control timer 0 externally.
P3.5 (T1): When so configured, this line is used as the clock source for timer 1. Timer 1
will be incremented either every instruction cycle that T1 is high or every time there is a 1-0
transition on this line, depending on how the timer is configured. Please see the chapter on timers
for details. This pin is available for any use the developer may assign it if the circuit does not to
control timer 1 externally.
14
P3.6 (-WR): This is external memory write strobe line. This line will be asserted low by
the microcontroller whenever a MOVX instruction writes to external RAM. This line should be
connected to the RAMs write (-W) line. This pin is available for any use the developer may
assign it if the circuit does not write to external RAM using MOVX.
P3.7 (-RD): This is external memory write strobe line. This line will be asserted low by
the microcontroller whenever a MOVX instruction writes to external RAM. This line should be
connected to the RAMs write (-W) line. This pin is available for any use the developer may
assign it if the circuit does not read from external RAM using MOVX.
15
If EA is tied high (connected to +5V) then the microcontroller will execute the program it
finds in internal/on-chip code memory. If EA is tied low (to ground) then it will attempt to
execute the program it finds in the attached external code memory EPROM. Of course, your
EPROM must be properly connected for the microcontroller to be able to access your program in
external code memory.
The Program Memory area (EPROM incase of external memory or Flash/EPROM incase
of internal one) is extremely large and never lose information when the power is removed.
Program Memory is used for information needed each time power is applied: Initialization
values, Calibration data, Keyboard lookup tables etc along with the program itself. The Program
Memory has a 16 bit address and any particular memory location is addressed using the 16 bit
Program Counter and instructions which generate a 16 bit address.
On chip Data memory is smaller and therefore quicker than Program Memory and it goes
into a random state when power is removed. On chip RAM is used for variables which are
calculated when the program is executed.
In contrast to the Program Memory, on chip Data Memory accesses need a single 8 bit
value (may be a constant or another variable) to specify a unique location. Since 8 bits are more
17
than sufficient to address 128 RAM locations, the on chip RAM address generating register is
single byte wide.
Different addressing mechanisms are used to access these different memory spaces and
this greatly contributes to microcomputers operating efficiency.
The 64K byte Program Memory space consists of an internal and an external memory
portion. If the EA pin is held high, the 8051 executes out of internal Program Memory unless the
address exceeds 0FFFH and locations 1000H through FFFFH are then fetched from external
Program Memory. If the EA pin is held low, the 8031 fetches all instructions from the external
Program Memory. In either case, the 16 bit Program Counter is the addressing mechanism.
19
The next figure indicates the layout of lower 128 bytes. The lowest 32 bytes (from
address 00H to 1FH) are grouped into 4 banks of 8 registers. Program instructions refer these
registers as R0 through R7. Program Status Word indicates which register bank is being used at
any point of time.
The next 16 bytes above these register banks form a block of bit addressable memory
space. The instruction set of 8031 contains a wide range of single bit processing instructions and
these instructions can directly access the 128 bits of this area.
The SFR space includes port latches, timer and peripheral control registers. All the
members of 8031 family have same SFR at the same SFR locations. There are some 16 unique
locations which can be accessed as bytes and as bits.
20
21
22
There are no requirements on the duty cycle of the external clock signal, since the input
to the internal clocking circuitry is through a divide-by two flip-flop, but minimum and
maximum voltage high and low time specifications must be observed.
23
When RESET is set to High, 8051 goes back to the power on state
Power-On Reset
Fig.3.7.8051 RESET
24
25
As mentioned earlier, there are four sets of R registers, register bank 0, 1, 2, and 3.
When the 8052 is first powered up, register bank 0 (addresses 00h through 07h) is used by
default.
In this case, for example, R4 is the same as Internal RAM address 04h. However, your
program may instruct the 8052 to use one of the alternate register banks; i.e., register banks 1, 2,
or 3. In this case, R4 will no longer be the same as Internal RAM address 04h. For example, if
your program instructs the 8052 to use register bank 1, register R4 will now be synonymous with
Internal RAM address 0Ch. If you select register bank 2, R4 is synonymous with 14h, and if you
select register bank 3 it is synonymous with address 1Ch.
The concept of register banks adds a great level of flexibility to the 8052, especially when
dealing with interrupts (we'll talk about interrupts later). However, always remember that the
register banks really reside in the first 32 bytes of Internal RAM.
26
The Program Counter is special in that there is no way to directly modify its value. That
is to say, you cant do something like PC=2430h. On the other hand, if you execute LJMP 2430h
youve effectively accomplished the same thing.
It is also interesting to note that while you may change the value of PC (by executing a
jump instruction, etc.) there is no way to read the value of PC. That is to say, there is no way to
ask the 8052 "What address are you about to execute?" As it turns out, this is not completely
true: There is one trick that may be used to determine the current value of PC.
27
This order of operation is important. When the 8052 is initialized SP will be initialized to
07h. If you immediately push a value onto the stack, the value will be stored in Internal RAM
address 08h. This makes sense taking into account what was mentioned two paragraphs above:
First the 8051 will increment the value of SP (from 07h to 08h) and then will store the pushed
value at that memory address (08h). SP is modified directly by the 8052 by six instructions:
PUSH, POP, ACALL, LCALL, RET, and RETI. It is also used intrinsically whenever an
interrupt is triggered (more on interrupts later. Dont worry about them for now!).
29
3.4.15 INTERRUPTS:
The 8031 has five interrupt sources: one from the serial port when a transmission or
reception operation is executed; two from the timers when overflow occurs and two come from
the two input pins INT0, INT1.
Each interrupt may be independently enabled or disabled to allow polling on same
sources and each may be classified as high or low priority.
A high priority source can override a low priority service routine. These options are
selected by interrupt enable and priority control registers, IE and IP.
When an interrupt is activated, then the program flow completes the execution of the
current instruction and jumps to a particular program location where it finds the interrupt service
routine. After finishing the interrupt service routine, the program flows return to back to the
original place.
The Program Memory address, 0003H is allotted to the first interrupt and next seven
bytes can be used to do any task associated with that interrupt.
External 0 0003H
Timer/Counter 0 000BH
External 1 0013H
Timer/counter 1 001BH
30
3.4.17APPLICATIONS:
Security applications
Banking applications
31
CHAPTER-4
SERIAL COMMUNICATION
4.1 INTRODUCTION:
Serial communication is basically the transmission or reception of data one bit at a time.
Today's computers generally address data in bytes or some multiple thereof. A byte contains 8
bits. A bit is basically either a logical 1 or zero. Every character on this page is actually
expressed internally as one byte. The serial port is used to convert each byte to a stream of ones
and zeroes as well as to convert a stream of ones and zeroes to bytes. The serial port contains a
electronic chip called a Universal Asynchronous Receiver/Transmitter (UART) that actually
does the conversion.
The serial port has many pins. We will discuss the transmit and receive pin first.
Electrically speaking, whenever the serial port sends a logical one (1) a negative voltage is
effected on the transmit pin. Whenever the serial port sends a logical zero (0) a positive voltage
is affected. When no data is being sent, the serial port's transmit pin's voltage is negative (1) and
is said to be in a MARK state. Note that the serial port can also be forced to keep the transmit pin
at a positive voltage (0) and is said to be the SPACE or BREAK state. (The terms MARK and
SPACE are also used to simply denote a negative voltage (1) or a positive voltage (0) at the
transmit pin respectively).
When transmitting a byte, the UART (serial port) first sends a START BIT which is a
positive voltage (0), followed by the data (general 8 bits, but could be 5, 6, 7, or 8 bits) followed
by one or two STOP Bits which is a negative(1) voltage. The sequence is repeated for each byte
sent. Figure 1 shows a diagram of what a byte transmission would look like.
At this point you may want to know what the duration of a bit is. In other words, how
long does the signal stay in a particular state to define a bit. The answer is simple. It is dependent
on the baud rate. The baud rate is the number of times the signal can switch states in one second.
Therefore, if the line is operating at 9600 baud, the line can switch states 9,600 times per second.
32
This means each bit has the duration of 1/9600 of a second or about 100sec.
when transmitting a character there are other characteristics other than the baud rate that
must be known or that must be setup. These characteristics define the entire interpretation of the
data stream.
The first characteristic is the length of the byte that will be transmitted. This
The second characteristic is parity. The parity characteristic can be even, odd, mark,
space, or none. If even parity, then the last data bit transmitted will be a logical 1 if the data
transmitted had an even amount of 0 bits. If odd parity, then the last data bit transmitted will be a
logical 1 if the data transmitted had an odd amount of 0 bits. If MARK parity, then the last
transmitted data bit will always be a logical 1. If SPACE parity, then the last transmitted data bit
will always be a logical 0. If no parity then there is no parity bit transmitted.
The third characteristic is the amount of stop bits. This value in general is 1 or 2. Assume
we want to send the letter 'A' over the serial port. The binary representation of the letter 'A' is
01000001. Remembering that bits are transmitted from least significant bit (LSB) to most
significant bit (MSB), the bit stream transmitted would be as follows for the line characteristics 8
bits, no parity, 1 stop bit and 9600 baud.
LSB (0 1 0 0 0 0 0 1 0 1) MSB
The above represents (Start Bit) (Data Bits) (Stop Bit). To calculate the actual byte
transfer rate simply divide the baud rate by the number of bits that must be transferred for each
byte of data. In the case of the above example, each character requires 10 bits to be transmitted
for each character. As such, at 9600 baud, up to 960 bytes can be transferred in one second.
The above discussion was concerned with the "electrical/logical" characteristics of the
data stream. We will expand the discussion to line protocol. Serial communication can be half
duplex or full duplex. Full duplex communication means that a device can receive and transmit
data at the same time. Half duplex means that the device cannot send and receive at the same
33
time. It can do them both, but not at the same time. Half duplex communication is all but
outdated except for a very small focused set of applications.
Half duplex serial communication needs at a minimum two wires, signal ground and the
data line. Full duplex serial communication needs at a minimum three wires, signal ground,
transmit data line, and receive data line. The RS232 specification governs the physical and
electrical characteristics of serial communications. This specification defines several additional
signals that are asserted (set to logical 1) for information and control beyond the data signal
These signals are the Carrier Detect Signal (CD), asserted by modems to signal a
successful connection to another modem, Ring Indicator (RI), asserted by modems to signal the
phone ringing, Data Set Ready (DSR), asserted by modems to show their presence, Clear To
Send (CTS), asserted by modems if they can receive data, Data Terminal Ready (DTR), asserted
by terminals to show their presence, Request To Send (RTS), asserted by terminals if they can
receive data. The section RS232 Cabling describes these signals and how they are connected.
The above paragraph alluded to hardware flow control. Hardware flow control is a
method that two connected devices use to tell each other electronically when to send or when not
to send data. A modem in general drops (logical 0) its CTS line when it can no longer receive
characters. It re-asserts it when it can receive again. A terminal does the same thing instead with
the RTS signal. Another method of hardware flow control in practice is to perform the same
procedure
in
the
previous
paragraph
except
that
the
DSR
and
DTR
signals.
Note that hardware flow control requires the use of additional wires. The benefit to this
however is crisp and reliable flow control. Another method of flow control used is known as
software flow control. This method requires a simple 3 wire serial communication link, transmit
data, receive data, and signal ground. If using this method, when a device can no longer receive,
it will transmit a character that the two devices agreed on. This character is known as the XOFF
character. This character is generally a hexadecimal 13. When a device can receive again it
transmits an XON character that both devices agreed to. This character is generally a
hexadecimal 11.
34
4.3 RS232:
When we look at the connector pin out of the RS232 port, we see two pins which are
certainly used for flow control. These two pins are RTS, request to send and CTS, clear to send.
With DTE/DCE communication (i.e. a computer communicating with a modem device) RTS is
an output on the DTE and input on the DCE. CTS are the answering signal coming from the
DCE.
35
Before sending a character, the DTE asks permission by setting its RTS output. No
information will be sent until the DCE grants permission by using the CTS line.
If the DCE cannot handle new requests, the CTS signal will go low. A simple but useful
mechanism allowing flow control in one direction. The assumption is that the DTE can always
handle incoming information faster than the DCE can send it. In the past, this was true. Modem
speeds of 300 baud were common and 1200 baud was seen as a high speed connection.
For further control of the information flow, both devices have the ability to signal their
status to the other side. For this purpose, the DTR data terminal ready and DSR data set ready
signals are present. The DTE uses the DTR signal to signal that it is ready to accept information,
whereas the DCE uses the DSR signal for the same purpose. Using these signals involves not a
small protocol of requesting and answering as with the RTS/CTS handshaking. These signals are
in one direction only.
The last flow control signal present in DTE/DCE communication is the CD carrier
detect. It is not used directly for flow control, but mainly an indication of the ability of the
modem device to communicate with its counter part. This signal indicates the existence of a
communication link between two modem devices.
36
Rx
TX
TX
Rx
Signal ground
present to either CTS line to make this possible. The only type of communication which is
allowed on such a null modem line is data-only traffic on the cross connected Rx/TX lines.
This does however not mean that this null modem cable is useless. Communication links
like present in the Norton Commander program can use this null modem cable. This null modem
cable can also be used when communicating with devices which do not have modem control
signals like electronic measuring equipment etc.
As you can imagine, with this simple null modem cable no hardware flow control can be
implemented. The only way to perform flow control is with software flow control using the
XOFF and XON characters.
38
CHAPTER-5
SOFTWARE TOOLS
5.1 TYPES OF TOOLS:
KEIL C
Flash Magic
ORCAD
Capture
Layout
5.2 KEIL C:
Keil software is the leading vendor for 8/16-bit development tools (ranked at first
position in the 2004 embedded market study of the embedded system and EE times magazine).
Keil software is represented worldwide in more than 40 countries, since the market
introduction in 1988; the keil C51 compiler is the de facto industry standard and supports more
than 500 current 8051 device variants. Now, keil software offers development tools for ARM.
Keil software makes C compilers, macro assemblers, real-time kernels, debuggers,
simulators, integrated
The C51 Compiler translates C source files into relocatable object modules which contain
full symbolic information for debugging with the Vision Debugger or an in-circuit emulator. In
addition to the object file, the compiler generates a listing file which may optionally include
symbol table and cross reference
Flexible variable allocation with bit, data, bdata, idata, xdata, and
instruction sets,
Typically the
handshaking signals are used to control such pins as Reset, PSEN and VCC. The exact pins used
depend on the specific device.
When this feature is supported, Flash Magic will automatically place the device into ISP
mode at the beginning of an ISP operation. Flash Magic will then automatically cause the device
to execute code at the end of the ISP operation.
40
5.4 ORCAD:
ORCAD really consists of tools. Capture is used for design entry in schematic form. You
will probably be already familiar with looking at circuits in this form from working with other
tools in your university courses. Layout is a tool for designing the physical layout of
components and circuits on a PCB. During the design process, you will move back and forth
between these two tools. The design flow diagram is given below:
41
Fig. 5.2
42
CHAPTER-6
HARDWARE TOOLS
Microcontroller (AT89S51)
RF Module
Encoder/Decoder
Serial communication
43
very low -- only about six to ten SMS messages per minute.
Fig. 6.2
45
Voice calls:
`
Voice calls are not an application area to be targeted. In future if interfaces like a
microphone and speaker are provided for some applications then this can be considered.
SMS:
SMS is an area where the modem can be used to provide features like:
Pre-stored SMS transmission
These SMS can be transmitted on certain trigger events in an
automation system
SMS can also be used in areas where small text information has to be sent. The
transmitter can be an automation system or machines like vending machines, collection machines
or applications like positioning systems where
The navigator keeps on sending SMS at particular time intervals. SMS can be a solution where
GSM data call or GPRS services are not available
46
6.1.6 APPLICATIONS:
Access control devices:
Now access control devices can communicate with servers and security staff through
SMS messaging. Complete log of transaction is available at the head-office Server instantly
without any wiring involved and device can instantly alert security personnel on their mobile
phone in case of any problem. RaviRaj Technologies is introducing this technology in all
Fingerprint Access control and time attendance products.
Transaction terminals:
EDC machines, POS terminals can use SMS messaging to confirm transactions from
central servers. The main benefit is that central server can be anywhere in the world. Today you
need local servers in every city with multiple telephone lines. You save huge infrastructure costs
as well as per transaction cost.
GSM capability is the answer; you can receive instant transaction data from all your branch
officers,
warehouses
and
business
associates
with
nil
downtime,
Low
cost
You data size per transaction should be small like 1-3 lines. e.g. banking transaction
data, sales/purchase data, consignment tracking data, updates. These small but important
transaction data can be sent through SMS messaging which cost even less then a local telephone
call or sometimes free of cost worldwide. Hence with negligible cost you are able to send critical
information to your head office located anywhere in the world from multiple points.
You can also transfer faxes, large data through GSM but this will be as or more costly
compared to landline networks.
mobile
networks
have
high
uptime
compared
to
landline,
internet and
other
communication mediums. Also in situations where you expect that someone may sabotage your
communication systems by cutting wires or taping landlines, you can depend on GSM wireless
communication.
with GSM technology instead of conventional landlines. time you find local transaction servers
busy as these servers use multiple telephone lines to take care of multiple transactions, whereas
one GSM connection is enough to handle hundreds of transaction.
6.3 Relay
Relay is an electrical switch that opens and closes under the control of another electrical
circuit. In the original form, the switch is operated by an electromagnet to open or close one or
many sets of contacts. It was invented by Joseph Henry in 1835. Because a relay is able to
control an output circuit of higher power than the input circuit, it can be considered to be, in a
broad sense, a form of an electrical amplifier.
A simple electromagnetic relay, such as the one taken from a car in the first picture, is an
adaptation of an electromagnet. It consists of a coil of wire surrounding a soft iron core, an iron
yoke, which provides a low reluctance path for magnetic flux, a moveable iron armature, and a
set, or sets, of contacts; two in the relay pictured. The armature is hinged to the yoke and
mechanically linked to a moving contact or contacts. It is held in place by a spring so that when
the relay is de-energized there is an air gap in the magnetic circuit. In this condition, one of the
two sets of contacts in the relay pictured is closed, and the other set is open. Other relays may
have more or fewer sets of contacts depending on their function. The relay in the picture also has
a wire connecting the armature to the yoke. This ensures continuity of the circuit between the
moving contacts on the armature, and the circuit track on the Printed Circuit Board (PCB) via the
yoke, which is soldered to the PCB.
49
When an electric current is passed through the coil, the resulting magnetic field attracts
the armature and the consequent movement of the movable contact or contacts either makes or
breaks a connection with a fixed contact. If the set of contacts was closed when the relay was deenergized, then the movement opens the contacts and breaks the connection, and vice versa if the
contacts were open. When the current to the coil is switched off, the armature is returned by a
force, approximately half as strong as the magnetic force, to its relaxed position. Usually this
force is provided by a spring, but gravity is also used commonly in industrial motor starters.
Most relays are manufactured to operate quickly. In a low voltage application, this is to reduce
noise. In a high voltage or high current application, this is to reduce arcing.
Fig. 6.3
Fig. 6.4
50
The Holtek HT-12E IC encodes 12-bits of information and serially transmits this data on receipt
of a Transmit Enable, or a LOW signal on pin-14 /TE. Pin-17 the D_OUT pin of the HT-12E
serially transmits whatever data is available on pins 10,11,12 and 13, or D0,D1,D2 and D3. Data
is transmitted at a frequency selected by the external oscillator resistor. See the encoder/decoder
datasheets for details.
Note that if you use anything other than 5V on both encoder/decoder circuits (you will need to
change these oscillator resistor values). Refer to the tables in the HT12D/HT-12E datasheet.
By using the switches attached to the data pins on the HT-12E, as shown in the schematic, we
can select the information in binary format to send to the receiver. The receiver section consists
of the Ming RE-99 and the HT-12D decoder IC. The DATA_IN pin-14 of the HT-12D reads the
12-bit binary information sent by the HT-12E and then places this data on its output pins. Pins
10,11,12 and 13 are the data out pins of the HT-12D, D0,D1,D2 and D3.
The HT-12D receives the 12-bit word and interprets the first 8-bits as address and the last 4-bits
as data. Pins 1-8 of the HT-12E are the address pins. Using the address pins of the HT-12E, we
can select different addresses for up to 256 receivers. The address is determined by setting pins
1-8 on the HT-12E to ground, or just leaving them open. The address selected on the HT-12E
circuit must match the address selected on the HT-12D circuit (exactly), or the information will
be ignored by the receiving circuit.
When the received addresses from the encoder matches the decoders, the Valid Transmission
pin-17 of the HT-12D will go HIGH to indicate that a valid transmission has been received and
the 4-bits of data are latched to the data output pins, 10-13. The transistor circuit shown in the
schematic will use the VT, or valid transmission pin to light the LED. When the VT pin goes
HIGH it turns on the 2N2222 transistor which in turn delivers power to the LED providing a
visual indication of a valid transmission reception.
51
It is
recommended that you choose a 1% resistor for each of these resistors to ensure the correct
circuit oscillation.
52
RFID technology has been around since 1970, but until recently, it has been too expensive to use
on a large scale. Originally, RFID tags were used to track large items, like cows, railroad cars
and airline luggage, that were shipped over long distances. These original tags, called inductively
coupled RFID tags, were complex systems of metal coils, antennae and glass.
Inductively coupled RFID tags were powered by a magnetic field generated by the RFID reader.
Electrical current has an electrical component and a magnetic component -- it is electromagnetic.
Because of this, you can create a magnetic field with electricity, and you can create electrical
current with a magnetic field. The name "inductively coupled" comes from this process -- the
magnetic field inducts a current in the wire.
Capacitively coupled tags were created next in an attempt to lower the technology's cost. These
were meant to be disposable tags that could be applied to less expensive merchandise and made
as universal as bar codes. Capacitively coupled tags used conductive carbon ink instead of metal
coils to transmit data. The ink was printed on paper labels and scanned by readers. Motorola's
BiStatix RFID tags were the frontrunners in this technology. They used a silicon chip that was
only 3millimeters wide and stored 96 bits of information. This technology didn't catch on with
retailers, and BiStatix was shut down in 2001
Newer innovations in the RFID industry include active, semi-active and passive RFID
tags. These tags can store up to 2 kilobytes of data and are composed of a microchip, antenna
and, in the case of active and semi-passive tags, a battery. The tag's components are enclosed
within plastic, silicon or sometimes glass.
At a basic level, each tag works in the same way:
The tag's antenna receives electromagnetic energy from an RFID reader's antenna.
Using power from its internal battery or power harvested from the reader's electromagnetic field,
the tag sends radio waves back to the reader.
53
The reader picks up the tag's radio waves and interprets the frequencies as meaningful data.RFID
tags are an improvement over bar codes because the tags have read and write capabilities. Data
stored on RFID tags can be changed, updated and locked. Some stores that have begun using
RFID tags have found that the technology offers a better way to track merchandise for stocking
and marketing purposes. Through RFID tags, stores can see how quickly the products leave the
shelves and which shoppers are buying them.
RFID tags won't entirely replace bar codes in the near future -- far too many retail outlets
currently use UPC scanners in billions of transactions every year. But as time goes on we'll
definitely see more products tagged with RFIDs and an increased focus on seamless wireless
transactions like that rosy instant checkout picture painted in the introduction. In fact, the world
is already moving toward using RFID technology in payments through special credit cards and
smart phones -- we'll get into that later.
In addition to retail merchandise, RFID tags have also been added to transportation devices like
highway toll postcards and subway passes. Because of their ability to store data so efficiently,
RFID tags can tabulate the cost of tolls and fares and deduct the cost electronically from the
amount of money that the user places on the card. Rather than waiting to pay a toll at a tollbooth
or shelling out coins at a token counter, passengers use RFID chip-embedded passes like debit
cards.
In our project we are sending one four bit data 01111 which after ASK modulation will
be send to the microcontroller via a frequency of 433.92 MHz . Microcontroller identify
54
the Data send via that frequency and will deactivate the required component to be
deactivated by the help of Relays. Microcontroller is so programmed that it will
deactivate the component according to the Data.
P2.4(
A12)
0111
ASK
P2.3(A
11)
P2.2(
A10)
0111
PSE
P2.5(
ALE/
P2.7(
Fig. 6.5
55
6.9 RF DETAILS
The TWS-434 and RWS-434 are extremely small, and are excellent for applications requiring
short-range RF remote controls. The transmitter module is only 1/3 the size of a standard
postage stamp, and can easily be placed inside a small plastic enclosure.
TWS-434: The transmitter output is up to 8mW at 433.92MHz with a range of approximately
400 foot (open area) outdoors. Indoors, the range is approximately 200 foot, and will go through
most walls.....
Modulation: ASK
Specification
Symbol
Parameter
Conditions
Min
Max
Unit
Typ
Vcc
2.0
12
1.64
mA
Peak Current(12V)
19.4
mA
Icc
Icc
56
Vcc
IData=0Ua (Low)
0.3
Vin
-
Vii
Absolute Frequency
433.72 433.92
434.12 MHz
417.8
418
418.2 MHz
+/-150
+/-200 KHz
16
Fo
Relative To 433.92MHz
FO
RF Out Power Into 50
VCC 9V-12V
dBm
Po
VCC 5V-6V
Modulation Bandwidth
External Encoding
14
512
4.8K
200K bps
100
uS
100
uS
Tr
Tf
Notes : ( Case Temperature = +25C+/-2C Test Load Impedance = 50 )
The TWS-434 transmitter accepts both linear and digital inputs, can operate from 1.5 to 12
Volts-DC, and makes building a miniature hand-held RF transmitter very easy. The TWS-434 is
approximately the size of a standard postage stamp.
CHAPTER-7
CONCLUSION
Thus the concept of mobile keypad and speaker disabling in protected region is implemented for
the data 0111.
58
CHAPTER-8
REFERENCES
ComLaw Management - Series- Notification that the Australian Communications and
Media Authority prohibits the operation or supply, or possession for the purpose of
operation or supply, of specified devices
Radio communication Act of Canada
Cellphone jamming technology will be placed in all NZ prisons | NATIONAL | NEWS |
tvnz.co.nz
BBC News | Jam mobile phone signals in prisons, says inspector
Communications Act of 1934: as amended by Telecom Act of 1996
FCC: Wireless Services: Cellular Services: Operations: Blocking & Jamming
http://news.cnet.com/Company-challenges-FCC-rules-on-cell-phone-jamming-gear/21001036_3-6139854.htm.
How stuff works.com.
IEEE
Wikipedia
59
60