Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Controlled Quadruple DC Motor Driver System

Image of ESP32-Controlled Quadruple DC Motor Driver System

Circuit Documentation

Summary

This circuit is designed to control a set of motors using an ESP32 microcontroller and two L298N DC motor drivers. The ESP32 is responsible for sending control signals to the L298N drivers, which in turn drive the motors. The motors are powered by a 12V battery, which also supplies power to the L298N drivers. The ESP32 is powered through a 5V connection from one of the motor drivers.

Component List

ESP32 (30 pin)

  • Description: A microcontroller with WiFi and Bluetooth capabilities, featuring a wide range of GPIO pins.
  • 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

L298N DC Motor Driver (x2)

  • Description: A dual H-bridge motor driver capable of driving a pair of 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

Motor and Wheels (x4)

  • Description: A set of motors with attached wheels, used for providing motion.
  • Pins: vcc, GND

Battery 12V

  • Description: A 12V battery used to power the motors and motor drivers.
  • Pins: +, -

Wiring Details

ESP32 (30 pin)

  • D32 connected to L298N Driver ENA
  • D33 connected to L298N Driver IN1
  • D25 connected to L298N Driver IN2
  • D26 connected to L298N Driver IN3
  • D27 connected to L298N Driver IN4
  • D14 connected to L298N Driver ENB
  • GND connected to L298N Driver GND and Battery 12V -
  • Vin connected to L298N Driver 5V
  • D23 connected to L298N Driver ENB (second driver)
  • D22 connected to L298N Driver ENA (second driver)
  • D19 connected to L298N Driver IN4 (second driver)
  • D18 connected to L298N Driver IN3 (second driver)
  • TX2 connected to L298N Driver IN2 (second driver)
  • RX2 connected to L298N Driver IN1 (second driver)

L298N DC Motor Driver (first instance)

  • ENA connected to ESP32 D32
  • IN1 connected to ESP32 D33
  • IN2 connected to ESP32 D25
  • IN3 connected to ESP32 D26
  • IN4 connected to ESP32 D27
  • ENB connected to ESP32 D14
  • GND connected to ESP32 GND and Battery 12V -
  • 5V connected to ESP32 Vin
  • OUT1 connected to Motor and Wheels GND
  • OUT2 connected to Motor and Wheels vcc
  • 12V connected to Battery 12V +

L298N DC Motor Driver (second instance)

  • ENB connected to ESP32 D23
  • ENA connected to ESP32 D22
  • IN4 connected to ESP32 D19
  • IN3 connected to ESP32 D18
  • IN2 connected to ESP32 TX2
  • IN1 connected to ESP32 RX2
  • GND connected to ESP32 GND and Battery 12V -
  • 12V connected to Battery 12V +
  • OUT1 connected to Motor and Wheels GND
  • OUT2 connected to Motor and Wheels vcc

Motor and Wheels (four instances)

  • Each motor has its vcc connected to an OUT pin of a L298N driver and GND to another OUT pin of the same driver.

Battery 12V

    • connected to both L298N Drivers 12V
    • connected to both L298N Drivers GND and ESP32 GND

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

The documentation.txt file is empty and does not contain any code or comments.