+21622886281
Car ESP32 Project

Order a car controlled by ESP32 via a Wifi connection

A robot car is a type of robotic vehicle that is designed to move on wheels. It can be controlled by a microcontroller or computer and can be programmed to move in specific patterns or respond to certain inputs. Robot cars can be used for a variety of purposes, such as transportation, research, and entertainment. They can be powered by batteries or plug into an electrical outlet, and can be small enough to fit on a tabletop or large enough to carry a person. Some robot cars are also equipped with sensors and cameras to help them navigate and interact with their environment.

A robot car can be powered by an ESP32 microcontroller and can be controlled over Wi-Fi. ESP32 is a microcontroller with built-in WiFi and Bluetooth capabilities, making it an ideal choice for wireless communication and control of the robot car.

The ESP32 can be programmed to control the movement of the robot car, receive commands from a remote device, and send sensor data over the Wi-Fi connection. The ESP32 can also be used to add additional functionality to the robot car, such as object avoidance, automatic navigation, and remote control through a smartphone or computer.

The robot car can be controlled via a web interface or mobile application, and can be connected to a network to enable communication with other devices, such as a computer or smartphone.

It’s a popular choice for hobbyist and educational projects because of the low cost, small size and powerful features of the ESP32 chip.

Objective of this project:

In this project we are going to make a car equipped with a remote ESP32 card (by Wifi).

The user controls the car through a simple web browser that displays the direction buttons (forward, right, left, back and left).

Components required

ESP32 card

ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. It was developed by Espressif Systems, a Shanghai-based Chinese company. The ESP32 chip is a powerful microcontroller that has a dual-core processor with a clock speed of up to 240 MHz, and it has a wide range of peripheral interfaces, such as I2C, SPI, UART, and ADC. It also has built-in support for Bluetooth and Wi-Fi, which makes it suitable for a wide range of IoT (Internet of Things) applications.

L298N module

The L298N module is a motor driver module that can be used to control the speed and direction of two DC motors. It is commonly used in robotic car projects because it can handle the high current requirements of motors and has built-in protection against overheating and overcurrent. The module can be controlled using a microcontroller, such as a ESP32 card, to send PWM signals to control the speed of the motors and digital signals to control the direction of rotation.

5V/3.3V Supply power module 

A 5V/3.3V power supply module is a device that can provide regulated power to electronic circuits at both 5V and 3.3V voltage levels. The module typically includes voltage regulators that convert a higher input voltage (such as 7-12V) to a stable and precise output voltage. This type of module is useful in projects where different components require different voltage levels and it eliminates the need for multiple power supply units. The module can be powered using a DC adapter or battery.

2 wheel car robot kit

A 2-wheel car robot kit is a collection of components that can be used to build a small, autonomous robot that moves on two wheels. These kits typically include a microcontroller, such as a ESP32 card, to control the robot’s movements, as well as motors, wheels, and other hardware to enable the robot to move and navigate.

2-wheel car robots are often used as educational tools, as they can be used to teach basic principles of robotics, electronics, and programming. They can also be used as a platform for experimenting with different control algorithms, sensors, and other hardware.

This robot kit is composed of:

  • car chassis.

  • 2 gear motors (1:48)

  • 2 car tires

  • 1 universal wheel

connecting wires

Wires are used to transmit electrical signals and power to various components such as motors, sensors, and microcontrollers. It’s important to properly route and secure the wires to prevent tangles and damage. There are several methods for doing this, including using cable ties, clamps, and wire looms. It’s also a good idea to use different colors or labeling to identify the different wires and their functions. When connecting wires in a robot, it’s important to follow proper safety procedures, such as using the correct wire stripper and connectors, and wearing protective equipment such as gloves and safety glasses.

9V battery

A 9V battery is a type of primary cell, meaning it is not rechargeable and must be replaced after use. It is typically used as a power source for small electronic devices, such as portable radios, smoke detectors, and some types of toys. The “9V” refers to the nominal voltage of the battery, which is the average voltage it produces when it is fully charged. The actual voltage of a 9V battery can vary depending on the type and state of charge, but it will typically be around 6V-9.5V. Common types of 9V batteries are carbon-zinc, alkaline, and lithium.

Car assembly

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

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

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

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

  • Connect the GND pin of the ESP32 board to the GND pin of the L298N module.

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

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

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

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.

MicroPython program

boot.py

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

main.py

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

dcmotor.py

Copy the following code into an ESP32 file named dcmotor.py.




0 commentaire


Leave a comment

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

Scroll to Top