Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Controlled Traffic Light and DC Motors with MT3608 Boost Converters

Image of ESP32-Controlled Traffic Light and DC Motors with MT3608 Boost Converters

Circuit Documentation

Summary

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.

Component List

Microcontroller

  • ESP32 (30 pin): A microcontroller with WiFi and Bluetooth capabilities, featuring a wide range of GPIO pins for interfacing with various components.

Motor Drivers

  • L298N DC motor driver: A dual H-bridge motor driver capable of driving two DC motors or one stepper motor.

Motors

  • MG996R: A high-torque servo motor used for precise angular movement.
  • DC Motor: A standard DC motor for rotational motion.

Power Modules

  • MT3608: A DC-DC step-up converter module used to increase the voltage level from the battery to the required level for the motor drivers and servo motor.

Power Supply

  • 4 x AAA Battery Mount: A battery holder for four AAA batteries, providing the power source for the circuit.

Output Devices

  • Traffic Light: A simple traffic light module with red, yellow, and green LEDs.

Wiring Details

ESP32 (30 pin)

  • 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)

L298N DC motor driver

  • 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 Motors

MT3608

  • VOUT+ 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 (-)

MG996R

  • 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)

4 x AAA Battery Mount

  • + connected to MT3608 modules (VIN+)
  • - connected to MT3608 modules (VIN-)

DC Motor

  • pin 1 and pin 2 connected to L298N DC motor driver (OUT1, OUT2, OUT3, OUT4)

Traffic Light

  • Green connected to ESP32 (D25)
  • Yellow connected to ESP32 (D26)
  • Red connected to ESP32 (D27)
  • GND connected to ESP32 (GND)

Documented Code

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.