ESP32 and L298N Motor Driver Controlled Robotic System with Wi-Fi and Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to control multiple 12V geared motors, a servo motor, and a water pump using an ESP32 microcontroller. The circuit includes a motor driver (L298N), a voltage regulator, a 5V relay, and a battery as the power source.
Component List
L298N DC Motor Driver
- Description: Dual H-Bridge motor driver for controlling 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
12V Geared Motor
- Description: High torque motor for various applications.
- Pins: Terminal 1, Terminal 2
Battery
- Description: Power source for the circuit.
- Pins: -, +
Voltage Regulator
- Description: Regulates voltage to a stable 5V output.
- Pins: GND, IN, OUT
ESP32
- Description: Microcontroller with Wi-Fi and Bluetooth capabilities.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
Tower Pro SG90 Servo
- Description: Small servo motor for precise control.
- Pins: Signal, +5V, GND
Water Pump
- Description: Pump for moving water.
- Pins: VCC, GND
5V Relay
- Description: Relay for switching high power devices.
- Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
Wiring Details
L298N DC Motor Driver
- IN1 connected to ESP32 D25
- IN2 connected to ESP32 D26
- IN3 connected to ESP32 D14
- IN4 connected to ESP32 D27
- ENA connected to ESP32 D5
- ENB connected to ESP32 D18
- GND connected to ESP32 GND, Battery -, Tower Pro SG90 Servo GND, Voltage Regulator GND, 5V Relay Normally Closed, Water Pump GND
- 5V connected to ESP32 VIN, 5V Relay VCC
- 12V connected to Battery +, Voltage Regulator IN
- OUT1 connected to 12V Geared Motor Terminal 2 (two motors)
- OUT2 connected to 12V Geared Motor Terminal 1 (two motors)
- OUT3 connected to 12V Geared Motor Terminal 2 (two motors)
- OUT4 connected to 12V Geared Motor Terminal 1 (two motors)
12V Geared Motor
- Terminal 1 connected to L298N DC Motor Driver OUT2 (two motors), L298N DC Motor Driver OUT4 (two motors)
- Terminal 2 connected to L298N DC Motor Driver OUT1 (two motors), L298N DC Motor Driver OUT3 (two motors)
Battery
- - connected to ESP32 GND, Tower Pro SG90 Servo GND, Voltage Regulator GND, 5V Relay Normally Closed, L298N DC Motor Driver GND, Water Pump GND
- + connected to Voltage Regulator IN, L298N DC Motor Driver 12V
Voltage Regulator
- GND connected to ESP32 GND, Battery -, Tower Pro SG90 Servo GND, 5V Relay Normally Closed, L298N DC Motor Driver GND, Water Pump GND
- IN connected to Battery +, L298N DC Motor Driver 12V
- OUT connected to Tower Pro SG90 Servo +5V, 5V Relay Common terminal
ESP32
- D25 connected to L298N DC Motor Driver IN1
- D26 connected to L298N DC Motor Driver IN2
- D27 connected to L298N DC Motor Driver IN4
- D14 connected to L298N DC Motor Driver IN3
- D5 connected to L298N DC Motor Driver ENA
- D18 connected to L298N DC Motor Driver ENB
- D19 connected to Tower Pro SG90 Servo Signal
- D21 connected to 5V Relay In
- GND connected to Battery -, Tower Pro SG90 Servo GND, Voltage Regulator GND, 5V Relay Normally Closed, L298N DC Motor Driver GND, Water Pump GND
- VIN connected to 5V Relay VCC, L298N DC Motor Driver 5V
Tower Pro SG90 Servo
- Signal connected to ESP32 D19
- +5V connected to Voltage Regulator OUT, 5V Relay Common terminal
- GND connected to ESP32 GND, Battery -, Voltage Regulator GND, 5V Relay Normally Closed, L298N DC Motor Driver GND, Water Pump GND
Water Pump
- VCC connected to 5V Relay Normally Open
- GND connected to ESP32 GND, Battery -, Tower Pro SG90 Servo GND, Voltage Regulator GND, 5V Relay Normally Closed, L298N DC Motor Driver GND
5V Relay
- Normally Open connected to Water Pump VCC
- Common terminal connected to Voltage Regulator OUT, Tower Pro SG90 Servo +5V
- Normally Closed connected to ESP32 GND, Battery -, Tower Pro SG90 Servo GND, Voltage Regulator GND, L298N DC Motor Driver GND, Water Pump GND
- In connected to ESP32 D21
- GND connected to ESP32 GND, Battery -, Tower Pro SG90 Servo GND, Voltage Regulator GND, L298N DC Motor Driver GND, Water Pump GND
- VCC connected to ESP32 VIN, L298N DC Motor Driver 5V
Code
No code is provided for this circuit.