This circuit is designed to control a traffic light and multiple DC motors using an ESP32 microcontroller and L298N motor drivers. The ESP32 is responsible for the logic control, sending signals to the traffic light and motor drivers. The MT3608 modules are used to step up the voltage from a 4 x AAA battery mount to power the L298N motor drivers and the servo motor. The MG996R servo motor is controlled directly by the ESP32. The DC motors are driven by the L298N motor drivers, which receive control signals from the ESP32.
D32
connected to L298N DC motor driver (5V input for logic)D25
connected to Traffic Light (Green LED control)D26
connected to Traffic Light (Yellow LED control)D27
connected to Traffic Light (Red LED control)D14
connected to L298N DC motor driver (IN1 control)GND
connected to Traffic Light (GND), L298N DC motor driver (GND), and MT3608 modules (GND)D23
connected to L298N DC motor driver (ENA control)D22
connected to L298N DC motor driver (IN2 control)D21
connected to L298N DC motor driver (ENB control)D19
connected to L298N DC motor driver (IN4 control)D18
connected to MG996R (Signal Line control)D5
connected to L298N DC motor driver (IN3 control)D4
connected to L298N DC motor driver (ENB control)D2
connected to L298N DC motor driver (IN4 control)D15
connected to L298N DC motor driver (IN3 control)5V
connected to ESP32 (D32) and MG996R (Vcc)GND
connected to ESP32 (GND), MT3608 modules (GND), and MG996R (GND)12V
connected to MT3608 modules (VOUT+)ENA
, IN1
, IN2
, ENB
, IN3
, IN4
connected to ESP32 (D23, D14, D22, D21, D15, D19 respectively)OUT1
, OUT2
, OUT3
, OUT4
connected to DC MotorsVOUT+
connected to L298N DC motor driver (12V input)VOUT-
connected to ESP32 (GND) and L298N DC motor driver (GND)VIN+
connected to 4 x AAA Battery Mount (+)VIN-
connected to 4 x AAA Battery Mount (-)Signal Line
connected to ESP32 (D18)Vcc
connected to L298N DC motor driver (5V)GND
connected to ESP32 (GND) and L298N DC motor driver (GND)+
connected to MT3608 modules (VIN+)-
connected to MT3608 modules (VIN-)pin 1
and pin 2
connected to L298N DC motor driver (OUT1, OUT2, OUT3, OUT4)Green
connected to ESP32 (D25)Yellow
connected to ESP32 (D26)Red
connected to ESP32 (D27)GND
connected to ESP32 (GND)No code was provided for the microcontroller. The documentation of the code would typically include the setup and loop functions for the ESP32, detailing how the GPIO pins are configured and how they control the traffic light and motors. It would also include any necessary libraries, functions, and routines to handle WiFi or Bluetooth functionalities if used in the circuit.