Home > Other >Special Application Circuits > How to Design a Wireless Remote Controlled Two-Wheeled Robotic Rover Using ESP8266 and Arduino Uno

How to Design a Wireless Remote Controlled Two-Wheeled Robotic Rover Using ESP8266 and Arduino Uno

Source: InternetPublisher:containsmachine Keywords: Robot Stepper Motor Wi-Fi Module ESP8266 Updated: 2024/08/02

This project shows how to design a wireless remote controlled two wheeled robotic rover using ESP8266 and Arduino Uno.

This tutorial shows how to design a two-wheeled robotic rover that is remotely controlled 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 a regular internet browser using an interface designed in HTML. An Android smartphone is used to broadcast video and audio from the robot to the operator's control interface.

There are many robot kits available online in all shapes, sizes and prices. However, depending on your application, none of them will be suitable, and you may find them too expensive for your experiments. Or, maybe you just want to make your mechanical structure instead of buying a complete one. This tutorial also shows how to design and build a low-cost acrylic frame for your own robotics project, and for those who don't have one, just use those expensive 3D printers or laser cutters with ordinary tools. A simple robotic platform is shown.

Step 1: Tools

The following tools are required to build this prototype:

Hand saw (for making initial cuts in the acrylic sheet)

Screwdriver (for placing bolts and nuts)

Ruler (for measuring dimensions)

Utility knife (for cutting acrylic sheets)

Drilling machine (for drilling holes for bolts)

Sandpaper (to smooth out rough edges)

Step 2: Mechanical Structure and Materials

To build a custom robot, first you have to design the mechanical structure. This can be easy, depending on your application, or full of details and limitations. Depending on the complexity of the model, you may need to design it in 3DCAD software or just draw it in 2D.

If you don't want to build your own mechanical structure, you can also buy a complete structure online. There are many robot kits online. In this case, you can probably skip to step 6.

In this tutorial, we designed a low-cost acrylic frame to which the motor and other components are attached. The structure presented in this tutorial was designed in 3D using 123D DesignCAD software. Each part was later converted to 2D using Draftsight software.

The following materials were used:

2mm acrylic sheet

42x19mm wheels with rubber tread tires (x2)

49x20x32mm steel ball universal wheel (x1)

M2x10mm bolts (x12)

M2x1, 5mm nuts (x12)

M3x10mm bolts (x8)

M3x1, 5mm nuts (x8)

5/32"x1" bolt (x3)

5/32" Nut (x6)

Handheld Selfie Stick Clip

3x3 cm aluminum bracket (x4)

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

Cut the acrylic base according to the dimensions in the 2D diagram;

Drill holes at the locations shown in the two-dimensional diagram;

Install the components using bolts and nuts according to the 3D drawing.

Unfortunately, the diameter of the stepper motor shaft is larger than the hole in the wheel. Therefore, you may need to use glue to connect these components. In this tutorial, I improvised a wooden coupling between the motor shaft and the wheel.

Step 3: Cutting the Structure

First, you need to transfer the dimensions of your model to the acrylic sheet. Use a regular printer to print your 2D drawing on a self-adhesive sheet, then cut the sheet to the right size and stick that mask on the acrylic surface.

You can use a hand saw to cut the acrylic to your dimensions or use the breaking technique described below.

Using a utility knife and a ruler or graduated ruler, cut the acrylic along straight lines. You don't need to cut all the way through the sheet, just score it to create some tracks that you will then cut the sheet along.

Lay the acrylic on a flat surface, hold it in place with some clamps and apply some pressure until the sheet breaks in two. Repeat this process until all the cuts are done. Afterwards, you can use sandpaper to smooth out the rough edges.

Step 4: Drill the Base

Use a drill to drill holes at the locations shown in the 2D diagram (shown in the mask).

Acrylic is relatively easy to drill. So if you don't have a drill at your disposal, you can drill the holes manually using a sharp tool like a utility knife. You can also use it to enlarge small holes to accommodate bolt sizes.

Remove the mask and your base is ready.

Step 5: Assembling the Structure

Install the components with bolts and nuts according to the pictures and your structure is ready.

The M3 bolts are used to mount the stepper motors, while the 5/32" bolts are used to mount the front wheel and smartphone clamp.

Now, you can start assembling the circuit in the following steps

Step 6: Electronics

You will need the following electronic components:

Arduino Uno

ESP8266

Protoshield or regular breadboard

1kohm resistor (x2)

10kohm resistor (x1)

Some jumper wires

Stepper motor with ULN2003driver (x2)

A computer (for compiling and uploading Arduino code)

Power Bank

USB cable

You do not need specific tools to assemble the circuit. All components can be found online at your favorite e-commerce store. The circuit is powered by a power bank connected to the Arduino USB port.

Connect all the components according to the schematic. You will need some jumper wires to connect the ESP-8266 module and the stepper motor. You can use a protoshield (for a more compact circuit), a regular breadboard, or design your own Arduino expansion board. Plug the USB cable into the Arduino Uno board and proceed to the next step.

Step 7: Arduino Code

Install the latest ArduinoIDE. In this project stepper.h library is used to control the stepper motor. No additional library is required to communicate with ESP-8266 module. Please check the baud rate of your ESP8266 and set it correctly in the code.

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

Step 8: Android Webcam

Step 9: Put the Circuit Into the Robot

Use some M1 bolts to mount the circuit on top of the robot as shown in the picture.

After that, stick your power bank to the back of the robot using double-sided tape (as it will be easy to remove later) and then put your smartphone into the clip.

Step 10: Web Based Control Interface

A html interface was designed for controlling the robot.

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

Enter the IP addresses of the ESP module and the video/audio server (from the AndroidIP Webcam app) using the text boxes in this interface.

There is one test however, which will cause the robot to rotate until another command is received. The keyboard arrow keys are used to move the robot forward or backward, and to rotate left or right.

Step 11: Use

When the Arduino restarts, it will try to connect your Wi-Fi network automatically. Use the serial monitor to check if the connection is successful and get the IP assigned by the router to the ESP-8266. Open the html file in an Internet browser (Firefox) and tell this IP address in the text box.

There are other ways you can use to find out the IP address your router has assigned to your device.

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

Launch the IP webcam app in the smartphone connected to the robot. Enter the video/audio IP on your control interface and connect to the server and you are ready to go. You may need to lower the resolution of the video in the app to reduce latency during transmission.

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

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号