ESP32 and L298N Motor Driver Controlled Robotic System with Ultrasonic Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes various components such as DC motors, a motor driver, a battery, an ESP32 microcontroller, a rocker switch, a micro servo, and an ultrasonic sensor. The circuit is designed to control the motors and servo using the ESP32, with power supplied by a 12V battery and controlled via a rocker switch.
Component List
DC Motor
- Description: A standard DC motor.
- Pins: pin 1, pin 2
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver that allows control of two 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
Battery 12V
- Description: A 12V battery used to power the circuit.
- Pins: +, -
ESP32 38 PINS
- Description: A microcontroller with 38 pins, used for controlling various components in the circuit.
- Pins: GND, G23, G22, TXD, RXD, G21, G19, G18, G5, G17, G16, G4, G0, G2, G15, SDI, SD0, CLK, 3V3, EN, SP, SN, G34, G35, G32, 33, G25, G26, G27, G14, G12, G13, SD2, SD3, 5V
Rocker Switch
- Description: A simple on/off switch.
- Pins: 1, 2
Micro Servo 9G
- Description: A small servo motor.
- Pins: GND, +5V, PWM
Ultrasonic Sensor
- Description: A sensor used to measure distance using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
Wiring Details
DC Motor 1
- Pin 1 connected to L298N DC Motor Driver OUT4
- Pin 2 connected to L298N DC Motor Driver OUT3
DC Motor 2
- Pin 1 connected to L298N DC Motor Driver OUT2
- Pin 2 connected to L298N DC Motor Driver OUT1
L298N DC Motor Driver
- OUT1 connected to DC Motor 2 Pin 2
- OUT2 connected to DC Motor 2 Pin 1
- OUT3 connected to DC Motor 1 Pin 2
- OUT4 connected to DC Motor 1 Pin 1
- 12V connected to Rocker Switch Pin 1
- GND connected to Battery 12V -
- 5V connected to Micro Servo 9G +5V and ESP32 38 PINS 5V
- IN1 connected to ESP32 38 PINS G26
- IN2 connected to ESP32 38 PINS G27
- IN3 connected to ESP32 38 PINS G14
- IN4 connected to ESP32 38 PINS G12
Battery 12V
- + connected to Rocker Switch Pin 2
- - connected to L298N DC Motor Driver GND
ESP32 38 PINS
- 5V connected to L298N DC Motor Driver 5V and Micro Servo 9G +5V
- GND connected to Micro Servo 9G GND and Ultrasonic Sensor GND
- G26 connected to L298N DC Motor Driver IN1
- G27 connected to L298N DC Motor Driver IN2
- G14 connected to L298N DC Motor Driver IN3
- G12 connected to L298N DC Motor Driver IN4
- G17 connected to Ultrasonic Sensor Trigger
- G16 connected to Ultrasonic Sensor Echo
- 3V3 connected to Ultrasonic Sensor +VCC
- G32 connected to Micro Servo 9G PWM
Rocker Switch
- Pin 1 connected to L298N DC Motor Driver 12V
- Pin 2 connected to Battery 12V +
Micro Servo 9G
- GND connected to ESP32 38 PINS GND
- +5V connected to L298N DC Motor Driver 5V and ESP32 38 PINS 5V
- PWM connected to ESP32 38 PINS G32
Ultrasonic Sensor
- GND connected to ESP32 38 PINS GND
- +VCC connected to ESP32 38 PINS 3V3
- Trigger connected to ESP32 38 PINS G17
- Echo connected to ESP32 38 PINS G16
Code
No code provided for this circuit.