WiFi-Controlled Robotic Vehicle with ESP32-CAM and Ultrasonic Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates a variety of components including microcontrollers, sensors, motors, and power management devices to create a complex system capable of wireless communication, motion control, and distance measurement. The primary microcontroller is an Arduino Mega 2560, which interfaces with an ESP32-CAM module and an ESP8266 ESP-03 WiFi module for wireless connectivity. The circuit also includes servomotors, DC mini metal gear motors, ultrasonic sensors, and motor drivers to control movement and measure distances. A voltage regulator ensures stable power supply to certain components, and a toggle switch controls the power flow in the circuit.
Component List
- ESP32-CAM: A camera module with WiFi capabilities that can be used for image processing and IoT applications.
- Servomotor SG90 (x2): Small and lightweight servos for precise control of motion.
- HC-SR04 Ultrasonic Sensor (x2): Sensors that measure distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
- DC Mini Metal Gear Motor (x5): Compact and durable geared motors for driving mechanical parts.
- Battery AAx6 9v: A battery pack providing a 9V power source for the circuit.
- Motor Driver 2 Channel (x3): Modules that control the direction and speed of motors.
- Arduino Mega 2560: A microcontroller board based on the ATmega2560, with numerous digital and analog I/O pins.
- Toggle Switch SPST: A single-pole single-throw switch to control the power supply.
- ESP8266 ESP-03 WiFi Module: A WiFi module that provides internet connectivity to microcontroller-based projects.
- Voltage Regulator: A device that maintains a constant voltage level to the load.
Wiring Details
ESP32-CAM
- 5V: Power supply
- GND: Ground connection
- IO Pins: General purpose I/O
- VOT: Output trigger signal
- VOR: Output receiver signal
Servomotor SG90
- SIG: Signal input for controlling servo position
- VCC: Power supply
- GND: Ground connection
HC-SR04 Ultrasonic Sensor
- VCC: Power supply
- TRIG: Trigger pin to initiate the ultrasonic pulse
- ECHO: Echo pin to receive the reflected ultrasonic pulse
- GND: Ground connection
DC Mini Metal Gear Motor
- IN1, IN2: Motor control inputs
Battery AAx6 9v
- VCC: Positive terminal of the battery
- GND: Negative terminal of the battery
Motor Driver 2 Channel
- DIR A/B: Direction control for motor channels A and B
- PWM A/B: Pulse Width Modulation control for motor speed on channels A and B
- 5Vo: 5V output (if available)
- GND: Ground connection
- B+/B-/A+/A-: Motor connection outputs
- VM: Motor power supply input
Arduino Mega 2560
- Digital and Analog Pins: Used for interfacing with various components
- 5V: Power supply
- GND: Ground connection
Toggle Switch SPST
- L1: Input from the power source
- COM: Common terminal, connected to the circuit
ESP8266 ESP-03 WiFi Module
- TXD: Transmit data
- RXD: Receive data
- VCC: Power supply
- GND: Ground connection
Voltage Regulator
- IN: Input voltage
- OUT: Regulated output voltage
- GND: Ground connection
Documented Code
Arduino Mega 2560 - sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code for the Arduino Mega 2560 is a template with empty setup and loop functions. This code should be expanded with the necessary initialization and operational logic to control the components connected to the Arduino.
Additional Files
- documentation.txt: This file is mentioned but no content was provided. It is intended to contain additional documentation related to the code.
The code documentation is minimal due to the lack of specific operational details. For a complete documentation, the actual functional code needs to be provided.