

This document provides a detailed overview of a circuit designed to control multiple motors and sensors using an ESP32 and an Arduino Leonardo. The circuit includes motor drivers, various sensors, and a GPS module. The ESP32 is used for Wi-Fi connectivity and communication with Firebase, while the Arduino Leonardo handles motor control and sensor data processing.
Motor and Wheels
vcc, GNDL298N DC Motor Driver
OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENBESP32
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, BOOTArduino Leonardo (Rev3b)
D0/RX, D1/TX, D2/SDA, D3 PWM/SCL, D4/A6, D5 PWM, D6 PWM/A7, D7, n.c., IOREF, RESET, 3V3, 5V, GND, VIN, A0, A1, A2, A3, A4, A5, D8/A8, D9 PWM/A9, D10 PWM/A10, D11 PWM, D12/A11, D13 PWM, AREF, SDA, SCLBattery 12V
+, -HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)
VCC, TRIG, ECHO, GNDServo
GND, VCC, PWMRAIN SENSOR
AO, DO, GRD, VCCMQ-2
GND, VCC, ANALOG, DigitalGPS NEO 6M
VCC, RX, TX, GNDvcc connected to OUT3 of L298N DC Motor Driver
GND connected to OUT4 of L298N DC Motor Driver
vcc connected to OUT1 of L298N DC Motor Driver
GND connected to OUT2 of L298N DC Motor Driver
vcc connected to OUT3 of L298N DC Motor Driver
GND connected to OUT4 of L298N DC Motor Driver
vcc connected to OUT1 of L298N DC Motor Driver
GND connected to OUT2 of L298N DC Motor Driver
+ of Battery 12V- of Battery 12VVIN of Arduino LeonardoD3 PWM/SCL of Arduino LeonardoD7 of Arduino Leonardo and DO of RAIN SENSORD8/A8 of Arduino Leonardo and Digital of MQ-2D10 PWM/A10 of Arduino LeonardoD11 PWM of Arduino LeonardoD5 PWM of Arduino Leonardo5V of L298N DC Motor DriverGND of Arduino Leonardo and GND of GPS NEO 6MRX of GPS NEO 6MTX of GPS NEO 6M5V of L298N DC Motor DriverENA of L298N DC Motor DriverIN1 of L298N DC Motor Driver and DO of RAIN SENSORIN2 of L298N DC Motor Driver and Digital of MQ-2IN3 of L298N DC Motor DriverIN4 of L298N DC Motor DriverENB of L298N DC Motor DriverRX of GPS NEO 6MTX of GPS NEO 6MTRIG of HC-SR04 Ultrasonic Distance SensorECHO of HC-SR04 Ultrasonic Distance SensorVCC of Servo, VCC of RAIN SENSOR, VCC of GPS NEO 6M, VCC of MQ-2, and VCC of HC-SR04 Ultrasonic Distance SensorGND of Servo, GRD of RAIN SENSOR, GND of HC-SR04 Ultrasonic Distance Sensor, and GND of MQ-2ANALOG of MQ-2AO of RAIN SENSORPWM of Servo12V of L298N DC Motor DriverGND of L298N DC Motor DriverD2/SDA of Arduino LeonardoD4/A6 of Arduino Leonardo5V of Arduino LeonardoGND of Arduino Leonardo5V of Arduino LeonardoD9 PWM/A9 of Arduino LeonardoGND of Arduino LeonardoD7 of Arduino Leonardo and IN1 of L298N DC Motor DriverGND of Arduino Leonardo5V of Arduino LeonardoA1 of Arduino LeonardoD8/A8 of Arduino Leonardo and IN2 of L298N DC Motor DriverGND of Arduino Leonardo5V of Arduino LeonardoA0 of Arduino Leonardo5V of Arduino LeonardoD1/TX of Arduino Leonardo and RX0 of ESP32D0/RX of Arduino Leonardo and TX0 of ESP32GND of Arduino