ablab

Hello Readers, welcome to my Blog - A Blog For Bloggers By A Blogger. I'm Arun, an entrepreneur Blogger from India.

Password Protected BT136 Triac and SIM900 GSM/GPRS Modem based SMS Controlled Wireless Home Automation System with Mobile Number Authentication using ATmega16

467
Mark as Favourite

In this project, we will learn how to make a Password Protected BT136 Triac and SIM900 GSM/GPRS Modem based SMS Controlled Wireless Home Automation System with Mobile Number Authentication using AVR ATmega16 Microcontroller. Here, we will control home appliances i.e 2 bulbs and 2 fans wirelessly using SIM900 GSM/GPRS modem and ATmega16 microcontroller. The home appliances are controlled by sending SMS to the SIM900 GSM/GPRS modem of the Home Automation System and the change in status of the home appliances are displayed in a 16X2 alphanumeric LCD. But before the home appliances can be controlled through SMS by anyone, a password  needs to be sent by SMS to gain access of the home appliance control and SMS received from one particular mobile number are valid and processed by the Home Automation System and others are discarded.

When the SIM900 GSM/GPRS modem power is turned on, the ATmega16 microcontroller reads the initial status data sent by the SIM900 GSM/GPRS modem through USART protocol. After reading the status data, the ATmega16 microcontroller processes the SIM900 GSM/GPRS modem status data and displays the status of the modem and SIM in the alphanumeric LCD. If SIM card is not present, then "Plz Insert SIM" is displayed, if SIM card is present and modem is ready, then "SIM900 is Ready" is displayed and for other conditions, "SIM900 Error" is displayed in the alphanumeric LCD.

Now, when the SIM900 GSM/GPRS modem is ready, the LCD displays "Send Password:" in it. The Home Automation System treats all SMS received as password SMS till the correct password SMS is not received. Once correct password SMS is received and password is authincated, all SMS received after password SMS are treated as control SMS. When the SIM900 GSM/GPRS modem receives any SMS, it sends new SMS notification to the ATmega16 microcontroller. But if the ATmega16 microcontroller receives some other notification(other then SMS like Call and others), then "Unknown Error" is displayed in the alphanumeric LCD. The ATmega16 microcontroller reads the new SMS notification. After reading the SMS notification, ATmega16 microcontroller checks whether password authentication is pending or over. If password authentication is pending, then "PasswordRecieved" is displayed in the LCD display. Then, the ATmega16 microcontroller reads the SMS and if it reads the SMS successfully, then it will compare the mobile number from where SMS is received with the stored mobile number else it will display"Empty location" when the read memory location is empty and "Error" when there is error in reading the SMS. Now, if the mobile numbers matches, then "Valid Number" is displayed in the alphanumeric LCD and the message of the SMS(received password) is compared with set password else "Invalid Number" is displayed in the alphanumeric LCD and SMS is discarded. The mobile number of the received SMS is compared with the stored mobile number each time the Home Automation System receives any SMS and SMS received from valid mobile number are processed by the ATmega16 microcontroller and others are discraded. If the SMS is received from a valid mobile number, then the ATmega16 microcontroller compares the received password with the the stored password and if the received password and the set password are same, then "Correct Password" is displayed in the alphanumeric LCD else "Re-send Password" is displayed in the LCD. The Home Automation System will request user to send password SMS till the correct password is sent. Once correct password is sent, the Home Automation System will request the user to send home appliance control SMS and the LCD displays "Send Ctrl SMS:" in 1st row and "All APPli. OFF  " in the 2nd row(As all the appliances are in off state initially). The Home Automation System waits for the control SMS to turn On/Off the home appliances. The control SMS are predefined sets of strings(Message of SMS). The predefined set of strings(Message of SMS) to control the home appliances are shown below:-

Control SMS Home Appliance Status
A1 ON Bulb 1 On
A1 OFF Bulb 1 Off
A12ON Bulb 2 On
A2 OFF Bulb 2 Off
A3 ON Fan 1 On
A3 OFF Fan 1 Off
A4 ON Fan 2 On
A4 OFF Fan 2 Off
ALL ON All Appliances On
ALL OFF All Appliances Off

When the SIM900 GSM/GPRS modem receives any SMS after password authentication, it sends new SMS notification to the ATmega16 microcontroller. The ATmega16 microcontroller reads the new SMS notification and displays "New Ctrl SMS" in the alphanumeric LCD. But if the ATmega16 microcontroller receives some other notification(other then SMS like Call and others), then "Unknown Error" is displayed in the  alphanumeric LCD.  After receiving new SMS notification, the ATmega16 microcontroller will read the SMS from the SIM900 GSM/GPRS modem memory. If it reads the SMS successfully, then it will compare the mobile number from where SMS is received with the stored mobile number else it will display"Empty location" when the read memory location is empty and "Error" when there is error in reading the SMS. When the control SMS is read successfully, the ATmega16 microcontroller compares the mobile number from where SMS is received with the stored mobile number, if the mobile numbers matches then "Valid Number" is displayed in the alphanumeric LCD and the message of the received control SMS is compared with the predefined ones else "Invalid Number" is displayed in the alphanumeric LCD and SMS is discarded. The mobile number of the received SMS is compared with the stored mobile number each time the robot receives a SMS and SMS received from valid mobile number are processed by the ATmega16 microcontroller and others are discraded. The ATmega16 microcontroller compares the message of the control SMS received from valid mobile number with the predefined ones and if the message of the received control SMS matches with any of the predefined strings, then the microcontroller sends the required control signal to the BT136 Triac driver to turn On/Off the home appliance and it displays the new status of the home appliance in the alphanumeric LCD. But if the received control SMS does not matches with any of the predefined strings, then "Invalid SMS" is displayed in the alphanumeric LCD.

Now, send different SMS to the SIM900 GSM/GPRS modem of the Home Automation System from different mobile number and see the password comparision and change in state of home appliances and its status in the alphanumeric LCD.

Softwares Required

Hardwares Required

Name Quantity
AVR Trainer Board-100 with ATmega16 1pc
AVR USB Programmer 1pc
SIM 900 GSM/GPRS Modem 1pc
RG1602A 16X2 Alphanumeric LCD Green 1pc
Quad Triac Driver 1pc
Home Appliance Board 1pc
12V, 2A SMPS Adaptor 1pc
10 to 10 FRC Female to Female Connector 2pc
1 to 1 Connector-Female to Female 11pc

Circuit Diagram

Video

Downloads

Password Protected BT136 Triac and SIM900 GSM/GPRS Modem based SMS Controlled Wireless Home Automation System with Mobile Number Authentication using ATmega16
  • 0 downloads 0 Kb

Post a Comment