ESP32 robot controlled by Wifi

ESP32 27-02-25
78 0

Tutorial plan

1- Description of ESP32 robot controlled by wifi

2- Components of the robot

3- Mounting of the robot

4- Micropython program for ESP32 card

 

 

Description of ESP32 robot controlled by wifi

An ESP32-based WiFi-controlled robot using a Two-Wheel Car Kit and an L298N motor driver module is a great project for remote-controlled robotics.

1- The ESP32 board acts as the brain of the robot, controlling the movement of the motors based on WiFi commands.

2- The L298N motor driver receives signals from the ESP32 and regulates the speed and direction of the two DC motors.

3- The robot is controlled over WiFi, either via a web interface hosted on the ESP32 or through a mobile app (such as MIT App Inventor).

4- The ESP32 reads user commands from the web server and accordingly controls the motor driver to move forward, backward, left, or right.

 

Components of the robot

ESP32 Development Board

ESP32 card

The ESP32 microcontroller that provides WiFi connectivity and controls the motors.

Two-Wheel Car Kit

Two-Wheel Car Kit includes a chassis, two DC motors with wheels, and a caster wheel for balance.

L298N Motor Driver Module

L298N Motor Driver Module is a dual H-Bridge motor driver to control the two DC motors.

Jumper Wires

Jumper wires

Jumper Wires are usedFor making electrical connections.

Breadboard:

Breadboard

A breadboard can be used to create a temporary circuit for testing and prototyping.

Power Supply:

Provide a suitable power supply for the robot.

WiFi Connection

WiFi Connection Used to remotely control the robot.

Web Interface

Web Interface send control commands via WiFi.

 

Mounting of the robot

1- Connect pin N °5 of the ESP32 board to pin IN1 of the L298N module.

2- Connect pin N ° 4 of the ESP32 board to pin IN2 of the L298N module.

3- Connect pin No. 23 of the ESP32 board to pin IN3 of the L298N module.

4- Connect pin N ° 22 of the ESP32 board to pin IN4 of the L298N module.

5- Connect the GND pin of the ESP32 board to the GND pin of the L298N module.

6- Connect the VIN pin of the ESP32 board to the (+) terminal of the power supply module

7- Connect the GND pin of the ESP32 board to the (-) terminal of the power supply module

8- Connect the 12V pin of the L298N module to the (+) terminal of the power supply module

 

Micropython program for ESP32 card

You must install this library DCMotor.py.

boot.py

Copy the following code to the ESP32 boot.py file.

main.py

Copy the following code to the ESP32 main.py file.

 Web page that controls the car

To control the car by wifi, open a web browser and enter the IP address of the Esp32 card to obtain a command interface as in the image below.

The ESP32 runs a basic web server.

The user accesses the ESP32’s IP address on a smartphone or computer.

Clicking buttons sends requests like /forward, /backward, etc., to control movement.

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by MedAli-Teacher info