Arduino Projects

Arduino GSM Motor speed controller and monitoring System

Arduino GSM Motor Speed Controller:

Arduino GSM Motor speed controller and monitoring- In today’s article, you will learn how to make a highly secured Motor speed controller and Monitoring system using Arduino and a GSM module SIM900A.

Arduino GSM Motor Speed Controller

Before, I practically demonstrate its functionality; first I would like to talk about some basic things which I believe as a beginner you should know.




As usual, I am using my designed Arduino Nano Development board but you can also use Arduino Uno. The reason I am using this development board is because it has this 5V and 3A regulated power supply.

Arduino GSM Motor Speed Controller

I am going to need this power supply to power up the GSM Sim900A module. Because, the Arduino onboard voltage regulator isn’t powerful enough to supply the required current to the GSM module. So, this is the main reason I built myself this Arduino development board and now I can power up GSM modules, high torque servos, and other input and output devices.

So, just drop the idea of using the Arduino Nano or Arduino Uno onboard voltage regulator to power up the GSM module, because if you do so,

  1. Your Arduino board will keep restarting and
  2. Your GSM module won’t able to connect to the GSM network and even if it connects; it will disconnect in no time when trying to send or receive an SMS.

So, if you want your GSM module to work smoothly; get yourself a readymade 5V and 2 to 3A power supply, and if you are good at making things then you can make this development board, or you can only make a dedicated 5V and 3A power supply.



Anyway, instead of using the 320A Brushed DC Motor controller; you can use any DC motor controller and the same thing applies to the 775 Dc Motor, you can start with any small DC motor, and even if you want you can also use a Brushless DC motor but then you will have to use this type of the ESC as you can see in the image below “30A”.

Arduino GSM Motor Speed Controller

I am going to use my created 4S lithium Ion battery to power up the 320A Motor driver and I am going to power up the Arduino board using a 12V adaptor.

Arduino GSM Motor Speed Controller

Well, I can power up this entire system using a 4S lithium Ion Battery, but it’s a good practice to keep the motor supply separate.




If you remember, in the start of the article, I said this is the highly secured motor speed controller and monitoring system.

Arduino GSM Motor Speed Controller

Because, to control the motor speed, first you will have to enter the password. This password can consist of letters, numbers, and special characters. Without a password, nobody would be able to control the motor speed or request the motor speed value from the Arduino.

Then the word dcmotor, and finally the speed value. The speed value should be between 0 and 100. 0 means OFF and 100 means full motor speed.

You might be thinking why am I using percentage signs; well I am doing this because when the Arduino receives the message. Then the Arduino can easily split the message using % sign as the delimiter. Anyway, the message is ready, and I am going to send it to the Arduino.

Note: for the practical demonstration watch the video tutorial given at the end of this article.

During the practical demonstration, I run the motor at 50% speed, 10% speed, 100%, and I also turned off the motor.



Next, I demonstrated, how to request the motor speed value from the Arduino, for this, first I set the motor speed to 80%.

Arduino GSM Motor Speed Controller

Now, to request the speed value, for this, first we type the password, then the word request   followed by the word speed. When the Arduino receives this message, it knows the person is requesting the motor speed value. The message is ready and let’s send it to the Arduino.

Arduino GSM Motor Speed Controller

This value is in microseconds and falls within the range of 1500 to 2000. A value of 1500 microseconds turns off the motor, while a value of 2000 microseconds sets the motor speed to 100%. In the programming, the map function has been utilized to convert a range of 0 to 100 into the range of 1500 to 2000. Anyway, now let’s go ahead and take a look at the connections.



Amazon Links:

Arduino Nano USB-C Type (Recommended)

GSM Sim900A Module

775 DC Motor

320A Brushed Motor Controller

Other Tools and Components:

ESP32 WiFi + Bluetooth Module (Recommended)

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

For the Beginners:

If you guys are new to the Arduino then I highly recommend read my articles on




Arduino GSM Motor Controller Circuit Diagram:

Arduino GSM Motor Speed Controller

The VCC and GND wires of the Brushed Motor Controller are connected to the Vin and GND pins. The signal Wire is connected to the Arduino PWM Pin 3.

These Red and Black wires with the XT60 connector are used to connect a 3S, 4S, or 5S Lipo or Lithium Ion battery to power up the DC Motor. In my case, I have connected the 775 Brushed DC motor with the controller output wires.

Connect the power supply pins of the GSM Sim900a module to the regulated 5v and 3A power supply. The 5V and GND wires from the 5V and 3A power supply are connected to the Arduino Vin and Gnd pins.

Connect the GSM module TXD 5V pin to the Arduino digital pin D9 and connect the RXD 5V pin to the Arduino digital pin D10.

Arduino GSM Motor Speed Controller

For the 5V and 3A power supply, you can follow this circuit diagram. Now, let’s go ahead and take a look at the programming.



Arduino GSM Motor Controller Programming:

I started off by adding the SoftwareSerial.h and Servo.h header files. With the help of SoftwareSerial; I can defined multiple serial ports. As you can see using the SoftwareSerial I have defined another serial port using the Arduino pins 9 and 10. I could also connect the GSM module to the Arduino default Serial port, but I used it for the debugging purposes.

A “Servo” object named “ESC” is created to control the speed of DC motor using 320A Brushed Motor controller.

I also defined a variable mspeed of the type integer. I have used it to store the Mapped value.

I also defined a variable passcode of the type String, so that I can use a combination of letters, numbers, and characters. So, my password is “abc123”. If I want to change my password then I can simply change this passcode.



I also defined variables for storing the incoming and outgoing messages.

Code in the void setup() function is exactly the same, as used in my previous GSM based Home Automation project. So, let’s go to the loop() function.

We simply check if a message is received then store the entire string message in the variable incoming, and then using the % sign as the delimiter we split the message, and store the corresponding values in variables password, mtype, and mvalue.

And then I have used two conditions that check if the user want to set the motor speed or if the user is requesting the motor speed value.

sendSMS() function is a user-defined function and it has no return type and it takes one argument as the input and it’s the text message we want to send. Make sure you change this number.

The getValue() function is used to split the message using any character as the delimiter. So, that’s all about the programming.



Watch Video Tutorial:

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button