ESP32-Based Wi-Fi Controlled Robotic Vehicle with Ultrasonic Sensor and Servo
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an ESP32 microcontroller interfacing with various components including a DC motor, a servo motor, an ultrasonic sensor, and an L298N motor driver. The ESP32 controls the motors and reads data from the ultrasonic sensor. Power is supplied by a 12V battery.
Component List
ESP32 38 PINS
- Description: A versatile microcontroller with Wi-Fi and Bluetooth capabilities.
- Pins: GND, 23, 22/SCL, 1, 2, 21/SDA, 19, 18, 5, 17/TX2, 16/RX2, 4, 0, 15, D1, D0, CLK, 3V3, EN, VP, VN, 34, 35, 32, 33, 25, 26, 27, 14, 12, 13, D2, D3, 11, 5V/VIN
DC Motor
- Description: A simple DC motor.
- Pins: pin 1, pin 2
DC Motor
- Description: A simple DC motor.
- Pins: pin 1, pin 2
Servo
- Description: A servo motor for precise control of angular position.
- Pins: GND, VCC, PWM
Ultrasonic Sensor
- Description: A sensor for measuring distance using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
L298N DC Motor Driver
- Description: A 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
Battery 12V
- Description: A 12V battery for powering the circuit.
- Pins: +, -
Wiring Details
ESP32 38 PINS
3V3 is connected to:
- VCC of the Servo
- +VCC of the Ultrasonic Sensor
35 is connected to:
- Echo of the Ultrasonic Sensor
32 is connected to:
- Trigger of the Ultrasonic Sensor
33 is connected to:
- IN4 of the L298N DC Motor Driver
25 is connected to:
- IN3 of the L298N DC Motor Driver
26 is connected to:
- IN2 of the L298N DC Motor Driver
27 is connected to:
- IN1 of the L298N DC Motor Driver
14 is connected to:
- ENA of the L298N DC Motor Driver
12 is connected to:
- ENB of the L298N DC Motor Driver
GND is connected to:
- GND of the Servo
- GND of the Ultrasonic Sensor
- GND of the L298N DC Motor Driver
-
- of the Battery 12V
13 is connected to:
- PWM of the Servo
5V/VIN is connected to:
- 5V of the L298N DC Motor Driver
DC Motor 1
pin 1 is connected to:
- OUT1 of the L298N DC Motor Driver
pin 2 is connected to:
- OUT2 of the L298N DC Motor Driver
DC Motor 2
pin 1 is connected to:
- OUT4 of the L298N DC Motor Driver
pin 2 is connected to:
- OUT3 of the L298N DC Motor Driver
Servo
VCC is connected to:
- 3V3 of the ESP32
GND is connected to:
- GND of the ESP32
- GND of the Battery 12V
PWM is connected to:
- 13 of the ESP32
Ultrasonic Sensor
+VCC is connected to:
- 3V3 of the ESP32
Trigger is connected to:
- 32 of the ESP32
Echo is connected to:
- 35 of the ESP32
GND is connected to:
- GND of the ESP32
- GND of the Battery 12V
L298N DC Motor Driver
IN1 is connected to:
- 27 of the ESP32
IN2 is connected to:
- 26 of the ESP32
IN3 is connected to:
- 25 of the ESP32
IN4 is connected to:
- 33 of the ESP32
ENA is connected to:
- 14 of the ESP32
ENB is connected to:
- 12 of the ESP32
5V is connected to:
- 5V/VIN of the ESP32
GND is connected to:
- GND of the ESP32
- GND of the Battery 12V
12V is connected to:
-
- of the Battery 12V
-
OUT1 is connected to:
- pin 1 of DC Motor 1
OUT2 is connected to:
- pin 2 of DC Motor 1
OUT3 is connected to:
- pin 2 of DC Motor 2
OUT4 is connected to:
- pin 1 of DC Motor 2
Battery 12V
+ is connected to:
- 12V of the L298N DC Motor Driver
- is connected to:
- GND of the ESP32
- GND of the Servo
- GND of the Ultrasonic Sensor
- GND of the L298N DC Motor Driver
Code
No code provided.