GSM Based Sms Automation
GSM Based Sms Automation
Introduction
Our main idea of making this project comes from building a cheap remote control which can able to
control devices which can be located anywhere in the world. Project aims to develop a low cost
automation module which can be imployed in differnet industries and organisation, which includes
connectivity of loads and sensors. With a lot of search and experimentation , we came across sms
(short messanging service) which can be able to solve the purpose in a very convienent way. Since it
requires a GSM service we are going to use a GSM modem as a communicating device for sending and
recieving SMS. SMS communication is chosen just because of cost effective ness and providers
services for Mulitple SMS packs which reduce 0.20RS per sms cost which is afforadable to every
consumer needs.
With this circuit we can control up to 8 devices (4 devices in our example project), by
sending a specific SMS message with any mobile phone. Its very usefull in the cases where there is no
means of communication that, at the place we have the devices, we have not a wired telephone line.
GSM Based Device Control
A Project Report on
By,
Introduction:
The advances in the technologies related to wireless communication has led to the
emergence of several engineering designs to aid the human requirements. As we all know
Agriculture play a significant role in developing country like India and implementing
mobile communication for facilitating farmers is the basic idea of our project. Thus with
the creeping interests in the wireless and GSM based projects, we came up with this idea
of developing a simpler, multipurpose, cost-effective design to control the on-off
mechanism of various devices in the field via short message service (sms).
Commands are sent to Motor Starter for irrigation in Agricultural Applications system
through user’ mobile as data through SMS (Short Service Messages) providing a cost
effective, reliable far reaching access to the user. The coded SMS is sent to the Motor
Starter for irrigation in Agricultural Applications base station controller that receives the
messages, decodes the messages, initiates required automation operations and responds to
the successful initiations by a reply to the user.
Abstract:
Our project is based on “GSM technology” used for long distant communication. The
design portion involves mainly a GSM modem and a control circuitry with
microcontroller and Max232N etc…
For doing this project we use some of the software like Embedded C for programming
the application software to the microcontroller. Protel schematic software is used for
designing the circuit diagram for this project. Express PCB software is used for
designing the PCB for this project. (Since PCB making is a big process and involves lot
of machineries, which are expensive, we are going to outsource this to the manufacturer.)
This project is now developed by us as a multipurpose project which can be used for
controlling of lights and other electronic devices in home, offices etc. and for various
time saving and manual effort preserving tasks that can be accomplished via sms.
Components used:
Power supply: The microcontroller and other devices get power supply from AC to Dc
adapter through 7805, 5 volts regulator. The adapter output voltage will be 12V DC non-
regulated. The 7805/7812 voltage regulators are used to convert 12 V to 5V/12V DC.
RS 232 CONVERTER (MAX 232N) Serial Port: This is the device, which is used to
convert TTL/RS232 vice versa. RS-232 pin-outs for IBM compatible computers are
shown below. There are two configurations that are typically used: one for a 9-pin
connector and the other for a 25-pin connector.
The standard voltage range on RS-232 pins is _15V to +15V. This voltage range applies
to all RS-232 signal pins. The total voltage swing during signal transmission can be as
large as 30V. In many cases, RS-232 ports will operate with voltages as low as _5V to
+5V. This wide range of voltages allows for better compatibility between different types
of equipment and allows greater noise margin to avoid interference. Because the voltage
swing on RS-232 lines is so large, the RS-232 signal lines generate a significant amount
of electrical noise. It is important that this signal does not run close to high impedance
microphone lines or audio lines in a system. In cases where you must run these types of
signals nearby one another, it is important to make sure that all audio wires are properly
shielded. The main role of the RS232 chip is to convert the data coming for the 12-volt
logic to 5 volt logic and from 5 volt logic to 12 volt logic
LED Status Indicator The LED will indicate different status of the modem: - OFF
Modem Switched off - ON Modem is connecting to the network - Flashing Slowly
Modem is in idle mode Flashing rapidly Modem is in transmission/communication (GSM
only)
In application, controlling device controls the GSM engine by sending AT Command via
its serial interface. The controlling device at the other end of the serial line is referred to
as following term: 1) TE (Terminal Equipment); 2) DTE (Data Terminal Equipment)
AT Command syntax The "AT" or "at" prefix must be set at the beginning of each
command line. To terminate a command line enter <CR>. Commands are usually
followed by a response that includes.”<CR><LF><response><CR><LF>”
Test command AT+<x>=? The mobile equipment returns the list of parameters and value
ranges set with the corresponding Write command or by internal processes. Read
command AT+<x>? This command returns the currently set value of the parameter or
parameters. Write command AT+<x>=<…> This command sets the user-definable
parameter values. Execution command AT+<x> The execution command reads non-
variable parameters affected by internal processes in the GSM engine
Flow control is very important for correct communication between the GSM engine and
DTE. For in the case such as a data or fax call, the sending device is transferring data
faster than the receiving side is ready to accept. When the receiving buffer reaches its
capacity, the receiving device should be capable to cause the sending device to pause
until it catches up. There are basically two approaches to achieve data flow control:
software flow control and hardware flow control. SIM300 support both two kinds of flow
control.
Applications
With this circuit one can switch-ON , OFF or Restart some Linux servers, ADSL modems, Printers,
Door with electric lock, Garage door, House lights, Water
pumps, electric sunshade, Block the engine of your car or your motorcycle, at the steal case and
much more. The purpose of this circuit is to make the human life better and easier.
Block Diagram
Micro
Relay Appliances
GSM Controller Unit
Modem
Unit
Sensor
The hardware of the circuit, is the communication port of gsm modem its working at the 5 volts with
AT commands ( like the modem commands, but for mobile phones).
The firmware of the Avr microcontroller is complicated because, we have to compare the arrived sms
string with the stored commands in microcontroller.All this proccess its necessary to decode the
message from SMS.
GSM Modem
This GSM modem is a highly flexible plug and play quad band GSM modem for direct and easy
integration to RS232. Supports features like Voice, Data/Fax, SMS,GPRS and integrated TCP/IP
stack.
Features
Quad Band GSM/GPRS
850/900/1800/1900 Mhz
o Class 4 (2W@850/900Mhz)
o Class 1(1W@1800/1900Mhz)
Power Supply
Use AC – DC Power Adaptor with following ratings
DC Current : 1A
Polarity : Centre +ve & Outside –ve
Current Consumption in normal operation 250mA, can rise up to 1Amp while transmission.
Interfaces
RS-232 through D-TYPE 9 pin connector, Serial port baud rate adjustable 1200 to115200
►RS-232 Basics
RS-232 (Recommended Standard 232) is a standard for serial binary
data signals connecting between a DTE (Data terminal equipment) and a
DCE (Data Circuit-terminating Equipment).
Voltage Levels:
The RS-232 standard defines the voltage levels that correspond to
logical one and logical zero levels. Valid signals are plus or minus 3 to 25
volts. The range near zero volts is not a valid RS-232 level; logic one is
defined as a negative voltage, the signal condition is called marking, and
has the functional significance of OFF. Logic zero is positive, the signal
condition is spacing, and has the function ON.
So a Logic Zero represented as +3V to +25V and Logic One represented
as -3V to -25V.
►RS-232 Level Converters
Usually all the digial ICs works on TTL or CMOS voltage levels which
cannot be used to communicate over RS-232 protocol. So a voltage or
level converter is needed which can convert TTL to RS232 and RS232 to
TTL voltage levels.
The most commonly used RS-232 level converter is MAX232. This IC
includes charge pump which can generate RS232 voltage levels (-10V
and +10V) from 5V power supply. It also includes two receiver and two
transmitters and is capable of full-duplex UART/USART communication.
Once The AT commands is given’ >’ prompt will be displayed on the screen.
Type the message to sent via SMS. After this, press ctrl+Z to send the SMS.
If the SMS sending is successful, “ok” will be displayed along with the message
number.
For reading SMS in the text mode:
AT+CMGR= no.
Number (no.) is the message index number stored in the sim card. For new SMS,
URC will be received
on the screen as +CMTI: SM ‘no’. Use this number in the AT+CMGR number to read
the message.