H Based
H Based
I. INTRODUCTION
The electrical appliance and instrument have made a profound
impact on the 21st century and the need of controlling them
remotely is an original idea. The appliances can be anything in the
home such as an air conditioner, security system, set top box,
light and so on. The case of remote control capability and the
possibility of achieving it at a reasonably low cost have motivated
the need to research into it not only for industrial application but
also for domestic use.
The objective of this project is to develop a device that allows
for a user to remotely control and monitor multiple home
appliances using a cellular phone. This system will be a powerful
and flexible tool that will offer this service at any time and from
anywhere with the constraints of the technologies being applied.
These days, apart from supporting voice calls a mobile phone
can be used to send text messages. We have used this very
concept to design a system that acts a platform to receive
messages [1] which in fact are commands sent to control different
appliances and devices connected to the central control system
with Atmega 8 as the main controller. We have designed a control
system which is based on the GSM technology that effectively
allows control from a remote area over the appliances which are
Sayantan Dutta
Apurba Ghosh
Department of AEIE,
Department of AEIE,
University Institute of
University Institute of
Technology, University of Technology, University of
Burdwan, Golapbag (North),
Burdwan, Golapbag
Burdwan-713104, India
(North), Burdwan-713104,
Info_sayantan27@rediffmail
India
.co m
[email protected]
om
IEEE International Conference on Automation, Control, Energy and Systems (ACES), Feb 2014
2
5. GSM receiver sends the message to the microcontroller.
GSM modem and ATMEGA8 communicates through a
special command set known as AT COMMAND SET
6. Microcontroller crops the command text part of the SMS
and sends another command to the modem to delete the
current sms so that the next sms can be processed.
7. Microcontroller decodes action required corresponding to
the SMS command by a search and match technique
where a look up table is created with set of command
and corresponding actions.
8. Microcontroller drives the desired relay to control the
target appliance.
IEEE International Conference on Automation, Control, Energy and Systems (ACES), Feb 2014
3
instructions & most single-clock cycle execution. It works with
32 8 general purpose working registers. It has On-chip 2-cycle
multiplier, 8Kbytes of in-system self-programmable flash
program memory.512Bytes EEPROM, 1Kbyte internal SRAM.
D. Communication protocols
RS-232 (recommended standard 232) is an asynchronous
standard for serial binary data communication. In RS232 standard
the logic 0 or space is given by any voltage ranging from +3V to
+25V and logic 1 or mark is given by any voltage from -3V to 25V as shown in Fig. 3.
G. AT command set
Remote control operation of the GSM mobile telephone runs via
a serial interface (data cable of infrared connection), where AT+C
commands according to ETSI GSM 07.07and GSM 07.05
specification as well as several manufacturer specific AT
commands [11] are available. The modem guideline V.25 applies
to the sequence of the interface commands. According to this
guideline, commands should begin with the character string AT
and end with <CR> (= 0x0D). The application of a command is
notified by the display of OK or ERROR.
Some of the commands used in this project are listed in
TABLE I
COMMANDS USED
E. Relay board
Relay board consists of three SPDT relay and a relay driver
ULN2803. ULN 2803, shown in Fig. 4, is a unipolar motor
driver IC with maximum output voltage 50 V and output current
500 mA. It contains eight darlington pair transistors [9], each
having a peak rating of 600 mA and can withstand
50 Vin off-state. Outputs may be paralleled for higher current
capability.
Sl. No.
Commands
Description
AT+CGMI
Issue manufacturer ID
code
AT+CGMM
AT+CSMS
Selection of message
service
AT+CMGR
read SMS
AT+CMGD
AT = attention.
Table I.
H. Experimental setup
The whole experimental setup shown in Fig. 6 includes the
GSM modem as shown in Fig. 6 (a) is connected to the
development board in Fig. 6 (b) consisting of microcontroller
Atmega8, 16 x 2 LCD display and LCD driver acting as serial to
parallel converter. The development board is connected to the
IEEE International Conference on Automation, Control, Energy and Systems (ACES), Feb 2014
4
relay[10] board as shown in Fig. 6 (c) which is connected to the
electric bulb as Fig. 6 (d).
Status of Relay
Users
Command
DEV 1 ON
DEV 2 ON
Relay 2 is ON
DEV 3 ON
Relay 3 is ON
DEV 1 OFF
Relay 1 is OFF
DEV 2 OFF
Relay 2 is OFF
DEV 3 OFF
Relay 3 is OFF
Sl. No.
The circuit diagram for the entire system has is given in Fig 7.
Relay 1 is ON
DEV = Device.
V. CONCLUSION
SMS based remote control for home appliances are beneficial for
the human generation because mobile is mostly used for
communication purposes nowadays. The SMS based remote
control for home appliances is easy to implement to make the
electrical device ON/OFF. In simple automation system where the
internet facilities and even PC are not provided, one can use
mobile phone based control system which is simple and costeffective. In many cases for instance landline phone with
extension card could also be used for the system. In future we are
going to develop the audio or voice [12]-[13] based remote home
and office control system which is beneficial for physically
handicapped persons or blind persons.
ACKNOWLEDGMENT
APPENDIX-I
USART PROGRAMMING:
#include<avr/io.h> //HEADER FILE FOR AVR INPUT
OUTPUT
#include<compat/deprecated.h> //HEADER FILE FOR
FUNCTIONS LIKE SBI AND CBI
#include<util/delay.h>
//HEADER FILE FOR DELAY
#include<stdio.h>
#include <avr/interrupt.h>
void USARTInit(uint16_t ubrr_value);
static int USART_WriteChar(char data);
char USARTReadChar();
char USARTReadChar();
IEEE International Conference on Automation, Control, Energy and Systems (ACES), Feb 2014
5
{
sbi(DDRD,4);
sbi(PORTD,2);
sbi(PORTD,3);
sbi(PORTD,4);
USARTInit(103); /// set the baud rate as 9600 bps ///
LCD_Init(); // SET LCD AS DEFAULT OUTPUT DEVICE
LCD_Home();
LCD_Clrscr();
for(count=0;count<200;count++)
{
ch[count]=32;
}
printf("SMS based Control..\nInitializing..");
_delay_ms(5000);
USART_WriteChar('A');
USART_WriteChar('T');
USART_WriteChar('+');
USART_WriteChar('C');
USART_WriteChar('G');
USART_WriteChar('M');
USART_WriteChar('I');
USART_WriteChar('\n');
while(USARTReadChar()!='\n');
{
LCD_Clrscr();
LCD_Home();
// stdout = &uart_out;
}
Main program:
#include<avr/io.h> //HEADER FILE FOR AVR INPUT
OUTPUT
#include<compat/deprecated.h> //HEADER FILE FOR
FUNCTIONS LIKE SBI AND CBI
#include<util/delay.h>
//HEADER FILE FOR DELAY
#include<stdio.h>
#include <avr/interrupt.h>
#include"uart.h"
#include"lcd.h"
int main(void)
{
uint8_t count,temp1=0,temp2=0, temp3=0, temp4=0, len;
char ch[200];
sbi(DDRD,2);
sbi(DDRD,3);
{
LCD_Clrscr();
LCD_Home();
printf("** New Message **\n");
printf(ch);
}
while(1)
{
_delay_ms(200);
USART_WriteChar('A');
IEEE International Conference on Automation, Control, Energy and Systems (ACES), Feb 2014
6
USART_WriteChar('T');
USART_WriteChar('+');
USART_WriteChar('C');
USART_WriteChar('M');
USART_WriteChar('G');
USART_WriteChar('R');
USART_WriteChar('=');
USART_WriteChar('1');
USART_WriteChar('\n');
while(USARTReadChar()!='\n');
USART_WriteChar('=');
USART_WriteChar('1');
USART_WriteChar('\n');
}
break;
delay_ms(300);
}
return(0);
}
{
_delay_ms(2000);
LCD_Clrscr();
LCD_Home();
if(ch[0]=='D' && ch[1]=='E' && ch[2]=='V')
{
if(ch[4]=='1' && ch[7]=='N')
{
cbi(PORTD,3);
printf("Device 1 is ON");
}
if(ch[4]=='1' && ch[7]=='F')
{
sbi(PORTD,3);
printf("Device 1 is OFF");
}
if(ch[4]=='2' && ch[7]=='N')
{
cbi(PORTD,2);
printf("Device 2 is ON");
}
if(ch[4]=='2' && ch[7]=='F')
{
sbi(PORTD,2);
printf("Device 2 is OFF");
}
if(ch[4]=='3' && ch[7]=='N')
{
cbi(PORTD,4);
printf("Device 3 is ON");
}
if(ch[4]=='3' && ch[7]=='F')
{
sbi(PORTD,4);
printf("Device 3 is OFF");
}
else
{
printf("Unknown Message");
}
USART_WriteChar('A');
USART_WriteChar('T');
USART_WriteChar('+');
USART_WriteChar('C');
USART_WriteChar('M');
USART_WriteChar('G');
USART_WriteChar('D');
REFERENCES
[1] Amit Chauhan,Reecha Ranjan Singh, Sangeeta Agrawal , Saurabh Kapoor,
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]