ESP32-Controlled Robotics Platform with L298N Motor Driver and Servo Actuation
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to control multiple DC motors and servos using an ESP32 microcontroller. The ESP32 is responsible for driving a L298N DC motor driver, which in turn controls four DC motors. Additionally, the ESP32 sends PWM signals to four servos. Power management is handled by a step-down buck converter that steps down the voltage from a 12V 7Ah battery to a lower voltage suitable for the servos. The battery also directly supplies the L298N motor driver and the ESP32 through a 5V/VIN connection.
Component List
ESP32 38 PINS
- Microcontroller with WiFi and Bluetooth capabilities.
- It has a variety of GPIO pins for interfacing with other components.
L298N DC Motor Driver
- A module capable of driving up to two DC motors.
- It has pins for motor outputs, power supply, and control inputs from the ESP32.
DC Motor (x4)
- Standard DC motors controlled by the L298N motor driver.
Step Down Buck Converter
- A power supply module that steps down the voltage from the battery to a lower level suitable for the servos.
12V 7Ah Battery
- The primary power source for the circuit, providing 12V to the motor driver and the buck converter.
Servo (x4)
- Servos that are controlled by PWM signals from the ESP32.
Wiring Details
ESP32 38 PINS
- GND connected to the ground of the battery, buck converter, and motor driver.
- Pin 23 connected to ENB on the motor driver.
- Pin 22/SCL connected to ENA on the motor driver.
- Pin 19 connected to IN4 on the motor driver.
- Pin 18 connected to IN3 on the motor driver.
- Pin 17/TX2 connected to IN2 on the motor driver.
- Pin 16/RX2 connected to IN1 on the motor driver.
- Pin 33 connected to the pulse pin of one servo.
- Pin 25 connected to the pulse pin of another servo.
- Pin 26 connected to the pulse pin of another servo.
- Pin 27 connected to the pulse pin of another servo.
- 5V/VIN connected to the 5V pin on the motor driver.
L298N DC Motor Driver
- OUT1 and OUT2 connected to two DC motors.
- OUT3 and OUT4 connected to two other DC motors.
- 12V connected to the 12V+ of the battery.
- GND connected to the ground of the battery.
DC Motors
- Each motor has two pins connected to the respective OUT pins on the motor driver.
Step Down Buck Converter
- IN + connected to the 12V+ of the battery.
- IN - GND connected to the ground of the battery.
- OUT + connected to the VCC pins of all servos.
- OUT - GND connected to the GND pins of all servos.
12V 7Ah Battery
- 12V + connected to the motor driver and buck converter.
- 12V - connected to the ground of the motor driver and buck converter.
Servos
- Each servo has a VCC connected to the OUT + of the buck converter.
- Each servo has a GND connected to the OUT - GND of the buck converter.
- Each servo has a pulse pin connected to a GPIO pin on the ESP32.
Documented Code
There is no code provided for the microcontroller. The documentation of the code would typically include details on the setup and loop functions, the initialization of pins, and the logic for controlling the motors and servos based on inputs or programmed behavior. Since no code is available, this section cannot be completed. If code becomes available, it should be documented here with comments explaining the functionality of each section of the code.