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.
- A simple device activator circuit
- Using BMP280 to make a weather station
- Make a draft beer machine using Windows 10 UWP
- DIY an indoor and outdoor webcam
- Share a fire sensor solution using MLX90640
- Automatic recovery electronic fuse with soft start function
- DIY Solar Detector
- How to use ultrasonic sensors to make a simple nucleic acid sampling machine
- Homemade Micro AC Welding Machine
- High power laser constant current drive circuit
- Robot sound generator
- Real-time speech recognition system application circuit diagram in home monitoring robot
- Speech recognition system circuit design for home monitoring robot application
- Robot wireless remote control transmitter circuit
- SNS9201 (household appliances, robots, medical equipment or alarm devices) infrared sensing signal processing circuit
- Using voltage switching method to improve the response characteristics of stepper motor circuit
- Non-excitation circuit of stepper motor
- Bipolar two-phase stepper motor constant current drive circuit
- Reactive stepper motor PWM speed regulation circuit
- Forward and reverse two-phase excitation circuit of four-phase stepper motor