ablab

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

Password Protected SIM900 GSM/GPRS Modem based SMS Controlled Wireless Robot with Mobile Number Authentication, Auto and Status Reply using ATmega32

634
Mark as Favourite

In this project, we will learn how to make a Password Protected SIM900 GSM/GPRS Modem based SMS Controlled Wireless Robot with Mobile Number Authentication, Auto and Status Reply using AVR ATmega32 Microcontroller. Here, we will control the direction of movement of a robot wirelessly using SIM900 GSM/GPRS modem and ATmega32 microcontroller. The robot is controlled by sending SMS to the SIM900 GSM/GPRS modem of the robot and the direction of the movement of the robot is displayed in a 16X2 alphanumeric LCD. And if the received SMS is processed successfully, then the robot sends a reply SMS bearing its current direction of movement as message through its SIM900 GSM/GPRS modem to notify the user that the last SMS has been successfully processed. Apart from robot control and auto reply SMS, the current status(direction of movement) of the robot can also be inquired at any instant of time by sending a predefined SMS to the SIM900 GSM/GPRS modem of the robot. But before the robot can be controlled through SMS by anyone and auto & status reply SMS can be sent, a password  needs to be sent by SMS to gain access of the robot control and SMS received from one particular mobile number are valid and processed by the robot and others are discarded.

When the SIM900 GSM/GPRS modem power is turned on, the ATmega32 microcontroller reads the initial status data sent by the SIM900 GSM/GPRS modem through USART protocol. After reading the status data, the ATmega32 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 robot 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 ATmega32 microcontroller. But if the ATmega32 microcontroller receives some other notification(other then SMS like Call and others), then "Unknown Error" is displayed in the alphanumeric LCD. The ATmega32 microcontroller reads the new SMS notification. After reading the SMS notification, ATmega32 microcontroller checks whether password authentication is pending or over. If password authentication is pending, then "PasswordRecieved" is displayed in the LCD display. Then, the ATmega32 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, SMS is discarded and one reply SMS bearing "Invalid Number" as message is sent to the mobile number from where control SMS is received. The mobile number of the received SMS is compared with the stored mobile number each time the robot receives any SMS and SMS received from valid mobile number are processed by the ATmega32 microcontroller and others are discraded with a reply SMS bearing "Invalid Number" as message. If the SMS is received from a valid mobile number, then the ATmega32 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. Apart from display in LCD, the status of the password comparision is sent as SMS(Correct Password or Wrong Password) to the mobile number from which the password SMS is received. The robot will request user to send password SMS till the correct password is sent.  Once correct password is sent, the robot will request the user to send robot control SMS and the LCD displays "Send Ctrl SMS:" in 1st row and "Stopped" in the 2nd row(As the robot is in stopped condition initially). The robot waits for the control SMS to drive the robot in different direction. The control SMS are predefined sets of strings(Message of SMS). The predefined set of strings(Message of SMS) to control the Robot are shown below:-

Control SMS Robot Movement
FORWARD Forwar Direction
BACKWARD Backward Direction
LEFT Left Direction
RIGHT Right Direction
STOP Stopped
STATUS Robot Status

When the SIM900 GSM/GPRS modem receives any SMS after password authentication, it sends new SMS notification to the ATmega32 microcontroller. The ATmega32 microcontroller reads the new SMS notification and displays "New Ctrl SMS" in the alphanumeric LCD. But if the ATmega32 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 ATmega32 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 ATmega32 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 ATmega32 microcontroller and others are discraded. The ATmega32 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 DC motor driver to drive the robot accordingly and it displays the new direction of movement of robot in the alphanumeric LCD. And if the received control SMS matches with the string "STATUS", then the ATmega32 microcontroller reads the current direction of movement of the robot and sends the AT command to SIM900 GSM/GPRS modem to send status SMS bearing the current direction of movement as message to the mobile number from where the status query SMS is received. But if the message of the received control SMS does not matches with any of the predefined strings, then "Invalid SMS" is displayed in the alphanumeric LCD. For all control SMS received by the robot, the robot sends a reply SMS to the mobile number from where the control SMS is received through the SIM900 GSM/GPRS modem. The reply SMS contains current direction of movement of the robot as message if the last SMS received is a valid control SMS and reply SMS contains "Invalid SMS" as message if last SMS received is an invalid SMS. The reply SMS is sent to notify the user about the status of the last SMS processed by the robot. The status of the SMS sending(like SMS Sending, SMS Sent) are also displayed in the alphanumeric LCD.

Now, send different SMS to the SIM900 GSM/GPRS modem of the robot from different mobile number and check mobile number authentication, password authentication, the direction of movement of the robot, its status in the alphanumeric LCD and whether auto  & status reply SMS are sent by the robot or not.

Softwares Required

Hardwares Required

Name Quantity
AVR Trainer Board-100 with ATmega32 1pc
AVR USB Programmer 1pc
SIM 900 GSM/GPRS Modem 1pc
RG1602A 16X2 Alphanumeric LCD Green 1pc
DC Motor Driver 1pc
Robot V 4.0 1pc
12V, 2A SMPS Adaptor 1pc
10 to 10 FRC Female to Female Connector 3pc
1 to 1 Connector-Female to Female 6pc

Circuit Diagram

Video

Downloads

Password Protected SIM900 GSM/GPRS Modem based SMS Controlled Wireless Robot with Mobile Number Authentication, Auto and Status Reply using ATmega32
  • 5 downloads 0 Kb

Post a Comment