Core Components: ESP32 Microcontroller: As the brain of the circuit board, the ESP32 provides powerful processing capabilities and wireless communication functions. It supports Wi-Fi and Bluetooth connectivity, enabling the circuit board to easily connect to the internet for remote control and data transmission. Arduino Compatibility: The circuit board is designed to be compatible with the Arduino development environment, meaning users can leverage the rich Arduino library and community resources to quickly develop and deploy various applications.
Features:
Precise Control: The circuit board can precisely control the robot's movement, including speed, direction, and posture, ensuring accuracy and stability when the robot performs tasks.
Multi-Sensor Support: The circuit board has reserved multiple GPIO interfaces, supporting the connection of various sensors, such as temperature sensors, for environmental perception and data collection.
Wireless Communication: Through built-in Wi-Fi and Bluetooth modules, the circuit board can achieve wireless connectivity with smartphones, tablets, or other devices, facilitating remote operation and monitoring.
Expandability: The circuit board design considers future expansion needs, providing additional interfaces and space so users can add more functional modules according to project requirements.
Overview
:
Those who watched the movie "WALL-E" in their childhood must have dreamed of owning their own WALL-E. This tutorial will guide you through building your own WALL-E robot, starting with the materials and control program you need. I think no boy can resist this little robot toy that integrates sound, light, electricity, and movement. Make one with your child during winter break, and the neighbor's kid will be green with envy!
Bill of Materials (BOM) |
Item No. | Module
|
Function |
Quantity
| Reference Price (Unit Price) |
Reference Price (Total Price) |
Remarks | |--- |---|---|---|---|---|
| 1
| Arduino UNO R3 Development Board |
Main Control Chip |
1
| 16.4
| 16.4 |
| 2 |
ESP32 C3 Development Board
| MQTT Protocol | Server Connection |
1
| 9.9
| 9.9 | |
3 |
L298N Dual H-Bridge Motor Driver Board | Drives
Track Motor |
1
| 6.4
| 6.4 | |
4
| PCA9685 16-Channel Servo Driver Board | Servo Driver | 1 | 12.5 | 12.5 | | 5 | Portable WIFI | Provides WIFI | 1 | 15 | 15 | | 6 | DC-DC 12V to 5V DC Step-Down Module | 12V to 5V Power Supply | 1 | 5.9 | 5.9 | | 7 | 12V 370 Off-Shaft Gear Motor | 107 rpm | Drives Track | 2 | 15 | 30 | Note: Buy the off-shaft version, not the center-shaft version. | | 8 | 18650 Battery Box (3 cells) | Battery Compartment | 1 | 1.2 | 1.2 9 18650 batteries in series to provide 12V power 3 8 24 10 18650 charger 1 10 10 11 SG90 9g servo motor to drive the joint 7 3.79 26.53 12 DC power plug 5.5mm (male) battery compartment power output connector 2 0.3 0.6 13 PETG-ECO black printed track and motor mount 1 35 35 The actual total weight is about 1.2kg, a rough estimate, not specifically calculated 14 PETG-ECO gray printed Wale head 1 35 35 15 PETG-ECO Caterpillar yellow printed Wale body 1 35 35 16 ASR PRO voice module (with speaker) voice recognition 1 28.9 28.9 voice control (optional) 17 1.3-inch TFT color screen weather clock screen 1 12.9 12.9 weather clock (optional) 18 ESP8266 Development Board Weather Clock Control Chip 1 13.3 13.3 Weather Clock Usage (Optional) 19 5V Laser Module Eye 1 0.65 0.65 Optional 20 WIFI Camera Network Transmission Video 1 20 20
Optional
21
Mini MP3 Player
for playing music
1
3.8
3.8
Optional
22
MFRC-522 RFID Module
NFC Wireless Identification
1
3.9
3.9
Optional
23
DHT11 Temperature Sensor
for measuring temperature
1
2.5
2.5
Optional
24
Boat-shaped
Power Switch
1
0.5
0.5
Optional
25
3W 8R Speaker
for playing music
1
4.2
4.2
Optional
26
1u2g Cloud Server
MQTT Server, Deploy H5 Control Page
1
69
69
Optional
27
Acrylic Paint (12 types in a box) for
Walle Coloring
1
1.8
1.8
Optional
Total
424.88
If you only want to complete the basic functions and realize the movement of the tracked chassis and joint movement, the hardware cost is about 160 yuan. The expansion modules can be purchased selectively according to your needs.
The following are some essential tools and common small items for DIY (not included in this list): Item
No.
Tool & Item Name
1
Hot Glue Gun
2
Multimeter
3
Soldering Iron
4
Pliers
5
TF Card, Card Reader
6 Paper
Clip
7 M3 Studs & Nuts 8 502 Glue 9 DuPont Wires (Male to Female, Female to Female) Technology Stack Used or Involved Arduino IDE Development Environment Element Plus + Vue3 + Vite + TypeScript Self-built H5 Control Page Linux + Nginx + Docker + EMQX Backend Server I. Web Control Terminal 1.1 Setting up the Arduino IDE Development Environment Arduino Official Website https://www.arduino.cc/ Arduino Chinese Community https://arduino.me/ Installing Arduino Software Installation Tutorial provided by the Chinese Community https://arduino.me/s/arduino-getting-started?aid=125 Adding a Development Board Manager File -> Preferences -> Other Development Board Managers Address Enter the following link: The following is the index provided by the Arduino Chinese Community. It will be faster than downloading from GitHub, which may encounter download failures. 12 http://arduino.me/packages/esp8266.json https://arduino.me/packages/esp32.json 3. If online installation of the Blinker library fails, try the offline installation package: https://www.diandeng.tech/doc/getting-start-esp32-wifi Blinker homepage: https://www.diandeng.tech/home The latest support package can be downloaded from the Blinker GitHub repository: https://github.com/blinker-iot The installation package provided by the Blinker official website: https://www.diandeng.tech/sdk/blinker-library-0.3.10230510.zip 4. Install the ESP32 and ESP8266 development board libraries. Simply click the corresponding library's exe file to install. 5. Install the USB serial port driver. This depends on the model of the chip downloaded to your development board. For example, the ESP32 from Heze... C3 requires the CH343 driver to be installed. Commonly used chips include CH34X and CP21XX. These two are shared in the file. If you don't have them, please search for the serial port chip model of your development board, download the corresponding driver, and install it. 1.2 Using the Blinker App as the control terminal , create a new independent Blinker device and copy the device key to replace the Blinker device key in the code. 12 // Blinker device key char auth[] = "xxxxxxxx"; Update the Blinker App's interface configuration for the Walle device, using the following code to replace it. Walle interface configuration code: 12
{¨version¨¨2.0.0¨¨config¨{¨headerColor¨¨transparent¨¨headerStyle¨¨dark¨¨background¨{¨img¨¨assets/img/headerbg.jpg¨¨isFull¨«}}¨dashboard¨|{¨type¨¨tex¨¨t0¨¨blinker introductory example¨¨t1¨¨text2¨¨bg¨Ë¨ico¨´´¨cols¨Í¨rows¨Ê¨key¨¨tex-272¨´x´É´y´É¨speech¨|÷¨lstyle¨Ê¨clr¨¨#FFF¨}{ßC¨btn¨ßJ¨fas fa-arrow-alt-down¨¨mode¨ÉßE¨back¨ßGßHßIÉßKËßLËßM¨btn-back¨´x´Ì´y´¤FßPÉßQ¨#076EEF¨}{ßCßSßJ¨fas fa-arrow-alt-up¨ßUÉßE¨forward¨ßGßHßIÉßKËßLËßM¨btn-go¨´x´Ì´y´¤BßQßXßPÉ}{ßCßSßJ¨fal fa-power-off¨ßUÉßE¨emergency stop¨ßGßHßIÉßKËßLËßM¨btn-stop¨´x´Ì´y´¤DßQ¨#EA0909¨ßPÉ}{ßCßSßJ¨fas fa-arrow-alt-right¨ßUÉßE¨right¨ßGßHßIÉßKËßLËßM¨btn-right¨´x´Î´y´¤DßPÉßQßX}{ßCßSßJ¨fas fa-arrow-alt-left¨ßUÉßE¨left¨ßGßHßIÉßKËßLËßM¨btn-left¨´x´Ê´y´¤DßQßXßPÉ}{ßCßSßJ¨fad fa-arrow-alt-circle-up¨ßUÉßE¨raise neck¨ßGßHßIÉßKËßLËßM¨btn-nick-up¨´x´Ì´y´ÏßQ¨#FBA613¨}{ßCßSßJ¨fad fa-arrow-alt-circle-down¨ßUÉßE¨lower neck¨ßGßHßIÉßKËßLËßM¨btn-nick-down¨´x´Ì´y´ÑßQßoßPÉ}{ßCßSßJ¨fad fa-arrow-alt-up¨ßUÉßE¨left hand¨ßGßHßIÉßKËßLËßM¨btn-left-hand-up¨´x´É´y´ÒßQ¨#00A90C¨ßPÉ}{ßCßSßJßsßUÉßE¨right hand¨ßGßHßIÉßKËßLËßM¨btn-right-hand-up¨´x´Ï´y´ÒßQßv}{ßCßSßJ¨fad fa-arrow-alt-down¨ßUÉßE¨Left hand down¨ßGßHßIÉßKËßLËßM¨btn-left-hand-down¨´x´É´y´¤BßPÉßQßv}{ßCßSßJßyßUÉßE¨Right hand down¨ßGßHßIÉßKËßLËßM¨btn-right-hand-down¨´x´Ï´y´¤BßQßv}{ßCßSßJ¨fad fa-arrow-alt-circle-left¨ßUÉßE¨Turn left head¨ßGßHßIÉßKËßLËßM¨btn-head-left¨´x´Ê´y´ÐßQßo}{ßCßSßJ¨fad fa-arrow-alt-circle-right¨ßUÉßE¨Turn right¨ßGßHßIÉßKËßLËßM¨btn-head-right¨´x´Î´y´ÐßPÉßQßo}{ßCßSßJßyßUÉßE´Look down´ßGßHßIÉßKËßLËßM¨btn-head-down¨´x´Ì´y´ÍßQßoßPÉ}{ßCßSßJßsßUÉßE´Look up´ßGßHßIÉßKËßLËßM¨btn-head-up¨´x´Ì´y´ËßQßo}{ßCßSßJ¨fad fa-user-robot¨ßUÉßE¨action1¨ßGßHßIÉßKËßLËßM¨btn-act1¨´x´É´y´ÎßQßXßPÉ}{ßCßSßJ¨fad fa-redo-alt¨ßUÉßE¨action reset¨ßGßHßIÉßKËßLËßM¨btn-reset¨´x´Ï´y´ÎßPÉßQßX}{ßCßSßJ¨fad fa-lightbulb-on¨ßUÉßE´laser´ßGßHßIÉßKËßLËßM¨btn-led¨´x´É´y´ÌßPÉßQße}{ßCßSßJ¨fad fa-thermometer-three-quarters¨ßUÉßE´temperature´ßGßHßIÉßKËßLËßM¨btn-tem¨´x´Ï´y´ÌßPÉßQßv}{ßC¨deb¨ßUÉßIÉßKÑßLÌßM¨debug¨´x´É´y´¤H}÷¨actions¨|¦¨cmd¨¦¨switch¨‡¨text¨‡´on´¨open?name¨¨off¨¨close?name¨—÷¨triggers¨|{¨source¨ß1P¨source_zh¨¨switch status¨¨state¨|´on´ß1S÷¨state_zh¨|´open´´close´÷}÷´rt´|÷}
3. Burn the control code to the ESP32 C3 development board
Hezhou ESP32 C3 Development Board Official Documentation https://wiki.luatos.com/chips/esp32c3/index.html
If the development board you are using is not an ESP32 C3, please replace the pin definitions yourself; otherwise, compilation errors may occur.
The following content needs to be replaced in the code
: 123456
// Blinker device key char auth[] = "xxxxxxxx"; // WIFI name char ssid[] = "xxxxxx"; // WIFI password char pswd[] = "xxxxx";
After changing the device key and WIFI name/password, burn ESP32_Blinker.ino to the ESP32 C3 development board.
Before burning, please ensure that the following libraries are installed in the Arduino IDE:
1234
BlinkerDHT sensor libraryAdafruit Unified SensorEspSoftwareSerial
When using the HeZhou ESP32 C3 to burn the program, the following points need attention, otherwise burning may fail:
1. Select "DIO" mode for Flash Mode.
2. Select "Enabled" for USB CDC On Boot for convenient serial port debugging.
3. Press and hold the onboard boot button to power on and enter download mode. At this time, the two onboard LEDs will be dimly lit.
4. If the programming is complete but the onboard LEDs are not lit and remain dimly lit, please press the reset button to restart, or power on the development board again.
1.3 Using a Self-Built H5 Page as the Control Terminal
This section requires installing EMQTX using Docker in a Linux environment and deploying the Walle H5 control page using Nginx as the web server.
EMQX Official Documentation: https://www.emqx.io/docs/zh/latest/deploy/install-docker.html
EMQX Vue3 Example: https://github.com/emqx/MQTT-Client-Examples/tree/master/mqtt-client-Vue3.js
1. Install Docker
12345678910
# Install related tools yum install -y yum-utils device-mapper-persistent-data lvm2 # Configure Tsinghua yum repository yum-config-manager --add-repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo # Install Docker yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin # Start Docker systemctl start docker # Check Docker version number docker -v
2. Install EMQX Docker
12345
# Pull the image docker pull emqx/emqx:5.4.1 # Start EMQX docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx:5.4.1 # Open ports 1883, 8083, 8084, and 8883 on the server.
3. Install Nginx
123
yum install -y nginx # Start nginx systemctl start nginx
4. Deploy H5 control page
123456789101112131415161718192021222324252627282930
# Install unzip yum install -y unzip # Create a new folder to store the H5 pages cd /home mkdir emqx # Upload dist.zip to the /home/emqx folder # Unzip dist.zip unzip /home/emqx/dist.zip #Add the following Nginx configuration# Domain xxxx.xxx server { listen 80; server_name xxxx.xxx; location / { client_max_body_size 200m; root /home/emqx/dist; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } #6. Restart Nginx nginx -s reload
3. Burn the ESP32_H5.ino program to ESP32
Open the ESP32_H5.ino file and replace the MQTT connection related parameters
123456
// MQTT Broker const char *mqtt_broker = "server IP or domain name"; const char *topic = "subscribed topic"; const char *mqtt_username = ""; const char *mqtt_password = "";const int mqtt_port = 1883;
After replacing the parameters, burn the program into the ESP32 and open the serial port monitor to view the logs.
Open the H5 control page, test sending commands, and view them in the serial port monitor.
Considering that deploying H5 pages here might be challenging for beginners unfamiliar with Linux, and some users might not have a server, you can use the website and MQTT server I shared directly if you don't want to set one up. To prevent topic conflicts when multiple users use it, please be sure to replace the topic with your own topic in the following format:
12345678910.
H5 control page address: https://walle.werfamily.funmqtt server: t.werfamily.funTopic. Replace the topic with your own to prevent conflicts with other users. The format is bili/B站UID. // MQTT Broker const char *mqtt_broker = "t.werfamily.fun"; const char *topic = "bili/yourB站UID"; const char *mqtt_username = ""; const char *mqtt_password = ""; const int mqtt_port = 1883;
Self-built: The following needs to be replaced: Protocol, server address, and port.

Use the one I've already built. For the topic, please enter your own Bilibili UID.

To prevent duplicate topic conflicts, please replace the UID with your own Bilibili UID when using it.
To view your Bilibili UID, go to "My Homepage" -> click on Space -> click on Details.
How to get your UID?
View your UID in your computer browser, in your profile,

or on your mobile device.
Step 1

, Step 2,

Step 3. II

. Track Motor Control
2.1. The track motor uses a 12V off-axis 107 rpm geared motor. The motor drive uses a dual H-bridge L298N drive board.
L298N data:
IN1
IN2
ENA (A)
Motor A state
0 or 1
0 or 1
0
Stop
1
0
1
Clockwise
0
1
1
Counterclockwise
0
0
1
Brake
1
1
1
Brake
IN3
IN4
ENA(B)
Motor B State
0 or 1
0 or 1
0
Stop
1
0
1
Clockwise
0
1
1
Counterclockwise
0
0
1
Brake
1
1
1
Brake
Here we do not use PWM speed control, ENA(A) ENA(B) default short circuit is the maximum speed.
Control method: Both track motors rotate forward to move forward, both rotate backward to move backward, one rotates forward and one rotates backward to turn.
IN1
IN2
IN3
IN4
Moving state
1
1
1
1
Stop
0
0
0
0
Stop
1
0
1
0
Forward
0
1
0
1
Backward
1
0
0
1
Right turn
0
1
1
0
Left turn
2.2 Circuit connection:
The 12V of the DC12V step-down module is connected to the 12V input of L298N to power L298N.
123456789
L298N Module Arduino UNO Development Board VN1 -------------------------- 6 VN2 -------------------------- 7 VN3 -------------------------- 8 VN4 -------------------------- 9
123456789
ESP32 C3 Development Board Arduino UNO Development Board GND -------------------------- GND 5V -------------------------- 5V IO00 -------------------------- TX IO01 -------------------------- RX
2.3 Arduino UNO Code
Baidu Cloud Link: https://pan.baidu.com/s/1HNKWE4Z2C2nG0kT3WxBQWA?pwd=zm6l
ESP32 C3 Code with H5 Page Control Method (Recommended, stable connection)
Baidu Cloud Link: https://pan.baidu.com/s/1HEGymdvOeyf_LJFmb-WZXg?pwd=qh1i
ESP32 with Blinker Control Method C3 code (connection may be unstable)
Baidu Netdisk link: https://pan.baidu.com/s/1OK_kX1OvmjliplcLMSUIGQ?pwd=e1in III. Servo
Control
The servo control uses the PCA9685 16-channel servo driver board.
Below is the circuit connection diagram:
1 2 3 4 5 6
7 8 9 10 PCA9685 servo driver board Arduino UNO development board GND -------------------------- GND SCL -------------------------- A5 SDA -------------------------- A4 VCC -------------------------- 5V
Before use, please ensure that the Adafruit PWM Servo Driver Library is installed in the Arduino IDE .
Arduino UNO servo control code
Baidu Netdisk address: Link: https://pan.baidu.com/s/1U4rW1MrFWgN5JhVQwd_Qtg?pwd=rghc
IV. Expansion Modules (Optional)
Please delete any unused modules.
Complete code version (including all modules) ESP32 C3 Code: Link: https://pan.baidu.com/s/1AcRYgk3Fzj8J-DgBbBVwbA?pwd=453w
Full version (includes all modules) Arduino UNO Code: Link: https://pan.baidu.com/s/1WTP7OwrzfyabWFWJCDkhqA?pwd=w5f2
Before using the voice control module, please install the Tianwen Block software
. Tianwen Official Website: http://www.twen51.com/new/twen51/index.php
ASR PRO Voice Module Code: https://pan.baidu.com/s/1F9mbbMGzFKIO1RYE3TRoSA?pwd=ucwb
4.1 ASR PRO Voice Control Module
1234567891011
ASR PRO Voice Module ESP32 C3 GND -------------------------- GND 5V -------------------------- 5V PB5 -------------------------- IO06 PB6 -------------------------- IO07
4.2 DHT11 Temperature and Humidity Module
requires DHT sensor library
1234567
DHT11 Temperature and Humidity Module ESP32 C3 + -------------------------- 3.3V OUT -------------------------- IO04 GND -------------------------- GND
4.3 RC522 RFID Identification Module
Arduino_NFC Code: Link: https://pan.baidu.com/s/1FvI96uUmDy-ZOgpB4U8FaA?pwd=wzwa
Requires MFRC522 library
1234567891011121314
RC522 RFID Module Arduino UNO Development Board SDA -------------------------- 10 SCA -------------------------- 13 MOSI -------------------------- 11 MISO -------------------------- 12 GND -------------------------- GND 3.3V -------------------------- 3.3V
4.4 Mini Mp3Player MP3 playback module
requires the DFRobot DFPlayerMini library to be installed
. Official documentation: https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299
Import music folder to SD card.
Music link: https://pan.baidu.com/s/15qRZ5JTXNoIE5nzJVDV0Vw?pwd=dmkf
Arduino_MP3 code: Link: https://pan.baidu.com/s/1Si77ZYmtONfURM49FJ6aQw?pwd=dpfk

123456789101112131415161718
Mini Mp3Player module Arduino UNO development board VCC -------------------------- 5V RX -------------------------- 2 TX -------------------------- 3 DAC_R -------------------------- No connection DAC_1 -------------------------- No connection Speaker 1 ---------------- SPK_1 GND -------------------------- GND Speaker 2 ---------------- SPK_2
4.5 Red laser
12345
Red laser head ESP32 C3 + -------------------------- IO10 GND -------------------------- GND
Q&A
To troubleshoot and resolve issues more quickly, define the first, second, and third communication segments according to the following diagram.
First, look at the schematic diagram of the control link:

Overall connection diagram:

Cannot control? No response?
(1) First, ensure that both the H5 control terminal and ESP32 are connected to the MQTT server.
(2) First communication segment: After the H5 control terminal is connected to the MQTT server, click "Send Command". If the page receives the command and prints the log, it proves that the first communication segment is working correctly.
(3) Second communication segment: After the H5 sends the command, the ESP32 serial port outputs a corresponding log, and the onboard LED flashes alternately.
(4) Three-segment communication: After H5 sends the command, the UNO serial port will output corresponding logs.
ESP32 cannot connect to the MQTT server?
1. Has the MQTT topic been changed ?
2. Have the WIFI and password been changed
? How to ask a question?
First, ensure that the communication of the above links is working properly, then check the module wiring.
1. Development board code version, problem description
2. ESP32 serial port log screenshot
3. UNO serial port log screenshot
This is my first time writing a tutorial and recording a video, so there may be some stumbles and shortcomings. Please point out any errors and forgive me.
If you find this helpful, please give it a like, comment, and share. Thank you.
To be continued. The video tutorial is still being produced, and the document will be updated simultaneously. Please stay tuned!