GSM Controlled Robot using Microcontroller | Best Electronics Project


Welcome again, we are back with another robotics project, GSM Controlled Robot using a microcontroller. It is an SMS-controlled robot, it’s a wireless robot that can perform the actions by receiving an SMS with some set of instructions. The robot’s directions like forwarding, backward, left and right Robot can be controlled by sending an SMS from our mobile.

Also Read: Wireless AC light Dimmer Using Arduino: Hand Gesture based

This GSM controlled robot mainly consists of 2 units, one is robot unit and the other one is mobile unit. A GSM modem is attached with the robot to receive the messages sent by the mobile and to control the robot directions the GSM modem gives the set of instructions to the microcontroller unit. The 8051 microcontroller is used with GSM SIM 300 in this project. The GSM modem is UART (Universal Asynchronous Receiver-Transmitter) protocol which is used for the communication with controller.

Principle of GSM Controlled Robot:

GSM modem sends the below command serially to indicate that new message is received. When we send the message,

+CMTI: “SM”,3

The number 3 in the above command indicates the location of the message. The command to read the message from GSM modem is –


Also Visit: Latest Jobs, Interships & Off-Campus drives

Here the location of the message to be read is indicated by number 3. After sending this command to GSM module, modem sends the below command serially.

+CMGR: “REC UNREAD”,”MD-WAYSMS”,,”14/05/20,16:31:48+34″

The “REC UNREAD” in the above command indicates the message as unread message, The “MD-WAYSMS” command indicates sender mobile number, the 14/05/20 & 16:31 indicates the date and time and forward is the content of the message.

We have to extract the message (forward) from the above command, sent by the user. Now compare the message with predefined strings such as forward, backward, left, right, according to the result the robot controls.

Block & Circuit Diagram of GSM Controlled Robot:

gsm controlled robot using microcontroller circuit diagram
Circuit Diagram of GSM Controlled Robot

Components Required:

  • 8051 Microcontroller
  • AT89C51 Programming board
  • Programming cable
  • 16*2 LCD
  • MAX 232 level converter
  • GSM sim 300 module
  • L293D motor driver
  • 2 – 9V DC batteries
  • 5V power supply
  • 4 – 0.1uF ceramic capacitors
  • 2 – 33pF capacitors
  • 10uF electrolytic capacitor
  • 12MHz crystal
  • 10k Resistor
  • Connecting wires

Working & Design of GSM Controlled Robot:

The 8051 microcontroller, motor driver, level converter, GSM module, and robot are the major components used in this project. Here the microcontroller used is at89c51 and it requires a power supply of 5V. A 7805 power supply circuit is used to provide 5V DC voltage to the controller. Here two batteries of 9V are used, one for the circuit and the other to run the DC motors.

A 16 x 2 LCD in the above circuit is connected to the PORT1 of the microcontroller in 4-bit mode. The data lines of LCD D4, D5, D6 & D7 are connected to P1.4, P1.5, P1.6 & P1.7, and the control pins are connected with P1.0, P1.1 & P1.2, used to indicate the received message.

Also Read: Social Distancing Cap Using Arduino

The Tx & Rx pins of the GSM modem are connected to the pin 13 & 14 pins of max232. The TXD & RXD pins of the microcontroller are connected to the 11 and 12 pins of the level converter. The max232 is a mediator between GSM module and microcontroller, used to convert the voltage levels.

5V power supply is required for GSM module. We need to send AT commands to communicate with this GSM module using serial communication (UART protocol). A baud rate of 9600 is used to communicate with GSM.

The P2.0, P2.1, P2.2 & P2.3 pins of microcontroller are connected with the L293d input pins to control the DC motors.5V is the operating voltage of this IC. We can operate two DC motors with a voltage range from 4.5 to 36V using this IC. We need to connect the motors supply at pin 8 of L293d.

Working Algorithm of GSM Controlled Robot:

  • Initialize the LCD & UART protocol
  • Check for the command continuously +CMTI: “SM”,3 to know weather new message is received or not.
  • Store message location number if you receive the command.
  • Now extract the message and read that particular message.
  • Display the extracted message content on LCD display and compare the message content with predefined strings.
  • Perform the necessary action on robot if matched.
Code to read the New Message from GSM modem –
while (rx_data() ! = 0x0d);
while (rx_data() ! = 0x0a);
if (rx_data() == ‘+’)
if (rx_data() == ‘C’)
if (rx_data() == ‘M’)
if (rx_data() == ‘T’)
if (rx_data()==’I’)
while (rx_data() != ‘,’);
a = rx_data ();
delay_ms (10);
tx_string (“at”);
tx_data (0x0d);
tx_data (0x0a);
tx_string (“at + cmgf =1”);
tx_data (0x0d);
tx_data (0x0a);
tx_string (“at + cmgr =”);
tx_data (a);
tx_data (0x0d);
tx_data (0x0a);
while (rx_data() ! = 0x0a);
while (rx_data() != 0x0a);
while (rx_data() ! = 0x0a);
for (i=0; i<15; i++)
read [i]= rx_data();
delay_ms (5000);

How to Operate the Robot?

  1. Using Keil software write the program to the GSM controlled robot.
  2. Now with the help of flash magic burn the program to the 8051 microcontroller .
  3. Do connections as per the circuit diagram.
  4. To provide 5V DC use power supply circuit.
  5. Insert the SIM to the GSM module.
  6. Now switch on the supply.
  7. Using other mobile send SMS to the GSM.
  8. You can see the same message on LCD.
  9. If the received message is same as any predefined string then robot operates accordingly.

Program code of GSM Controlled Robot: Click Here

For more electronics projects visit our website regularly, and don’t forget to join our social media groups for latest updates of jobs, internships & projects.


Please enter your comment!
Please enter your name here