ESP32 and L298N Motor Driver Controlled Battery-Powered Robotic Car
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to control multiple DC gearmotors using an ESP32 microcontroller and an L298N motor driver. The circuit is powered by a 12V battery and includes connections to various components to enable motor control.
Component List
12V Battery
- Description: Provides power to the circuit.
- Pins: +, -
Gearmotor DC Wheels Right
- Description: DC motor for the right wheel.
- Pins: PIN1, PIN2
Gearmotor DC Wheels Left
- Description: DC motor for the left wheel.
- Pins: PIN1, PIN2
ESP32 (30 pin)
- Description: Microcontroller used for controlling the motor driver.
- 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
- Description: Motor driver used to control the 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
Wiring Details
12V Battery
- + is connected to 12V on the L298N DC motor driver.
- - is connected to GND on the L298N DC motor driver and GND on the ESP32.
Gearmotor DC Wheels Right
- PIN1 is connected to OUT2 on the L298N DC motor driver.
- PIN2 is connected to OUT1 on the L298N DC motor driver.
Gearmotor DC Wheels Left
- PIN1 is connected to OUT3 on the L298N DC motor driver.
- PIN2 is connected to OUT4 on the L298N DC motor driver.
ESP32 (30 pin)
- GND is connected to GND on the L298N DC motor driver and - on the 12V Battery.
- Vin is connected to 5V on the L298N DC motor driver.
- D14 is connected to IN1 on the L298N DC motor driver.
- D27 is connected to IN2 on the L298N DC motor driver.
- D26 is connected to IN3 on the L298N DC motor driver.
- D25 is connected to IN4 on the L298N DC motor driver.
- D33 is connected to ENB on the L298N DC motor driver.
L298N DC Motor Driver
- OUT1 is connected to PIN2 on the right Gearmotor DC Wheels and PIN1 on the left Gearmotor DC Wheels.
- OUT2 is connected to PIN1 on the right Gearmotor DC Wheels and PIN2 on the left Gearmotor DC Wheels.
- OUT3 is connected to PIN1 on the left Gearmotor DC Wheels and PIN2 on the right Gearmotor DC Wheels.
- OUT4 is connected to PIN2 on the left Gearmotor DC Wheels and PIN1 on the right Gearmotor DC Wheels.
- 12V is connected to + on the 12V Battery.
- GND is connected to - on the 12V Battery and GND on the ESP32.
- 5V is connected to Vin on the ESP32.
- IN1 is connected to D14 on the ESP32.
- IN2 is connected to D27 on the ESP32.
- IN3 is connected to D26 on the ESP32.
- IN4 is connected to D25 on the ESP32.
- ENB is connected to D33 on the ESP32.
Code
No code is provided for this circuit.