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

Wi-Fi Controlled Dual DC Motor System with ESP32 and L298N Driver

View and Edit Project In Cirkit DesignerImage of Wi-Fi Controlled Dual DC Motor System with ESP32 and L298N Driver

Circuit Documentation

Summary

This circuit is designed to control two DC motors using an L298N motor driver module, powered by a 12V battery, and controlled by an ESP32 microcontroller. The ESP32 is programmed to initialize WiFi and print the MAC address to the serial monitor.

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. Battery 12V

    • Description: A 12V battery used to power the motor driver and the motors.
    • Pins: +, -
  3. ESP32 38 PINS

    • Description: A microcontroller with built-in WiFi and Bluetooth capabilities.
    • Pins: GND, 23, 22/SCL, 1, 2, 21/SDA, 19, 18, 5, 17/TX2, 16/RX2, 4, 0, 15, D1, D0, CLK, 3V3, EN, VP, VN, 34, 35, 32, 33, 25, 26, 27, 14, 12, 13, D2, D3, 11, 5V/VIN
  4. DC Motor (Motor 1)

    • Description: A DC motor controlled by the L298N motor driver.
    • Pins: pin 1, pin 2
  5. DC Motor (Motor 2)

    • Description: Another DC motor controlled by the L298N motor driver.
    • Pins: pin 1, pin 2

Wiring Details

L298N DC Motor Driver

Battery 12V

ESP32 38 PINS

DC Motor (Motor 1)

DC Motor (Motor 2)

Code Documentation

ESP32 Code

#include "WiFi.h"

void setup()
{
  Serial.begin(115200);
  WiFi.mode(WIFI_MODE_STA);
  Serial.println(WiFi.macAddress());
}

void loop()
{

}