Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32 and L298N Motor Driver-Based Wi-Fi Controlled Robotic Car with Ultrasonic Sensor

View and Edit Project In Cirkit DesignerImage of ESP32 and L298N Motor Driver-Based Wi-Fi Controlled Robotic Car with Ultrasonic Sensor

Circuit Documentation

Summary

This document provides a detailed overview of a circuit designed to control two DC motors using an ESP32 microcontroller, an L298N motor driver, and an HC-SR04 ultrasonic sensor. The circuit is powered by a 5V battery and a 2200mAh LiPo battery. The ESP32 microcontroller is programmed to control the motor driver and read data from the ultrasonic sensor.

Component List

  1. L298N DC Motor Driver

    • Description: A dual H-Bridge motor driver that allows control of the speed and direction of two DC motors.
    • Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
  2. DC Motor (Motor 1)

    • Description: A standard DC motor.
    • Pins: pin 1, pin 2
  3. DC Motor (Motor 2)

    • Description: A standard DC motor.
    • Pins: pin 1, pin 2
  4. LiPo Battery 2200mAh 30C

    • Description: A high-capacity LiPo battery used to power the motor driver.
    • Pins: VCC, GND
  5. ESP32 (30 pin)

    • Description: A powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities.
    • Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
  6. HC-SR04 Ultrasonic Sensor

    • Description: A sensor used to measure distance by using ultrasonic waves.
    • Pins: VCC, TRIG, ECHO, GND
  7. 5V Battery

    • Description: A 5V battery used to power the ESP32 and the ultrasonic sensor.
    • Pins: +, -

Wiring Details

L298N DC Motor Driver

DC Motor (Motor 1)

DC Motor (Motor 2)

LiPo Battery 2200mAh 30C

ESP32 (30 pin)

HC-SR04 Ultrasonic Sensor

5V Battery

Documented Code

sketch.ino

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

documentation.txt