Introduction: Wi-fi Controlled FPV Rover Robot (with Arduino, ESP8266 and Stepper Motors)

Picture of Wi-fi Controlled FPV Rover Robot (with Arduino, ESP8266 and Stepper Motors)

This instructable shows how to design a remotely controlled two-wheeled robotic rover over a wi-fi network, using an Arduino Uno connected to an ESP8266 Wi-fi module and two stepper motors. The robot can be controlled from an ordinary internet browser, using a HTML designed interface. An Android smartphone is used to broadcast video and audio from the robot to operator's control interface.

There is a lot of robotic kits available online with various shapes, dimensions and prices. But, depending on your application, none of them will fit, and you might find out they are too expensive for your experiments. Or maybe you just want to make your your mechanical structure instead of buying a complete one.
This instructable also shows how to design and build a low-cost acrylic frame for your own robotic project, using just ordinary tools for those who doesn't have access to those expensive 3D printers or laser cutters. A simple robotic platform is presented.

This guide might be adapted to have its shape or control interface changed. It was adapted for other of my robotic projects ("Robô da Alegria"), that you can check in the links bellow:

[Warning: some of the photos are outdated, because the design was further improved. However, the idea presented here is still valid.]

Step 1: Tools

Picture of Tools

The following tools are needed for the construction of this prototype:

  • Hand saw (to perform initial cuts of the acrylic sheet)
  • Screewdriver (for bolts and nuts placement)
  • Ruler (for dimensions measurement)
  • Utility knife (for cutting the acrylic sheet)
  • Drilling machine (to create holes for the bolts)
  • Sandpaper (to smooth rough edges)

Step 2: Mechanical Structure and Materials

Picture of Mechanical Structure and Materials

To build a custom robot, first you'll have to design your mechanical structure. It might be easy, depending on your application, or full of details and constraints. You might need to design it in a 3D CAD software or just draw it in 2D, depending on the complexity of your model.

You might also buy the complete structure online if you doesn't want to build your own mechanical structure. There is a lot of robotic kits available online. In this case, you might jump to Step 6.

For this instructable, a low-cost acrylic frame was designed for the attachment of the motors and other components. The structure presented in this tutorial was 3D designed using 123D Design CAD software. Each part was later converted in 2D using Draftsight software.

The following materials were used:

  • 2mm acrylic sheet
  • 42x19mm wheels with rubber tread tire (x2)
  • 49x20x32mm steel ball omni wheel (x1)
  • M2 x 10mm bolts (x12)
  • M2 x 1,5mm nuts (x12)
  • M3 x 10mm bolts (x8)
  • M3 x 1,5mm nuts (x8)
  • 5/32" x 1" bolts (x3)
  • 5/32" nuts (x6)
  • Handheld selfie stick clip
  • 3 x 3 cm aluminum bracket (x4)

The construction of the structure of the base is divided in the following steps:

  1. Cut the acrylic base according to the dimensions in the 2D drawing;
  2. Drill the holes in the positions in shown in the 2D drawing;
  3. Mount the components with bolts and nuts according to the 3D drawing.

Unfortunately the diameter of the stepper motor shaft is greater than the orifice on the wheel. So you'll probably need to use glue to couple those components. For this tutorial I improvised a wood coupling between the motor shaft and the wheel.

Step 3: Cutting the Structure

Picture of Cutting the Structure

First you'll need to transfer the dimensions of your model to the acrylic sheet. Print your 2D drawing using an ordinary printer on an adhesive paper, then cut the paper in suitable dimensions and apply that mask on the surface of the acrylic.

You might use a hand saw to cut the acrylic according to your dimensions or use break technic described bellow.

With an utility knife and with the help of a ruler or a scale, cut the acrylic in straight lines. You won't need to cut all the way thru the sheet, just score it to create some tracks where the piece will be later cutted.

Place the acrylic on a flat surface, hold it in place with some clamps and apply some pressure until the sheet breaks into two. Repeat this process untill all the cuts are done. After that, you might use a sandpaper to smooth rough edges.

Step 4: Drilling the Base

Picture of Drilling the Base

Drill the holes in the positions in shown in the 2D drawing (indicated in the mask) with a drilling machine.

Acrylic is relativelly easy to drill. So if you don't dispose of a drilling machine, you can drill the holes manually with a sharp tool, like an utility knife. You might also use it to enlarge small holes to fit bolts sizes.

Remove the mask and your base will be ready.

Step 5: Assembling the Structure

Picture of Assembling the Structure

Mount the components with bolts and nuts according to the images, and your structure will be ready to go.

M3 bolts are used for the instalation of the stepper motors, while the 5/32" ones are used for the instalation of the front wheel and the smartphone clip.

Now take a break and start to assamble the circuit in the following step...

Step 6: Electronics

Picture of Electronics

You'll need the following electronic components:

  • Arduino Uno (buy)
  • ESP8266 (buy)
  • Protoshield (for a more compact version) or an ordinary breadboard (buy)
  • 1 kohm resistor (x2)
  • 10 kohm resistor (x1)
  • Some jumper wires
  • Stepper motor with ULN2003driver (x2) (buy / buy)
  • A computer (for compiling and uploading Arduino code)
  • Power bank (buy)
  • USB cable

You won't need specific tools for the assembly of the circuit. All the components can be found online on your favourite e-commerce store. The circuit is powered by a power bank connected to Arduino's USB port.

Connect all the componets according to the schematic. You'll need some jumper wires to connect the ESP-8266 module and the stepper motors. You might use a protoshield (for a more compact circuit), an ordinary breadboard, or design you own Arduino shield.
Plug the USB cable to the Arduino Uno board and proceed to the next step.

Step 7: Arduino Code

Install the latest Arduino IDE. In this project stepper.h library was used for the control of the stepper motors. No additional library was needed for communication with ESP-8266 module. Please check the baudrate of you ESP8266 and set it properly in the code.

Download Arduino code (stepperRobot.ino) and replace the XXXXX by your wifi router SSID and YYYYY by router password. Connect the Arduino board to your computer USB port and upload the code.

Step 8: Android IP Cam

Picture of Android IP Cam

An Android smartphone was used to broadcast the video and audio from the robot to the control interface. You may find the app on Google Play store (

Install it and move to next step.

Step 9: Put the Circuits in the Robot

Picture of Put the Circuits in the Robot

Install the circuits in the top of the robot using some M1 bolts, as shown in the images.

After that, glue your power bank in the back of the robot using a double sided tape (because it's easy to remove later), and put your smartphone in the clip.

Step 10: Web-based Control Interface

Picture of Web-based Control Interface

A html interface was designed for the control of the robot.

Download interface.rar and extract all the files to a given folder. Then open it on Firefox.

A textbox form is used in that interface to enter IP addresses of the ESP module and of the video/audio server (from Android IP Webcam app).

There is a test but, which will make the robot spin until anoter command is received. Keyboard arrow keys are used for moving the robot forward or backward, and to rotate left or right.

Step 11: Usage

When the Arduino is restarted, it will try to connect your wi-fi network automatically. Use the Serial Monitor to check if the connection was successfull, and to obtain which IP was assigned to your ESP-8266 by your router. Open the html file in an internet browser (Firefox) and inform this IP address in the textbox.

You might also user other means to find out which IP address you router assigned to your device.

Disconnect the the Arduino Uno from your computer and connect it to the power bank. Wait for it to connect again.

Launch IP Webcam app in the smartphone attached to the robot. Type the video/audio IP on your control interface and connect to the server and you'll be ready to go. You might need to reduce the resolution of the video in the app to reduce the delay between during the transmission.

Click and hold the arrow buttons of your keyboar to rotate the robot or move it forward/backward and have fun exploring your environment.


AlexanderH48 (author)2017-09-26

I have nothing in serial monitor,

there is some firmware on esp i have....

do i need to blank it?

IgorF2 (author)AlexanderH482017-09-26

On my project I used ESP8266 standard firmware (the one that comes with it out of the box). It receives a set of default commands (AT commands) and perform some actions.
In your case, since you uploaded your own code on the ESP8266, it no longer understands those AT commands.
I think you'll have to upload default firmware (although I don't know exactly how), or use a new ESP8266 module (if you have one available).
I hope it helps...

AlexanderH48 (author)2017-09-26

i got nothing in serial monitor...

but there some firmware on esp... do i need to make it blank?

SarthakS42 (author)2017-07-27

it is not connecting to wifi please help

IgorF2 (author)SarthakS422017-07-28

What kind of message do you receive in the serial monitor?

SarthakS42 (author)2017-07-20

my esp is not able to connect to my wifi

SarthakS42 (author)2017-07-19

sir can you share connection for protoshield

IgorF2 (author)SarthakS422017-07-20

Follow the pictures.

SarthakS42 (author)2017-07-20

what should be the baud rate

IgorF2 (author)SarthakS422017-07-20

You can find the baurates in Arduino code.
The baud rate of your ESP8266 might be different and you'll have to try different values.

SarthakS42 (author)IgorF22017-07-20

it show box

SarthakS42 (author)2017-07-20

can i replace the front wheel with some other thing please telll

IgorF2 (author)SarthakS422017-07-20

There is a lot of types of caster and ball wheels you can use to replace the front one.

IgorF2 (author)2017-07-18

I printed the base on a A4 size paper. What's your issue?

SarthakS42 (author)IgorF22017-07-19

can you please share the connections for protoshield

IgorF2 (author)SarthakS422017-07-19

You can find breadboard connections on the following pdf:

The protoshield works the same way a ordinary breadboard does. Connect it on top of the Arduino Uno and connect the components.
You might have an idea of the connections from the pictures at the introduction.

SarthakS42 (author)IgorF22017-07-19

but breadboard connections are diffrent then from your protoshield image

IgorF2 (author)SarthakS422017-07-20

Follow the pictures. The connections to the breadboard are exactly the same. The protoshield has the same connectors the Arduino does.

SarthakS42 (author)IgorF22017-07-20



SarthakS42 (author)2017-07-20

hey after opening serial moniter only box and some letter are showing

SarthakS42 (author)2017-07-19

hey solve my problem

SarthakS42 (author)2017-07-18

i bought the tires for rs 675

SarthakS42 (author)2017-07-11

sir can you please send me the pictures of connecting motors and esp8266 to arduino

my mail id is

IgorF2 (author)SarthakS422017-07-11

I don't have nice pictures of those connections at the moment.

You may find a breadboard schematic at the following link:

SarthakS42 (author)IgorF22017-07-15

respected sir,what is used 10 k ohm or 100kohm please confirm

IgorF2 (author)SarthakS422017-07-16

Hi there.
You might use two 10k or two 100k resistors. The two options would work the same.
Those resistors work as a voltage divider, to reduce the voltage from the Arduino TX pin by a half.

IgorF2 (author)2017-07-09

Hi there. Which browser/OS are you using?

SarthakS42 (author)IgorF22017-07-11

i opened thanks

DwarakM (author)2016-10-17

how to get ip address of arduino without phone

pls help

IgorF2 (author)DwarakM2016-10-17

After uploading the code to the Arduino, open the Serial Monitor. The Arduino will restart and automatically try to connect you wi-fi router (given by its SSID and password). If it connects successfully, the IP address will be shown.

FábiooF (author)IgorF22017-06-21

No meu caso nao se conecta, que podera ser?

IgorF2 (author)FábiooF2017-06-23

Você poderia fornecer mais detalhes? Que informações você tem no Serial Monitor?

DXGJyothish (author)2017-03-19

Can we use mobile to control the robot

IgorF2 (author)DXGJyothish2017-03-20

You mean using the smartphone as the "brain" of the robot? It is possible, but you'll still need some hardware to make the interface between the phone and the motors.

fathan21 (author)2017-02-04

Hi, i plan to make the project, can i get some clarification? Is the robot available to be controlled from different country?

IgorF2 (author)fathan212017-02-04

Hi. I've only managed to control it when I connected my computer on the same wi-fi network the robot is in.
I'll try to control it from an external network and let you know if it works.

RezwanN (author)2017-01-01

can i replace stepper motor into gear motor ...?

IgorF2 (author)RezwanN2017-01-02

Yes, you can use DC motors with an H-bridge instead of the stepper motors. This way your robot will move faster!
Notice that sometimes the DC motors have different dynamics. This way, on motor might move faster than the other, and you might face some problems when you try to run on a straight line. Some position feedback of the wheels may be used.

RezwanN (author)IgorF22017-01-02

is it possible to give me the new code using

L293D motor driver and dc gear after tmorrow is my xm..plz

herneise (author)2016-12-18

nice work!

congrats :)

IgorF2 (author)herneise2016-12-18


IgorF2 (author)2016-10-17

I didn't have this error. Maybe it's because I'm using an older version of Arduino IDE.
I searched on some forums, and it was suggested to cast the strings as char*. This way, you'll have to replace the following parts of the code:

while(!esp8266.find("OK")) { //wait for connection
while(!esp8266.find((char*)"OK")) { //wait for connection

if (esp8266.find("+IPD,")) //if there is a message
if (esp8266.find((char*)"+IPD,")) //if there is a message

esp8266.find("?"); //look for the message
esp8266.find((char*)"?"); //look for the message

Please let me know if it works.

DwarakM1 made it! (author)2016-10-15

in the picture which is 1k ohm n 10kohm

IgorF2 (author)DwarakM12016-10-15

There was a mistake in that picture (all the resistors were 1k ohm). I updated the files on Step 6, and added a pdf view of that breadboard connection with better resolution.

100k ohm resistors are connected to ESP8266 RXD pin, and the 1k ohm resistor is connected CH_PD pin.

IgorF2 (author)2016-10-08

Hi there! The ideia is to connect both the ESP8266 and the computer to the same router. This way, if you know the IP address given by the router to your ESP module, you can send messages from your computer directly to that IP address.

IgorF2 (author)2016-10-07

You're wlecome

DwarakM (author)2016-10-07

which part is connected to phone???? pls help me

IgorF2 (author)DwarakM2016-10-07

Actually nothing was connected to the smarphone. It's used only to broadcast the videos from IPWebCam app to the browser, and isn't fisically connected to the circuits.

Although, you could connect it to the power bank, if you want to, in order to save some battery, if your power bank has multiple outputs.

Tachyon (author)2016-10-02

First let me say that this project is both cool and impressive.
That said it seems overkill from a hardware standpoint. I've built plenty of projects this way myself. It starts out with me having X pieces of cool hardware in front of me and me thinking "Hmmm...what cool thing can I do with _all_ this stuff?"
The parts on hand drive the design rather than the usual design driving the parts.
The reason I mention this is that there are several levels of simplification that could be done here. For readers that want to experiment with a simplified version of this project, here are the levels of simplification that I see. you might find even more.

- Replace the stepper motors and drivers with simple continuous rotation servos.
Unless you specifically need the precision of stepper motors, this saves cost, weight, and complexity.

- Eliminate the Arduino and use the ESP8266 for everything.
The ESP8266 can do most of what an Arduino can do and can even be programed from the Arduino IDE. Ordering a model that comes on a breakout board will let you connect all the I/O and motor control etc.

- Eliminate the ESP8266 and use the phone for everything.
With an Android I/O bridge like the IOIO device, you can use the phone for everything, including the motor control. This however puts the code portion of the project into a whole other difficulty level as you'll be moving to coding on Android instead of the simple to code Arduino. You might however overcome some of this difficulty by exploring alternatives like BASIC! for Android which should give you a compromise between power and simplicity.

Good luck!

IgorF2 (author)Tachyon2016-10-02

Thanks for your considerations! I really appreciated your advices, and agree on everything you said. Regarding the hardware, there is something I'd like to use in my defense. :D
This Instructable was derived from other project I'm part of: Joy Robot ( or So I used the same hardware for simplicity.
In that robot we use stepper motors because we don't need to move the body fast. They are only used to rotate it left/right and move slowly. We also want to hold the position, without any complex control.
The Arduino Uno was used because it's very accessible and easy to use for everyone, and we wanted to design a simple shield for it. It also controls some servos and LED matrices, and interfaces with the ESP.
The smartphone is actually replaced by a tablet, that runs other applications as well.
Maybe I can use your sugestions later on other tutorial with your help! :D

About This Instructable




More by IgorF2:Robô Da Alegria (Joy Robot)Glass Mounted Hanging Cat BedIoT Air Freshener (with NodeMCU, Arduino, IFTTT and
Add instructable to: