Vous êtes sur la page 1sur 26

CHAPTER 1

INTRODUCTION

Wireless communication has announced its arrival on big stage and the world is going
mobile. We want to control everything and without moving an inch. The use of “Embedded
System in Communication” has given rise to many interesting applications that ensures
comfort and safety to human life. One of such applications is public addressing system
(PAS). In this technical paper explains how a reliable and an authentic wireless
communication could be easily developed between a mobile phone and microcontroller
using GSM (Global System for Mobile Communication) MODEM.
The information sharing aspect of Information Technology is playing a prominent role in all
kind of business either it’s a NPO or Profit organization. All kind of business requires and
adopts the facility of advertisement to promote their services and products. Information
technology makes the advertisement methods more technical and effective as it is easy to
transmit and share information.

Now in Technology world, everything is going to be Digital. Advertisement is also one of the
parts of that. In this competition days, Advertisement is also very important thing to attract
the customers. Thus big shops and shopping malls use digital moving display for
advertisement. Even on public places like railway stations, airport, bus stand are using
digital moving display for everything like platform number, ticket information etc. but in
those applications we want to change so have to go there and connect the display to PC or
laptop. Suppose same message if the person wants to display in main centers of city so the
person has to go there and it is also time consuming. I.e. Police wants to display about some
crucial information within 5 minutes so it will not be possible so keeping this in mind we can
design a display which can access remotely. Using of GSM technology to access the display
is new technology to make communication between mobile and microcontroller.

1
Now a day’s GSM (Global System for Mobile Communications) is the most famous mobile
platform. It has lots of salient features. With use of microcontroller, GSM Modem is very
useful to make many innovative applications like GSM Based Home Security System, GSM
Based DC Motor Control, GSM Based Robot Control etc. It has many advantages like very
high uptime with compared to Landline, multiple data collection points, large transaction in
short period. Use of GSM technology makes the application wireless and so it saves a huge
amount of cost of cabling.
LED (Light Emitting Diode) Dot – Matrix Display is widely used in advertising, traffic light
and in many more display applications. It has more brightness than LCD and it is has very
low cost. It is also easily available and low power consuming. The different patterns like
scrolling the message etc. generated in LED Dot - Matrix attracts the customers. Its one
advantage is that by making different patterns we can display the message in many
languages like English, Spanish, French, Hindi, Gujarati etc. It comes in different sizes like
128*16 (Two Lined), 128*32 (Four Lined), 128*64 (Eight Lined) but most common size of Dot
Matrix Display is 5*7. If we want to display graphical image or any graphical data so we can
use 128*16 graphical LCD. A 5*7 LED electronic display.
Digital Advertisement is the current requirement of the modern business & Information
world. Scrolling LED dot-matrix display boards are used at International Airports, Stock
Exchanges, Metro rail stations, shopping complex etc., LED display is an effective mode of
displaying information but the complicated task is to make the messages dynamic as the user
have to change the message content according to the specific requirements. In case of
changing the message content the user have to connect the LED board with the computer, so
that the display board cannot be placed anywhere because of dedicated & complex wiring
pattern. The information sharing aspect of Information Technology is playing a prominent
role in all kind of business either it’s a NPO or Profit organization.

All kind of business requires and adopts the facility of advertisement to promote their
services and products. Information technology makes the advertisement methods more

2
technical and effective as it is easy to transmit and share information. Digital Advertisement
is the current requirement of the modern business & Information world.
The led Display System is aimed at the colleges and universities for displaying day-to-day
information continuously or at regular intervals during the working hours. Being GSM-
based system, it offers flexibility to display flash news or announcements faster than the
programmable system. GSM-based display system can also be used at other public places
like schools, hospitals, railway stations, gardens etc. without affecting the surrounding
environment.
The project is an implementation to the idea of the wireless communication between a
mobile phone and a display board. This model combines the advantages of the
microcontroller and wireless technology, to build an effective and accurate communication
system. The prototype model developed uses the following major components.
GSM modem-SIM300
Microcontroller
MAX-232 level convertor.
5X7 led dot matrix
Shift Register.
LED Driver
Current limiting Resistors- 220 ohm.
The administrator (user) uses a simple GSM based handset for sending messages to display
board. The GSM modem used at the receiver end is used to receive the messages. The sent
message is stored in the SIM of the modem. By issuing proper AT commands, it is read from
the modem and stored in the microcontroller. In order to reduce the current required for the
module and to simplify the hardware and wiring necessary to drive the LEDs this design
uses Multiplexing. In this technique, at the max only 30 LED’s are glowing at any one time
and hence power required for display module is reduced.
The led display board accommodates 5x7 led dot matrix displays with a distance between
the rows of pins of 50mm (50mm character height). Six such display matrixes are used to
form a 30x7 display area (30 columns, 7 rows). The preprogrammed controller is supplied

3
with the standard character set containing alphabets, but there is also the possibility to
program punctuation marks, symbols, numbers and special characters and implement
simple graphics. For each character a display pattern in the form of HEX values is stored
inside the microcontroller which is termed as look up table. The microcontroller looks for the
pattern and sends out the data bits serially and clock signal. This data is shifted by the shift
registers. The data is sent on columns and rows are scanned fast which allows the pattern to
be displayed because of persistence of vision. The row driver IC is used to source current for
LED rows (anodes).

This project is a Message Electronic Display Board which displays the messages received as
SMS. Only authorized person can send flash information from Mobiles to displays for instant
viewing. Displays are designed to quickly display the information in the light emitting diode
matrix display.

1.1 METHODOLOGY

 User wants to display a message

 User sends the message in his mobile defining the messages and then the password of
the system to the number of the subscriber identity module (SIM) which is inserted in
the display system MODEM

 The GSM modem receives the SMS. The AT commands are serially transferred to the
modem through MAX232

 The microcontroller will read the message from serial headphone and verify for the
password, if the password is correct then it will start displaying the messages in the
display system.

4
1.2 BLOCK DIAGRAM:

Fig: 1.2.1 Block diagram

Fig: 1.2.2 Simple block diagram

5
1.3 KEY OBJECTIVES

 Programming of the mobile phone with AT (Attention) command sequence

 Interfacing the programming chip with the personal computer

 Interfacing the programmable chip with the electronic board display

 Interfacing of the mobile phone with the programmable chip

 Sending messages from the remote phone to the electronic board.

1.4 BASIC CONCEPTS AND WORKING

The main aim to design SMS driven automatic electronic display is to replace the
programmable electronic display and to save time. It is proposed to design receiver cum
display board which can be programmed from an authorized mobile phone. The message to
be displayed is sent through a SMS from an authorized transmitter. The microcontroller
receives the SMS, validates the sending Mobile Identification Number (MIN) and displays
the desired information. The electronics displays which are currently used are
programmable displays which need to be reprogrammed each time. This makes it inefficient
for immediate information transfer, and thus the display board loses its importance. The
GSM based display board can be used as an add-on to these display boards and make it truly
wireless. The display board programs itself with the help of the incoming SMS with proper
validation. Such a system proves to be helpful for immediate information transfer.
Here in Advertising Display system Mobile is used as Transmitter which transmits SMS and
from GSM Modem to LED Display Panel is used as Receiver. There are different components
like GSM Modem, RS232, External Memory, Buzzer, Power Supply, LED Driver Circuits,
LED Dot Matrix Display are being used. The Block Diagram of GSM Based Advertising
display system is shown in Figure 2. System will work like when the user wants to display or
update the notice board, the user has to send the message in his mobile defining the
messages and then the password of the system to the number of the SIM which is inserted in
the display system MODEM. Then the MODEM connected to the display system will receive

6
the SMS, the microcontroller inside the system is programmed in such a way that when the
modem receives any message the microcontroller will read the message form serial port.The
AT commands are serially transferred to the modem through RS 232 and verify for the
password, if the pass word is correct then it will start displaying the messages in the display
system.

Fig: 1.4.1 Working diagram

7
CHAPTER-2

COMPONENTS DETAILS

2.1 Power Supply

In our application we need a 5V DC power supply for all electronics involved in the project.
This requires step down transformer, rectifier, filter and voltage Regulator (7805) circuit for
generation of 5V DC power. A Transformer is used to step-up or step-down (usually to step-
down) the-supply voltage as per need of the solid-state electronic devices and circuits to be
supplied by the DC power supply. A Rectifier is a device which converts the sinusoidal AC
voltage into either positive or negative pulsating DC but it is unregulated. To reduce AC
components (harmonics) from the rectifier output voltage a filter circuit is required. Voltage
Regulator’s main function is to maintain a constant DC output voltage.

2.2 8-BIT MICROCONTROLLER WITH 8K BYTES IN-SYSTEM


PROGRAMMABLE FLASH AT89S52

2.2.1 FEATURES

 Compatible with MCS®-51Products

 8K Bytes of In-System Programmable (ISP) Flash Memory – Endurance: 1000


Write/Erase Cycles

 4.0V to 5.5V Operating Range

 Fully Static Operation: 0 Hz to 33 MHz

 Three-level Program Memory Lock

 256 x 8-bit Internal RAM

 32 Programmable I/O Lines

 Three 16-bit Timer/Counters

 Eight Interrupt Sources

8
 Full Duplex UART Serial Channel

 Low-power Idle and Power-down Modes

 Interrupt Recovery from Power-down Mode

 Watchdog Timer

 Dual Data Pointer

 Power-off Flag

 Fast Programming Time

 Flexible ISP Programming (Byte and Page Mode)

 Green (Pb/Halide-free) Packaging Option

2.2.2 DESCRIPTION

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 Atmel’s 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 programmer. 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 contents but freezes the oscillator, disabling all other chip
functions until the next interrupt or hardware reset.

9
2.2.3 PIN CONFIGURATION AND DESCRIPTION Of AT89S52
.

Pin Number Description


1–8 P1.0 - P1.7 - Port 1
9 RST – Reset
10 – 17 P3.0 - P3.7 - Port 3
18 XTAL2 – Crystal
19 XTAL1 – Crystal
20 GND – Ground
21 – 28 P2.0 - P2.7 - Port 2
29 PSEN - Program Store Enable
30 ALE - Address Latch Enable
31 EA - External Access Enable
32 – 39 P0.7 - P0.1 - Port 0

10
40 Vcc - Positive Power Supply

Table no.2.1 Pin configuration of AT89S52

P
Fig: 2.1 Block diagram of AT89S52

i) Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin
can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
used as high-impedance inputs.

Port 0 can also be configured to be the multiplexed low-order address/data bus

11
during accesses to external program and data memory. In this mode, P0 has internal
pull-ups. Port 0 also receives the code bytes during Flash programming and outputs
the code bytes during program verification. External pull-ups are required during
program verification.
ii) Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port 1
pins, they are pulled high by the internal pull-ups and can be used as inputs.
As inputs, Port 1 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups.

In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external


count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX),
respectively, as shown in the following table. Port 1 also receives the low-order
address bytes during Flash programming and verification.

Port Pin Alternate Functions

P1.0 T2 (external count input to Timer/Counter 2), clock-out

P1.1 T2EX (Timer/Counter 2 capture/reload trigger and direction


control)

P1.5 MOSI (used for In-System Programming)

P1.6 MISO (used for In-System Programming)

P1.7 SCK (used for In-System Programming)

iii) Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3
output buffers can sink/source four TTL inputs. When 1s are written to Port 3
pins, they are pulled high by the internal pull-ups and can be used as inputs.
As inputs, Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups.

12
Port 3 receives some control signals for Flash programming and verification.

Port 3 also serves the functions of various special features of the AT89S52, as shown in
the following table.

Port Pin Alternate Functions

P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0 (external interrupt 0)

P3.3 INT1 (external interrupt 1)

P3.4 T0 (timer 0 external input)

P3.5 T1 (timer 1 external input)

P3.6 WR (external data memory write strobe)

P3.7 RD (external data memory read strobe)

iv) RST

Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device. This pin drives high for 98 oscillator periods after the Watchdog
times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this
feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.

Address Latch Enable (ALE) is an output pulse for latching the low byte of the
address during accesses to external memory. This pin is also the program pulse input
(PROG) during Flash programming.

In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency
and may be used for external timing or clocking purposes. Note, however, that one
ALE pulse is skipped during each access to external data memory.

If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With

13
the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the
pin is weakly pulled high. Setting the ALE-disable bit has no effect if the
microcontroller is in external execution mode.

v) External Access Enable.


EA must be strapped to GND in order to enable the device to fetch code from
external program memory locations starting at 0000H up to FFFFH. Note, however,
that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be
strapped to VCC for internal program executions. This pin also receives the 12-volt

programming enable voltage (VPP) during Flash programming.

vi) XTAL 1

Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
vii) XTAL 2

Output from the inverting oscillator amplifier.

14
CHAPTER 3

COMPONENTS

3.1 GSM MODEM

GSM Modem can accept any GSM network operator SIM card and act just like a mobile
phone with its own unique phone number. Advantage of using this modem will be that you
can use its RS232 port to communicate and develop embedded applications.

The modem can either be connected to PC serial port directly or to any microcontroller. It
can be used to send and receive SMS or make/receive voice calls.

It can also be used in GPRS mode to connect to internet and do many applications for data
logging and control.

This GSM modem is a highly flexible plug and play quad band GSM modem for direct and
easy integration to RS232 applications.

Fig. 3.1 GSM Modem

15
Fig: 3.2 GSM SIM Modem

3.2 GSM Sim 900A

GSM/GPRS Modem-RS232 is built with


Dual Band GSM/GPRS engine- SIM900A,
works on frequencies 900/ 1800 MHz. The
Modem is coming with RS232 interface,
which allows you connect PC as well as
microcontroller with RS232 Chip

16
(MAX232). The baud rate is configurable from 9600-115200 through AT command. The
GSM/GPRS Modem is having internal TCP/IP stack to enable you to connect with internet
via GPRS. It is suitable for SMS, Voice as well as DATA transfer application in M2M
interface. The onboard Regulated Power supply allows you to connect wide range
unregulated power supply . Using this modem, you can make audio calls, SMS, Read SMS,
attend the incoming calls and internet ect through simple AT commands.

3.2.1 FEATURES

 Dual band GSM/GPRS 900/1800MHz.

 Configurable baud rate.

 SIM card holder.

 Built in network status LED.

 Inbuilt powerful TCP/IP protocol stack for internet data transfer over GPRS.

3.2.2 APPLICATIONS

 Access control devices.

 Supply chain management.

3.2.3 SPECIFICATIONS

Parameter Value
Operating voltage +12v DC
Weight <140g

17
3.2.4 PIN SPECIFICATION

Pin Name Details


1 GND Power supply ground
2 Tx Transmitter
3 Rx Receiver
4 Line_r & Line_l Line input
5 Spk_p & spk_n Speaker positive & negative

6 Mic_p & mic_n Mic positive & negative


7 DTR Data terminal ready
8 CTS Clear to send
9 RTS Request to send

3.2.5 WORKING

Unlike mobile phones, a GSM modem doesn’t have a keypad and display to interact with. It
just accepts certain commands through a serial interface and acknowledges for those. These
commands are called as AT commands. There are a list of AT commands to instruct the
modem to perform its functions. Every command starts with "AT". That’s why they are
called as AT commands. AT stands for attention.

In our simple project, the program waits for the mobile number to be entered through the
keyboard. When a ten digit mobile number is provided, the program instructs the modem to
send the text message using a sequence of AT commands.

3.2.6 TESTING YOUR GSM MODEM

The GSM modem can be tested by connecting it with a PC. The modem is equipped with a
RS232 cable. Just use a Serial to USB converter and connect it with the PC.

18
Now you can proceed with sending the commands to the modem using any serial
communication program like Hyperterminal, minicom etc. Ensure the serial parameters are
configured to 8N1 and the baudrate is set to 9600bps.

For each command you send the modem acknowledges with a message. Example: Just try
sending "AT" to the modem. It sends back a result code "OK" which states at the modem is
responding. If it’s not working fine, it sends "ERROR".

3.3 SIM900 GSM Modem Starter Guide

Features:

a. Uses the extremely popular SIM900 GSM module

b. Provides the industry standard serial RS232 interface for easy connection to computers
and other devices

c. Provides serial TTL interface for easy and direct interface to microcontrollers

d. Optionally available USB interface for easy interface to laptops, computers, etc

e. Onboard MIC and Speaker circuits and 3.5mm audio connectors for direct connection
to mics and speakers

f. All pins of the SIM900 module can be tapped into for expansion using onboard
expansion holes. GPIO pins, Serial communication pins, 2 PWM pins, I2C pins and
ADC pins are broken out to standard 0.1” spaced holes for easy expansion

19
g. Power, Status and Network LEDs for easy debugging

h. Can be used for GSM based Voice communications, Data/Fax, SMS,GPRS and TCP/IP
stack

3.3.1 TESTING THE BOARD

 Insert a SIM card into the SIM tray on the board

 Connect the board to a computer’s serial port using a RS232 cable

 To read the text being sent by the modem, you will need a serial monitoring software.
Windows has a built in serial monitoring software called Hyperterminal. Run it at Start
- > Programs -> Accessories -> Communications -> Hyperterminal

 Enter connection name,

 Select the serial port to which the modem is connected under the “Connect Using“
option(usually COM1)

 Select Baudrate of 9600 and Flow control as none. The board works on a serial
communication that can work within a wide range of speeds from 1200 bps to 1152000
bps,

 You will have to send character ‘A’ (uppercase A) initially before you send any
other command to the modem

20
 Enter “AT” in the Hyperterminal, the board will echo “OK” if everything is
properly setup

 The onboard Net LED is used to display the network status

a) LED Off – SIM900 not running

b) 64ms On 0.8 Sec Off - SIM900 unable to find network

c) 64ms On 3 Sec Off - SIM900 found network

d) 64ms On/ 300ms Off GPRS communication 

3.3.2 USING THE BOARD

You will have to use standard AT commands to interface with the modem. Here are some
of the common GSM operations that can be achieved using the board -

a) To Dial a Number

 To dial a number you will have to send the command -> ATD
NUM; where NUM is the number you want to dial.

 For instance to dial 9008620582, send the command ATD 9008620852;

 To disconnect the number use the command – ATH

 To redial a number use the command – ATDL

21
b) To Send a SMS

 To send SMS send the command -> AT+CMGF=1 Modem will then send the text ->
OK

 Then send -> AT+CMGS="NUM" where NUM is the number you want to send the
SMS to. Modem will then send the text - TYPE THE MESSAGE> Enter the message
and then press ctrl+z to send SMS.

Here are a few useful AT commands for changing the settings –


 To change the baudrate – AT+IPR=BAUDRATE(Ex 9600)
 For more details refer AT commands Document page 33
 To save the settings – AT&W

 To restore factory defaults type AT&F then save it by sending AT&W

3.3.3 Using the PWR Key

The Power Key (labeled PWR KEY on the modem) can be used to power on and off the
module just by a holding it down for a second. Putting the module in power down mode
will drastically reduce the modems power consumption. Pressing the Power Key when the
module is off, will power on the module and vice-versa. Please refer the SIM900 datasheet
for more information.
When the modem is powered on the module will be in power off mode by default. You will
have to press and hold the PWR Key for a second to put it in power on mode to start using
the modem to make calls, send messages, etc.
If you want to put the module in power on mode automatically every time the modem is
powered on, you will have to put the jumper named Power Key Disable next to the PWR
Key.

22
23
24
25
26

Vous aimerez peut-être aussi