Documente Academic
Documente Profesional
Documente Cultură
abstract
BLOCK DIAGRAM
16X2
LCD
DIGITAL
ENERGY MICRO DRIVER RELAY
METER CONTROLLER IC 2803 OUT PUT
89C52 LOAD
THEFT
GSM
CONTROL
MODEM
Oil level
sensor
POWER Temperatur
SUPPLY e
sensor
SOFTWARES USED:
The GSM with micro controller will be wired to the machine to some sensors like temperature sensor, door
sensor, control and an emergency alarm or the main power switch. Whenever any sensors send an output, the
GSM device will analyze according to what we have programmed and then it sends to the micro controller. The
micro controller will check this command in the database and then sends the required SMS to the owner by
connecting to the GSM modem connected to the micro controller. Or even it makes a call to the required person.
If the person sends any SMS to the particular mobile the micro controller will receive it and then process
according to the command. The main features of this project is that One relay can be made switch off and on a
particular date and time . E.g. If we send the SMS “switch off the gate”, The SMS is sent through the network to
GSM module .The GSM module will receive this SMS and the GSM modem will intimate the micro controller
that it has received a message .The micro controller will send a request command to the modem to send the
message with the sender phone number.
The micro controller will receive this data and first verify the phone number with master (owner) phone
number .if it matches then it will compare the SMS with the stored SMS in the database. When any of the SMS
matches then will see what function has to be carried out, once this SMS is received .If the function is to switch
off the machine then it will switch of the machine .
EXAMPLE:
If some one opens the door forcibly, the device will dial the
owner number or any number stored inside the controller and
will send SMS to the owner.
Think your old parents are inside the house and some robber
has entered the house. There will be panic switches wired in the
house in all rooms. Who ever is inside the house can press the
button, immediately the siren starts on and the device will start
sending the SMS and start calling the numbers.Like this we can
also have a medical emergency switch the device will call the
family doctor and also send an SMS . where we can incorporate
many functions as required.
COMPONENTS USED:
89S52-Atmel
Memory Atmel 24C04 4k EEPROM
LCD-Liquid Crystal Display 2x16
Power Supply Standard Type 5v DC
RS232 for Serial Communication
Buzzer-Iron Make Switch.
GSM modem
Relay / Panic switches.
LPG Gas leakage sensor
Fire sensor
A unique feature of GSM, not found in older analog systems, is the Short Message Service
(SMS). SMS is a bidirectional service for short alphanumeric (up to 160 bytes) messages.
Messages are transported in a store-and-forward fashion. For point-to-point SMS, a message
can be sent to another subscriber to the service, and an acknowledgement of receipt is provided
to the sender. SMS can also be used in a cell-broadcast mode, for sending messages such as
traffic updates or news updates. Messages can also be stored in the SIM card for later retrieval.
Mobile Station:
The mobile station (MS) consists of the mobile equipment (the terminal) and a smart card
called the Subscriber Identity Module (SIM). The SIM provides personal mobility, so that the
user can have access to subscribed services irrespective of a specific terminal. By inserting the
SIM card into another GSM terminal, the user is able to receive calls at that terminal, make
calls from that terminal, and receive other subscribed services.
The Base Station Subsystem is composed of two parts, the Base Transceiver Station
(BTS) and the Base Station Controller (BSC).The Base Transceiver Station houses the radio
tranceivers that define a cell and handles the radio-link protocols with the Mobile Station. In a
large urban area, there will potentially be a large number of BTSs deployed, thus the
requirements for a BTS are ruggedness, reliability, portability, and minimum cost. The Base
Station Controller manages the radio resources for one or more BTSs. It handles radio-channel
setup, frequency hopping, and handovers, as described below. The BSC is the connection
between the mobile station and the Mobile service Switching Center (MSC).
Network Subsystem:
The central component of the Network Subsystem is the Mobile services Switching
Center (MSC). It acts like a normal switching node of the PSTN or ISDN, and additionally
provides all the functionality needed to handle a mobile subscriber, such as registration,
authentication, location updating, handovers, and call routing to a roaming subscriber.
The Home Location Register (HLR) and Visitor Location Register (VLR), together with
the MSC, provide the call-routing and roaming capabilities of GSM. The location of the mobile
is typically in the form of the signaling address of the VLR associated with the mobile station.
The actual routing procedure will be described later. There is logically one HLR per GSM
network, although it may be implemented as a distributed database.
The other two registers are used for authentication and security purposes. The Equipment
Identity Register (EIR) is a database that contains a list of all valid mobile equipment on the
network, where each mobile station is identified by its International Mobile Equipment Identity
(IMEI).
1.7 BENEFITS:
It is possible to automate all the working procedures in the airport and the aircraft like
checking the messages coming from the aircraft and comparing with the stored SMS, if
satisfied micro controller also checks the runway and the weather, whether it is suitable for
landing purposes, then sends back the reply to the pilot. Soon as the aircraft lands automatic
announcement will take place and the conveyor starts rotating automatically along with the
luggages.
PARTS OF THE SYSTEM:
• Micro controller (AT89S52)
• Liquid Crystal Display (Hitachi's HD44780)
• Actuators – Relays
• Devices controlled
Energy meter
2.2.1. MICROCONTROLLER:
In this project we use an 89S52 micro controller, which belongs to the Intel 8051 family
Architecture, it plays an important role and can also be called as ‘heart of our project’ and this
function are controlled by standard AT commands of GSM technology. It contains a ROM
burner to burn program into the microcontroller. ROM burner can erase the flash ROM in
addition to burning a program into it.
START
LCD INITIALIZING
MODE NO
M O
INITI O
ALIZI
NG?
YES
READING SENSOR
STATUS FROM
MEMORY
SENS NO
SMS OR
NO CHECK? ON?
O
YES
O YES
SEND
NO VALID SMS
COMMAND
?
3MIN TIMER
DELAY
YES
DO OPERATION
WITH
CORRESPONDING
COMMAND
CHAPTER 3:
HARDWARE DESCRIPTION AND COMPONENT
SPECIFICATIONS:
3.1.INTERFACING CIRCUIT
FIG 3.1. INTERFACING CIRCUIT
• MICROCONTROLLER :
We are using 89s52 microcontroller, which belongs to the family of ATMEL 8051/52 series,
which is called as mother board from which interfacing of other components is done. Main
components like LCD display, MAX232, relays, sensors and power supplies are interfaced
with the microcontroller.
FEATURES:
• 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
• 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
Description:
WHY 89S52?
1. Meeting the computing needs of the task efficiently and cost effectively
Speed, the amount of ROM and RAM, the number of I/O ports and timers, size,
packaging, power consumption.
Easy to upgrade.
C
T
V1=-
12V
V2=1
2V NO NC
Common terminal
V1=-
12V
V2=1
2V NO NC
When 12V (from voltage regulator) & -12V (from o/p of 2803) is applied to the
coil. Magnetic field is setup around the coil and it acts as temporary magnet. The
switch is pulled towards normally open & electric signal is fed to DTMF coder.
FIG 3.3
ii. WHEN RELAY IS OFF:
FIG 3.4:
Common terminal
V1=-
12V
V2=1 NO NC
2V
When -12 v(from o/p of 2803) is not applied to the coil .Magnetic field is not setup around
the coil and it doesn’t acts as temporary magnet .The switch is pulled towards normally
closed & no electric signal is fed to DTMF coder.
• MAX232 :
RS232 cables are commonly referred as DB25 connector and DB9 connector. When
‘D’ signifies the ’D’ shape of the connector, the ‘B’ indicates the material being used in the
connector and ‘9’ to indicate that it is a 9-pin connector. Generally, most of these DB9
connectors are male type. MAX232 is a Voltage converter from Maxim Corp. The MAX232
converts from RS232 Voltage level to TTL Voltage level and vice versa for connection
between a microcontroller and RS232 cable. They are also known as Line Drivers. One
advantage is that it uses +5V power source for 8052. The MAX232 has two sets of Line
Drivers for transferring and receiving data. The Line Drivers used for TxD are called T1
AND T2 while the Line Drivers for RxD are designated as R1 and R2.
• LCD :
Alphanumeric LCD displays have become very popular for microcontroller
applications because they can add a lot to a project in a variety of ways. A text message
giving the user instructions as well as feed back can make the application seem much more
“professional” and easy to use. I like to use LCD’s to help debug applications, with break
points set to display variable and I/O conditions and they are a lot cheaper using a
microcontroller emulator.
To top it off, surplus LCD’s can be found for a dollar or less. The pin assignment is shown
in the table3.1 is the industry standard for character LCD-modules with a maximum of 80
characters.
TABLE 3.1
and discharging and this is given to oscillator, it amplifies and supply to micro controller.
3.10. VOLTAGE REGULATOR:
FIG.3.21
Some of the components like microcontoller require 5v power supply and some components
like relays need 12v power supply. So voltage regulators are used to regulate the voltage to the
levels as required by the component connected.
CHAPTER 4:
SOFTWARE DESCRIPTION:
delay( 60000 );
Display("DO");
delay( 60000 );
rx_flag=0;
rx_cnt = 0;
#include <AT89X52.H>
#include <string.h>
#define RELAY1 P1_5
#define RELAY2 P1_6
#define BUZZER_1 P2_2
#define BUZZER_2 P1_7
#define INPUT1 P1_3
#define INPUT2 P1_4
unsigned char i, msg_no;
unsigned char ADC_DATA;
unsigned char rx_cnt,recevived;
unsigned char rd_cnt;
unsigned char buf[22];
bit INT_FLAG;
bit INIT_FLAG;
bit MSGRD_FLAG;
bit rx_flag;
bit tx_flag;
bit NEWMSG_FLAG;
bit D1_FLAG;
bit D2_FLAG;
void delay( unsigned int sec )
{
while( sec-- );
}
void send_data( unsigned char t )
{
SBUF = t;
while( tx_flag == 0 );
TI = 0;
delay( 1000 );
}
void Send_String( unsigned char *tr )
{
while( *tr )
{
SBUF = *tr;
while( tx_flag == 0 );
TI = 0;
delay ( 5000 );
tr++;
}
}
#include" LCD.c "
#include" GSM.c "
void Timer1_init( void )
{
TMOD = 0x20; // 8 BIT TIMER1 AUTO RELOAD
SCON = 0x50; // UART MODE
TH1 = 0xFD; // 9600 BAUD RATE
EA = 1; // ENABLE THE
ES = 1;
TR1 = 1;
}
void serial_intr( void ) interrupt 4
{
EA = 0;
ES = 0;
ET0 = 0;
if( TI == 1 )
{
tx_flag = 1;
TI = 0;
}
else if ( RI == 1 )
{
recevived = SBUF;
if( rx_flag == 0 )
{
if( INIT_FLAG == 0 )
{
if( recevived == '+' )
{
INIT_FLAG = 1;
goto END_ISR;
}
Else
{
INIT_FLAG = 0;
if( recevived == 'O' )
{
buf[rx_cnt] = recevived;
rx_cnt++;
}
else if( recevived == 'K' )
{
buf[rx_cnt] = recevived;
rx_cnt++;
buf[rx_cnt] = '\0';
rx_flag = 1;
}
goto END_ISR;
}
if( MSGRD_FLAG == 1 )
{
if( rd_cnt == 60)
{
if( ( recevived != 0x0d )
{
buf[rx_cnt] = recevived;
rx_cnt++;
}
else
{
buf[rx_cnt]='\0';
rx_flag = 1;
INIT_FLAG = 0;
MSGRD_FLAG = 0;
rd_cnt = 0;
}
}
else
{
rd_cnt++;
}
}
else
{
if( ( recevived != 0x0d ) )
{
buf[rx_cnt] = recevived;
rx_cnt++;
}
else
{
buf[rx_cnt]='\0';
rx_flag = 1;
INIT_FLAG = 0;
}
}
}
END_ISR:
RI = 0;
}
ET0 = 1;
EA = 1;
ES = 1;
}
void main()
{
BUZZER_1 = 1;
BUZZER_2 = 0;
RELAY1 = 0;
RELAY2 = 0;
Lcd_init();
delay( 600000 );
Lcd_command( 0x80 );
Display( "smart " );
Lcd_command( 0xC0 );
Display( " house " );
delay( 60000 );
Lcd_data( ' ' );
Lcd_data( ' ' );
Timer1_init();
delay( 1000 );
while( 1 )
{
if( rx_flag == 1 )
Lcd_command( 0x01 );
Lcd_command( 0xC0 );
Display( buffer)
delay( 60000 );
chk_new_msg(); // for finding a message no
read_buf(); // reading data from the buffer
rx_flag = 0;
rx_cnt=0;
Display( "smart " );
Lcd_command( 0xC0 );
Display( " house " );
delay( 500 );
}
if( INPUT1 == 0 )
{
delay( 10000 );
BUZZER_1 = 0;
// Lcd_command( 0x80 );
// Display( "INPUT1" );
PHONE_NO();
Send_String( "HIGH TEMPERATURE " );
send_data( 0x1A );
BUZZER_1 = 1;
}else
if( INPUT2 == 0 )
{
delay( 10000 );
BUZZER_1 = 0;
// Lcd_command( 0x80 );
//Display( "INPUT2" );
PHONE_NO();
Send_String( "lpg gas leaking" ); send_data( 0x1A );
BUZZER_1 = 1;
}
}
4.2. Program for the LCD display:
#define RS P2_1
#define EN P2_0
#define LCD_DATA P0
void Lcd_command( unsigned char cmd )
{
RS = 0;
LCD_DATA = cmd;
EN = 1;
EN = 0;
delay( 500 );
}
void Lcd_data( unsigned char dat )
{
RS = 1;
LCD_DATA = dat;
EN = 1;
EN = 0;
delay( 500 );
}
void Lcd_init( void )
{
Lcd_command( 0x38 );
Lcd_command( 0x01 );
Lcd_command( 0x0C );
}
void Display( unsigned char *str )
{
while( *str )
{
Lcd_data( *str );
str++;
}}
}
}
void chk_new_msg( void )
{
if( ( buf[6] == '"' ) && ( buf[7] == 'S' ) && ( buf[8] == 'M' ) && ( buf[9] == '"' ) )
{
NEWMSG_FLAG = 1;
msg_no = buf[11];
}
else
{
NEWMSG_FLAG = 0;
}
}
void READ_SMS( void )
{
Send_String( "AT+CMGR=");
send_data( msg_no );
send_data( 0x0D );
}
delay( 60000 );
delay( 60000 );
delay( 60000 );
Lcd_command( 0x01 );
Lcd_command( 0x80 );
Display("READING ");
Lcd_data( msg_no );
delay( 60000 );
delay( 60000 );
delay( 60000 );
rx_flag=0;
rx_cnt = 0;
Lcd_command( 0x01 );
Lcd_command( 0x80 );
READ_SMS();
MSGRD_FLAG = 1;
while( rx_flag == 0 );
Lcd_command( 0x01 );
Lcd_command( 0x80 );
Display( buf );
delay( 60000 );
chk_msg();
delay(60000);
delay( 60000 );
del_sms();
delay(60000);
Lcd_command( 0x01 );
Lcd_command( 0x80 );
Display("DELETED:");
Lcd_data( msg_no ); // MESSAGE NO.
delay( 60000 );
Lcd_command( 0x80 );
Display( "smart" );
Lcd_command( 0xC0 );
Display( " house " );
rx_flag=0;
rx_cnt = 0;
}
}
CHAPTER 5:
5.1 ADVANTAGES:
3. Speed is high.
6. Accuracy.
7. No delay.
8. No conversation is required.
10.
5.2 DISADVANTAGE:
The only disadvantage is when the SMS doesn't reach due to some technical disorder, which
may lead to problem.
CHAPTER 6:
6.1. APPLICATIONS:
CHAPTER 7:
CONCLUSION:
The present situation smart house is all using manual communication. To reduce the
manual efforts and human errors, we need to have some kind of automated system
monitoring all the parameters and functioning of the connections between the pilot and the
airport personnel.
We are trying to implement a prototype model of an smart house system within the
limited available source and economy.
The system can be subjected to further development using advanced techniques.
It may become a success if our project can be implemented in the modern air ports.
However a machine is equivalent to 1000 humans input. The same works here.
CHAPTER 8
BIBLIOGRAPHY
REFERENCES:
WEB:
http:\\www.google.co.in
http:\\ www.en.wikipedia.org
http:\\www.techrepublic.com.com
http:\\wwww.amtel.com
http:\\www.zDnet.uk.net
BOOKS:
APPENDIX:
Ex: STX0000DEVICE10
Command 1: DEVICExx
In above command
--> "DEVICE" is mentioning that Devicess
--> "xx" Here 1st "x" for Device number(1,2,3,4)
--> and 2nd "x" for Control of Device(1-ON,0-OFF)
Ex:
--> "DEVICE11" This command will switch ON Device 1
--> "DEVICE40" This command will switch OFF Device 4
Command 2: TIMEONddmmyyhhmm
dd - Date
mm - Month
yy - year
hh - Hours
mm - Minutes
Ex: STX0000TIMEON1502051230
Command 3: TIMEOFddmmyyhhmm
dd - Date
mm - Month
yy - year
hh - Hours
mm - Minutes
Ex: STX0000TIMEON1502051240
Command 4: STATUS
Ex: STX0000STATUS
Command 5: RSTTMEmmhhwwddmmyy
In that one
mm - Minutes
hh - Hours
ww - WeekDay
dd - Date
mm - Month
yy - Year
Ex: STX0000RSTTME301203150205
Command 6: PASWRDxxxx
Command 7: MOBILEyyyyyyyyyyyy
Ex: - MOBILE+919448540935
Memory Details:
Temperature sensor
VCC
5V
K1
R2 R1
10kohm 10kohm
RELAY1A
IN+ VS+
OUT
LM 324
IN-
VS-
R6
TH 1.0ohm
R3
R4 LED1
Key = a 50%
1.0ohm 1K_LIN LED_blue
TEMPERATURE SENSOR
AUTOMATIC GATE SENSOR
IR TRANSMITTER:
Infrared transmitter is used to transmit the IR range light wave form
i.e. for communication. IC 555 is working as a stable multi vibrator
used to generate a frequency in the range of IR Frequency (40 kHz)
and is fed to the transistor BD 140.Pin no 1. The transistor BD140 is
amplifies the IR signal and drive the signal through the IR Diode
Registers are used to provide DC biasing to the IC and transistor.
Capacitor C1 used for triggering pulse to pin no 2 and capacitor C2 is
working as filter and to generate a frequency in the range of IR level
(infrared radiation)
IR RECEIVER:
The above figure shows the block diagram of the IR receiver. In
receiver there are 5 transistors in this circuit. Transistors 1-4 are used
as amplifiers and transistor 5 is used as a driver circuit to drive the
relay and it provides negative voltage to the relay through emitter to
collector.
The receiver IR LED (photo transistor) is placed in the base of
transistor Q1. The received IR signals is amplified at transistor Q1
and out put is taken from collector and given to the base of transistor
Q2. The transistor Q2 is amplified input signal and fed to the base of
transistor Q3 through coupling capacitor Q4 and out put is taken from
collector and fed to the base transistor Q4 through resister R8 and R9
and it is working as a coupler, the out put from collector is given
transistor Q5 through the diode D1.
The diode D1 is providing positive half cycle to the transistors.
The diode D2 used as a polarity diode. The negative voltage is
extended from emitter to collector to the relay. When there is no
input signals the transistor 1-4 are not conducting so transistor Q5
also will not operate so negative voltage extended to the relay. One
end of the relay coil is directly connected to the positive terminal and
the other end is connected to the collector of transistor Q5 that is
providing negative voltage to the relay for activation. When there is
no input signal the transistor Q1 to Q5 are in forward bias and the
transistor Q5 will produce negative voltage from emitter to collector
the and the relay gets activated .
R3
2.2kohm
AC MOTOR /RELAY
R2
BC548
SENSOR
100kohm T1 T2
R1
470kohm
When the over tank water over flow ,the water falls
on the sensor ,the base of transistor T1 is connected to
the positive supply line . As a result ,transistor T1 and
T2 are switched on the relay .when the relay is on
negative voltage is applied to the micro controller pin no
4 the micro controller is send the sms to the concerned
people The current drawn by the circuit in that condition
is .about 25 mA.
PARTS
1 Resistance 470 k
2 Resistance 100 k
3 Resistance 2.2 k
4 Tr. T1,T2 BC 548
5 Buzzer BZ1 Piezo ceramic resonator