Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SMS
PORT1
8051
Level
Converter
TABLE OF CONTENTS
1
INTRODUCTION
Introduction
Methodology
Scope of Work
Aims of the GSM Electronic Notice Board
Objectives of the GSM Home Appliance Control Device
Block diagram
Circuit diagram
Component list
Theoretical Background
GSM Architecture
Technical Details
Network Structure
Subscriber Identity Module (SIM)
Literature Review
GSM Security
HARDWAR DISCRIPTION
GSM Modem
2
Microcontroller MODEM Interfacing
Operational Flowchart
Initializations
Validity Check
Display
Programmer
Simulator
Burner
Conclusion
Problems Encountered
Future Improvement
Recommendation
INTRODUCTION
3
GSM and GPRS based Designs have developed another
innovative and Public utility product for mass communication
[1]. The purpose of this project is to remote monitoring and
control of the Domestic Energy meter. This system enables the
Electricity Department to read the meter readings regularly
without the person visiting each house. This can be achieved by
the use of micro controller unit that continuously monitors and
records the Energy Meter readings in its permanent (non-
volatile) memory location. This system also makes use of a
GSM modem for remote monitoring and control of Energy
Meter.
METHODOLOGY
SCOPE OF WORK
I will use liquid crystal display for displaying the message; I will
also use GSM modem (Motorola W220) as an interface between
mobile and microcontroller. It will send message to any phone
irrespective of the GSM network through the modem connected
to the programmable device.
6
Uses: This is every useful and innovative project.
We can use this to secure our houses and offices to save
power and money of the nation.
OBJECTIVES OF THE ENERGY METER
Programming of the mobile phone with AT (Attention)
command sequence
Interfacing the programming chip with the personal
computer
Interfacing the programmable chip with the DC Motor.
Interfacing of the mobile phone with the programmable
chip
Sending messages from the remote phone to control device.
BLOCK DIAGRAM
7
REGULATED
POWER
SUPPLY
METER
LCD
RELAY
APPLIANC GSM
ES 89S52 MODEM
MOBILE PHONES
CIRCUIT DIAGRAM
8
COMPONENT LIST
9
Meter Monitoring with Temper proof
Name Capacity Quantity Code
Regulator 7805 1 U1
Regulator 7812 1 U3
Capacitor 1000f 1 C1
Capacitor 10f 1 C2
Ceramic Capacitor 22pf 2 C3,C4
Diode 4 D1,D2,D3,D4
Push Button 1
Mobile Phone 1
Relay 1 RL1
LCD 16*2 1
40 Pin Base 1 U2
16 Pin Base 1 U5
ULN2003 1
8051(AT89S52) 1
Oscillator 11.0592mhz 1 X1
LED 2 D5,D7
Resistance 220 3 R1,R4,R8
Resistance 1k 1 R3
10
Resistance 10k 2 R2,R5
Buzzer 1 BUZ1
BC547 1 Q1
Energy meter 1
LITERATURE REVIEW
THEORETICAL BACKGROUND
11
GSM (Global System for Mobile communications: originally
generation (2G) mobile phone system [5]. This has also meant
GSM ARCHITECTURE
Base Station Subsystem controls the radio link with the Mobile
12
Station. The Network Subsystem performs main functions such
TECHNICAL DETAILS
13
1991 GSM GLOBAL SYSTEM FOR DIGITAL WORLD-WIDE
MOBILE
COMMUNICATION
1991 TDMA TIME DIVISION DIGITAL AMERICA
MULTIPLE ACCESS
1993 CDMA CODE DIVISION DIGITAL NORTH
MULTIPLE ACCESS AMERICA,
KOREA
1992 GSM 1800 GLOBAL SYSTEM FOR DIGITAL EUROPE
MOBILE
COMMUNICATION
1994 PDC PERSONAL DIGITAL DIGITAL JAPAN
CELLULAR
1995 PCS 1900 PERSONAL DIGITAL NORTH
COMPUTER SERVICES AMERICA
2001 GSM 800 GLOBAL SYSTEM FOR DIGITAL NORTH
MOBILE AMERICA
COMMUNICATION
2006-TILL GSM 450 GLOBAL SYSTEM FOR DIGITAL WORLD-WIDE
DATE MOBILE
COMMUNICATION
GSM FREQUENCIES
(including Canada and the United States) use the 850 MHz and
14
1900 MHz bands because the 900 and 1800 MHz frequency
NETWORK STRUCTURE
The network behind the GSM seen by the customer is large and
required.
controllers).
15
All of the elements in the system combine to produce many
information and phone book. This allows the user to retain his or
16
LITERATURE REVIEW
Currently the main work that has been done on this proposed
the remote area and one /off the appliance. But in this new
microcontroller. The user will send SMS from his phone and he
GSM SECURITY
17
shared key and challenge-response. Communications between
18
HARDWARE DISCRIPTION
POWER SUPPLY:
19
to an output load or group of loads is called a power supply
unit or PSU. The term is most commonly applied to electrical
energy supplies, less often to mechanical ones, and rarely to
others.
TRANSFORMER:
20
electromotive force (EMF) or "voltage" in the "secondary"
winding. This effect is called mutual induction.
21
BASIC PARTS OF A TRANSFORMER
22
THE COMPONENTS OF A TRANSFORMER
23
The CORE, which provides a path for the magnetic lines of
flux.
BRIDGE RECTIFIER
24
BASIC OPERATION
According to the conventional model of current flow originally
established by Benjamin Franklin and still followed by most
engineers today, current is assumed to flow through electrical
conductors from the positive to the negative pole. In actuality,
free electrons in a conductor nearly always flow from the
negative to the positive pole. In the vast majority of
applications, however, the actual direction of current flow is
irrelevant. Therefore, in the discussion below the conventional
model is retained.
25
When the input connected to the left corner is negative, and the
input connected to the right corner is positive, current flows
from the lower supply terminal to the right along the red path to
the output, and returns to the upper supply terminal via the blue
path.
In each case, the upper right output remains positive and lower
right output negative. Since this is true whether the input is AC
or DC, this circuit not only produces a DC output from an AC
26
input, it can also provide what is sometimes called "reverse
polarity protection". That is, it permits normal functioning of
DC-powered equipment when batteries have been installed
backwards, or when the leads (wires) from a DC power source
have been reversed, and protects the equipment from potential
damage caused by reverse polarity.
OUTPUT SMOOTHING
For many applications, especially with single phase AC where
the full-wave bridge serves to convert an AC input into a DC
output, the addition of a capacitor may be desired because the
bridge alone supplies an output of fixed polarity but
continuously varying or "pulsating" magnitude (see diagram
above).
27
The function of this capacitor, known as a reservoir capacitor (or
smoothing capacitor) is to lessen the variation in (or 'smooth')
the rectified AC output voltage waveform from the bridge. One
explanation of 'smoothing' is that the capacitor provides a low
impedance path to the AC component of the output, reducing the
AC voltage across, and AC current through, the resistive load. In
less technical terms, any drop in the output voltage and current
of the bridge tends to be canceled by loss of charge in the
capacitor. This charge flows out as additional current through
the load. Thus the change of load current and voltage is reduced
relative to what would occur without the capacitor. Increases of
voltage correspondingly store excess charge in the capacitor,
thus moderating the change in output voltage / current.
28
The simplified circuit shown has a well-deserved reputation for
being dangerous, because, in some applications, the capacitor
can retain a lethal charge after the AC power source is removed.
If supplying a dangerous voltage, a practical circuit should
include a reliable way to safely discharge the capacitor. If the
normal load cannot be guaranteed to perform this function,
perhaps because it can be disconnected, the circuit should
include a bleeder resistor connected as close as practical across
the capacitor. This resistor should consume a current large
enough to discharge the capacitor in a reasonable time, but small
enough to minimize unnecessary power waste.
29
one ripple cycle, the above configuration will produce a
smoothed DC voltage across the load.
The idealized waveforms shown above are seen for both voltage
and current when the load on the bridge is resistive. When the
load includes a smoothing capacitor, both the voltage and the
current waveforms will be greatly changed. While the voltage is
smoothed, as described above, current will flow through the
bridge only during the time when the input voltage is greater
than the capacitor voltage. For example, if the load draws an
average current of n Amps, and the diodes conduct for 10% of
the time, the average diode current during conduction must be
10n Amps. This non-sinusoidal current leads to harmonic
distortion and a poor power factor in the AC supply.
REGULATOR IC (78XX)
31
It is a three pin IC used as a voltage regulator. It converts
unregulated DC current into regulated DC current.
32
7805 gives fixed 5V DC voltage if input voltage is in (7.5V,
20V).
33
When this filter is used, the RC charge time of the filter
capacitor (C1) must be short and the RC discharge time must be
long to eliminate ripple action. In other words, the capacitor
must charge up fast, preferably with no discharge at all. Better
filtering also results when the input frequency is high; therefore,
the full-wave rectifier output is easier to filter than that of the
half-wave rectifier because of its higher frequency.
34
connected across the output (view B), the average value of
output voltage (Eavg) is increased due to the filtering action of
capacitor C1.
UNFILTERED
FILTERE
35
The value of the capacitor is fairly large (several microfarads),
thus it presents a relatively low reactance to the pulsating current
and it stores a substantial charge.
36
A comparison of the waveforms shown in figure 4-16 (view A
and view B) illustrates that the addition of C1 to the circuit
results in an increase in the average of the output voltage (E avg)
and a reduction in the amplitude of the ripple component (E r)
which is normally present across the load resistance.
37
through the load resistor (RL). The discharge of C1 produces the
downward slope as indicated by the solid line on the waveform
in view B. In contrast to the abrupt fall of the applied ac voltage
from peak value to zero, the voltage across C1 (and thus across
RL) during the discharge period gradually decreases until the
time of the next half cycle of rectifier operation. Keep in mind
that for good filtering, the filter capacitor should charge up as
fast as possible and discharge as little as possible.
38
Since practical values of C1 and R L ensure a more or less
gradual decrease of the discharge voltage, a substantial charge
remains on the capacitor at the time of the next half cycle of
operation. As a result, no current can flow through the diode
until the rising ac input voltage at the anode of the diode exceeds
the voltage on the charge remaining on C1. The charge on C1 is
the cathode potential of the diode. When the potential on the
anode exceeds the potential on the cathode (the charge on C1),
the diode again conducts, and C1 begins to charge to
approximately the peak value of the applied voltage.
After the capacitor has charged to its peak value, the diode will
cut off and the capacitor will start to discharge. Since the fall of
the ac input voltage on the anode is considerably more rapid
than the decrease on the capacitor voltage, the cathode quickly
39
become more positive than the anode, and the diode ceases to
conduct.
40
Another thing to keep in mind is that the ripple component (E r)
of the output voltage is an ac voltage and the average output
voltage (Eavg) is the dc component of the output. Since the filter
capacitor offers relatively low impedance to ac, the majority of
the ac component flows through the filter capacitor. The ac
component is therefore bypassed (shunted) around the load
resistance, and the entire dc component (or Eavg) flows through
the load resistance. This statement can be clarified by using the
formula for XC in a half-wave and full-wave rectifier. First, you
must establish some values for the circuit.
41
42
\As you can see from the calculations, by doubling the
frequency of the rectifier, you reduce the impedance of the
capacitor by one-half. This allows the ac component to pass
through the capacitor more easily. As a result, a full-wave
rectifier output is much easier to filter than that of a half-wave
rectifier. Remember, the smaller the X C of the filter capacitor
with respect to the load resistance, the better the filtering action.
Since
43
capacitor, and the lower the average value of output voltage. For
this reason, the simple capacitive filter is seldom used with
rectifier circuits that must supply a relatively large load current.
Using the simple capacitive filter in conjunction with a full-
wave or bridge rectifier provides improved filtering because the
increased ripple frequency decreases the capacitive reactance of
the filter capacitor.
44
[
RELAY
The relay takes advantage of the fact that when electricity flows
through a coil, it becomes an electromagnet. The
electromagnetic coil attracts a steel plate, which is attached to a
switch. So the switch's motion (ON and OFF) is controlled by
the current flowing to the coil, or not, respectively.
45
Internal circuit of Relay
Relays
There are many kind of relays. You can select one according to
your needs. The various things to consider when selecting a
relay are its size, voltage and current capacity of the contact
points, drive voltage, impedance, number of contacts, resistance
of the contacts, etc. The resistance voltage of the contacts is the
maximum voltage that can be conducted at the point of contact
in the switch. When the maximum is exceeded, the contacts will
spark and melt, sometimes fusing together. The relay will fail.
The value is printed on the relay
46
GSM MODEM
A GSM modem is a wireless modem that works with a GSM
wireless network. A wireless modem behaves like a dial-up
modem. The main difference between them is that a dial-up
modem sends and receives data through a fixed telephone line
while a wireless modem sends and receives data through radio
waves. Like a GSM mobile phone, a GSM modem requires a
SIM card from a wireless carrier in order to operate [11].
49
AT&W [Enter] save parameters
50
call and I will hear a lot of noise. Then it becomes quiet and I
see my login prompt or my dialing program tells me the
connection is established. Now I have a connection with the
server from my provider and I can surf the Internet [13].
place the Data bus into reverse direction. Therefore I had wire
51
the R/W line of the LCD panel, into write mode. This will cause
the LCDs internal Busy Flag which tells us if the LCD has
I used a power supply of 5volt. The user may select whether the
4-bit data bus is used, the LCD will require a total of 7 data
lines. If an 8-bit data bus is used, the LCD will require a total of
11 data lines [20]. LCD with 8-bit data bus is used for this
design. The three control lines are EN, RS, and RW. EN line
52
or instruction. In short, I manipulate EN when communicating
53
TESTING AND OBSERVATIONS
this prototype I used only one valid number. With more memory
on the TX and RX lines. What you see below on the left are the
54
Test Result
12345 Please submit your Please submit your thesis
thesis
12345 there will be a There will be a meeting by
meeting by 2pm 2pm
12345 I want to see Mr. I want to see Mr. Musa
Musa
12345 I will not come to I will not come to school
school today today
12345 please enemy alert Please enemy alert
12345 I am in India I am in India
12345 please hurry up Please hurry up
1234 I will be in office in I will be in office in the next
the next 30 minute 30 minute
DCE should have same operational baud rates. Hence to set the
After setting the baud rates of the two devices both the devices
flag is set and the received character is moved into the physical
VALIDITY CHECK
After serially receiving the characters the code then checks for
DISPLAY
After validity check the control flow goes into the LCD program
module.
PROGRAMMER
58
89S52: The AT89S52 is a low-power, high-performance
CMOS 8-bit microcontroller with 8K bytes of in-system
programmable Flash memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is
compatible with the industry-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
AT89S52 is a powerful microcontroller, which provides a highly
flexible and cost-effective solution to many, embedded control
applications. The AT89S52 provides the following standard
features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines,
Watchdog timer, two data pointers, three 16-bit timer/counters, a
six-vector two-level interrupt architecture, a full duplex serial
port, on-chip oscillator, and clock circuitry. In addition, the
AT89S52 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
59
con-tents but freezes the oscillator, disabling all other chip
functions until the next interrupt
60
The hardware is driven by a set of program instructions, or
61
software. Once familiar with hardware and software, the user
can then apply the microcontroller to the problems easily.
The pin diagram of the 8051 shows all of the input/output pins
unique to microcontrollers:
62
The following are some of the capabilities of 8051
microcontroller.
Internal ROM 4k
63
32 input/output pins arranged as four 8 bit
ports: P0-P3
SIMULATOR
64
Vision3 is an IDE (Integrated Development Environment)
that helps write, compile, and debug embedded programs. It
encapsulates the following components:
A project manager.
A make facility.
Tool configuration.
Editor.
65
A powerful debugger.
6. Select Project - Options and set the tool options. Note that
when the target device is selected from the Device
Database all-special options are set automatically. Default
memory model settings are optimal for most applications.
68
and then pause (the current position in the program is indicated
by a yellow arrow to the left of the code).
69
microcontrollers.
CONCLUSION
The prototype of the GSM based display electronic notice board
was efficiently designed. This prototype has facilities to be
70
integrated with a display board thus making it truly mobile. The
toolkit accepts the SMS, stores it, validates it and then displays
it in the LCD module. The SMS is deleted from the phone each
time it is read, thus making room for the next SMS. The major
constraints incorporated are the use of * as the termination
character of the SMS and the display of one SMS as at a time.
These limitations can be removed by the use of higher end
microcontrollers and extended RAM. The prototype can be
implemented using commercial display boards. In this case, it
can solve the problem of instant information transfer in this
campus(federal university of technology MINNA).
5.2 Problem Encountered
During soldering, many of the connection become short
cktd. So we desolder the connection and did soldering
again.
A leg of the crystal oscillator was broken during mounting.
So it has to be replaced.
LED`s get damaged when we switched ON the supply so
we replace it by the new one.
TROUBLESHOOT
71
Care should be taken while soldering. There should be no
shorting of joints.
Proper power supply should maintain.
FUTURE IMPROVEMENT
RECOMMENDATION
REFERENCES
73
7. A. Clark and R. Harun, Assessment of kalman-_lter channel
estimators for an HF radio link," IEE Proceedings, vol. 133,
pp. 513{521, Oct 1986.
74
12. ETR 100. European Digital Cellular Telecommunication
System (Phase 2); Abbreviations and Acronyms. European
Telecommunications Standards Institute. April 1995.
75
18. M. Zimmermann and A. Kirsch, The AN/GSC-
10/KATHRYN variable rate data modem for HF radio," IEEE
Trans. Commun.Techn., vol. CCM{15,16}
20. http://www.mobilegpsonline.com/downloads/GM28-
29%20Datasheet%20R1G.pdf
21. http://www.mobilegpsonline.com/GSMJC01Spec.pdf
22. http://www.visualgsm.com/wire_sms_index.htm
23. http://en.wikipedia.org/wiki/Gsm
76