Select Page

SMS Controlled Robot

The aim of this project is to make a robotic car whose basic functions like moving forward, moving backward, turning left, turning right etc. may be controlled by sending SMS to it.

Overview:

 

 

 

Basic idea is to receive SMS using a GSM module connected to STM32l Discovery board.STM32l Discovery board will keep on poling for any SMS received by module and if it detects any new message it will send AT command to read all the SMS from the module. Then it will compare the received SMS from specified list of commands (forward, backward etc.). If the received SMS contain any of these commands it will send signal accordingly to L293D motor driver which is connected to dc motors connected to robotic car. Thus direction of movement of dc motors may be controlled according to command sent by SMS.

Hardware used and their working :

GSM Module:

 

 

 

For this project GSM SIM300 module was used. It uses the highly popular SIM300 module for all its operations.It comes with a standard RS232 interface which can be used to easily interface the modem to micro controllers and computers. It Provides serial TTL interface for easy and direct interface to micro controllers. It can be used to send SMS, make and receive calls, and do other GSM operations by controlling it through simple AT commands from micro controllers.

AT commands used for the purpose of receiving SMS in this project:

AT+CMGF=1 <ENTER>: To check if modem supports this text mode. If the modem responds with “OK” this mode is supported.

AT+CPMS=”SM” <ENTER>: To read messages from the SIM card.

AT+CMGL=”ALL” <ENTER>: Lists the messages available.The modem will respond with a list of decoded SMS messages.

AT+CMGR=<loc> <ENTER>: Lists a single message from location <loc>. We must use the list command (AT+CMGL=”ALL” <ENTER>) first,so that we know the indexes of the messages in the storage.

AT+CMGD=<loc> <ENTER>: Deletes the message on memory location <loc>.

Apart from these commands GSM modem uses +CMTI to notify the computer / PC that a new SMS message has been received and the memory location where it is stored.

 

Commands to control the Robot:

forward <num>: robotic car will move into forward direction up to a distance that will be decided by value <num>

backward <num>: robotic car will move into forward direction up to a distance that will be decided by value <num>

left: robotic car will move to left direction

right: robotic car will move to right direction

where <num> denotes some numeric value.

Basic Algorithm:

Controlling of Robot by sending SMS to it can be done in following way:

1. Put the GSM module in text mode by sending “AT+CMGF=1 <ENTER>” to it.

2. Set SIM as the storage from where board will read by sending” AT+CPMS=”SM” <ENTER>” to it.

3. Wait for GSM module to receive some message i.e. wait for “+CMTI:” command to be sent by GSM module to board.

4. List all the messages in SIM card by sending “AT+CMGL=”ALL” <ENTER>”.

5. Read all the messages until “ok” is detected.

6. Check if sent message contains any of the specified commands (forward, backward etc.) If it is detected execute that command.

7. Delete all the messages on SIM memory by sending “AT+CMGD=<loc><ENTER>” one by one for each location.

8. Go to step 3.