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

ESP32 and L298N Motor Driver Controlled Robot with Ultrasonic Sensor

View and Edit Project In Cirkit DesignerImage of ESP32 and L298N Motor Driver Controlled Robot with Ultrasonic Sensor

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes two hobby gearmotors, a 12V battery, an ESP32 microcontroller, an L298N DC motor driver, and an HC-SR04 ultrasonic sensor. The circuit is designed to control the gearmotors using the motor driver, with the ESP32 providing control signals. The ultrasonic sensor is used for distance measurement, and the entire system is powered by a 12V battery.

Component List

  1. Hobby Gearmotor with 48:1 gearbox

    • Pins: pin 1, pin 2
    • Description: A DC motor with a 48:1 gearbox for increased torque.
    • Purpose: Provides mechanical movement.
  2. Battery 12V

    • Pins: +, -
    • Description: A 12V battery for powering the circuit.
    • Purpose: Supplies power to the circuit.
  3. ESP32 38 PINS

    • Pins: GND, G23, G22, TXD, RXD, G21, G19, G18, G5, G17, G16, G4, G0, G2, G15, SDI, SD0, CLK, 3V3, EN, SP, SN, G34, G35, G32, 33, G25, G26, G27, G14, G12, G13, SD2, SD3, 5V
    • Description: A microcontroller with Wi-Fi and Bluetooth capabilities.
    • Purpose: Provides control signals to the motor driver and reads data from the ultrasonic sensor.
  4. L298N DC motor driver

    • 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
    • Description: A dual H-bridge motor driver.
    • Purpose: Controls the direction and speed of the gearmotors.
  5. HC-SR04 Ultrasonic Sensor

    • Pins: VCC, TRIG, ECHO, GND
    • Description: An ultrasonic sensor for distance measurement.
    • Purpose: Measures distance to objects.

Wiring Details

Hobby Gearmotor with 48:1 gearbox (Motor 1)

Hobby Gearmotor with 48:1 gearbox (Motor 2)

Battery 12V

ESP32 38 PINS

L298N DC motor driver

HC-SR04 Ultrasonic Sensor

Code

No code provided for this circuit.