ESP32-Powered Obstacle Avoidance Robot with IR and Ultrasonic Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question appears to be a sensor and control system powered by a single 18650 Li-Ion battery. The battery's voltage is managed by a TP4056 charging module and then stepped up by an MT3608 boost converter to power various components, including an ESP32 microcontroller, a TCRT 5000 IR sensor, an HC-SR04 ultrasonic sensor, and an MG996R servo motor. The ESP32 is responsible for processing signals from the sensors and controlling the servo motor.
Component List
18650 Li-Ion Battery
- Description: A rechargeable lithium-ion battery cell.
- Purpose: Provides power to the circuit.
MT3608 Boost Converter
- Description: A step-up voltage regulator that boosts the input voltage to a higher level.
- Purpose: Steps up the voltage from the TP4056 to power the components.
TP4056 Charging Module
- Description: A lithium battery charging module with battery protection.
- Purpose: Charges the 18650 Li-Ion battery and provides a stable output voltage.
ESP32 Wroom Dev Kit
- Description: A development board with an ESP32 microcontroller, which is a powerful Wi-Fi and Bluetooth enabled MCU.
- Purpose: Acts as the central processing unit for the circuit, interfacing with sensors and controlling the servo motor.
TCRT 5000 IR Sensor
- Description: An infrared reflective sensor that includes both an IR emitter and phototransistor.
- Purpose: Detects the presence of objects or surface changes.
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor that can measure distances by emitting ultrasonic waves and measuring the time taken for the echo to return.
- Purpose: Measures distances to objects in front of the sensor.
MG996R Servo Motor
- Description: A high-torque digital servo motor.
- Purpose: Provides precise control of mechanical movement in response to the microcontroller's commands.
Wiring Details
18650 Li-Ion Battery
- Positive to TP4056 B+
- Negative to TP4056 B-
MT3608 Boost Converter
- VIN+ from TP4056 OUT+
- VIN- from TP4056 OUT-
- VOUT+ to MG996R VCC, TCRT 5000 IR SENSOR VCC, HC-SR04 Ultrasonic Sensor VCC, ESP32 V5
- VOUT- to ESP32 GND, MG996R GND
TP4056 Charging Module
- B+ from 18650 Li-Ion Positive
- B- from 18650 Li-Ion Negative
- OUT+ to MT3608 VIN+
- OUT- to MT3608 VIN-
ESP32 Wroom Dev Kit
- V5 from MT3608 VOUT+
- GND to MT3608 VOUT-, TCRT 5000 IR SENSOR GND, HC-SR04 Ultrasonic Sensor GND
- GPIO 27 to MG996R SIG
- GPIO 14 to TCRT 5000 IR SENSOR DO, HC-SR04 Ultrasonic Sensor ECHO
- GPIO 13 to HC-SR04 Ultrasonic Sensor TRIG
TCRT 5000 IR SENSOR
- VCC from MT3608 VOUT+
- GND to ESP32 GND
- DO to ESP32 GPIO 14
HC-SR04 Ultrasonic Sensor
- VCC from MT3608 VOUT+
- TRIG to ESP32 GPIO 13
- ECHO to ESP32 GPIO 14
- GND to ESP32 GND
MG996R Servo Motor
- VCC from MT3608 VOUT+
- GND to ESP32 GND
- SIG to ESP32 GPIO 27
Documented Code
No code was provided for the microcontroller. For this circuit to function, the ESP32 would require embedded code to handle input from the TCRT 5000 IR sensor and HC-SR04 ultrasonic sensor, as well as to control the MG996R servo motor based on the sensor inputs. The code would typically initialize the sensors, read their outputs, and then apply logic to determine the servo's position. Since no code is available, this section cannot be completed.