Arduino and ESP32 CAM-Based Solar-Powered Robotic Vehicle with Ultrasonic and IR Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates various components including an Arduino UNO, ESP32 CAM, motors, sensors, and other peripherals. The circuit is designed to perform specific tasks as defined by the embedded code running on the microcontrollers.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
ESP32 CAM
- Description: A low-cost development board with a camera module.
- Pins: 5V, GND, GPIO12, GPIO13, GPIO15, GPIO14, GPIO2, GPIO4, 3.3V, GPIO16, GPIO0, 3.3V / 5V / P_OUT, GPIO3 / RX, GPIO1 / TX
Hobby Gearmotor with 48:1 gearbox
- Description: A small DC motor with a 48:1 gearbox.
- Pins: pin 1, pin 2
HC-SR04 Ultrasonic Sensor
- Description: A sensor used for distance measurement.
- Pins: VCC, TRIG, ECHO, GND
IR Sensor
- Description: An infrared sensor used for object detection.
- Pins: out, gnd, vcc
Buzzer
- Description: An electronic device that emits sound.
- Pins: PIN, GND
IRFZ44N
- Description: A power MOSFET.
- Pins: Gate, Drain, Source
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver.
- 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
Tower Pro SG90 Servo
- Description: A small servo motor.
- Pins: Signal, +5V, GND
Solar Panel
- Description: A device that converts sunlight into electrical energy.
- Pins: +, -
Battery 12V
- Description: A 12V battery.
- Pins: +, -
Wiring Details
Arduino UNO
- Vin: Connected to VCC of HC-SR04 Ultrasonic Sensor, +5V of Tower Pro SG90 Servo, and 5V of L298N DC Motor Driver.
- GND: Connected to GND of HC-SR04 Ultrasonic Sensor, GND of Tower Pro SG90 Servo, pin 1 of Hobby Gearmotor with 48:1 gearbox, GND of L298N DC Motor Driver, - of Solar Panel, and - of Battery 12V.
- 3.3V: Connected to vcc of IR Sensor.
- 5V: Connected to 5V of ESP32 CAM.
- D12: Connected to out of IR Sensor.
- D11: Connected to ECHO of HC-SR04 Ultrasonic Sensor.
- D10: Connected to TRIG of HC-SR04 Ultrasonic Sensor.
- D9: Connected to PIN of Buzzer.
- D8: Connected to Gate of IRFZ44N.
- D7: Connected to IN4 of L298N DC Motor Driver.
- D6: Connected to IN3 of L298N DC Motor Driver.
- D5: Connected to IN1 of L298N DC Motor Driver.
- D4: Connected to IN2 of L298N DC Motor Driver.
- D3: Connected to Signal of Tower Pro SG90 Servo.
- D1: Connected to GPIO3 / RX of ESP32 CAM.
- D0: Connected to GPIO1 / TX of ESP32 CAM.
ESP32 CAM
- 5V: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO, GND of Buzzer, and gnd of IR Sensor.
- GPIO3 / RX: Connected to D1 of Arduino UNO.
- GPIO1 / TX: Connected to D0 of Arduino UNO.
Hobby Gearmotor with 48:1 gearbox
- pin 1: Connected to GND of Arduino UNO and OUT1 of L298N DC Motor Driver.
- pin 2: Connected to OUT2 of L298N DC Motor Driver and Drain of IRFZ44N.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to Vin of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- ECHO: Connected to D11 of Arduino UNO.
- TRIG: Connected to D10 of Arduino UNO.
IR Sensor
- out: Connected to D12 of Arduino UNO.
- gnd: Connected to GND of ESP32 CAM.
- vcc: Connected to 3.3V of Arduino UNO.
Buzzer
- PIN: Connected to D9 of Arduino UNO.
- GND: Connected to GND of ESP32 CAM.
IRFZ44N
- Gate: Connected to D8 of Arduino UNO.
- Drain: Connected to pin 2 of Hobby Gearmotor with 48:1 gearbox.
- Source: Connected to + of Solar Panel and + of Battery 12V.
L298N DC Motor Driver
- 12V: Connected to + of Solar Panel and + of Battery 12V.
- GND: Connected to GND of Arduino UNO.
- 5V: Connected to Vin of Arduino UNO.
- OUT1: Connected to pin 1 of Hobby Gearmotor with 48:1 gearbox.
- OUT2: Connected to pin 2 of Hobby Gearmotor with 48:1 gearbox.
- OUT3: Connected to pin 2 of Hobby Gearmotor with 48:1 gearbox.
- OUT4: Connected to pin 1 of Hobby Gearmotor with 48:1 gearbox.
- IN1: Connected to D5 of Arduino UNO.
- IN2: Connected to D4 of Arduino UNO.
- IN3: Connected to D6 of Arduino UNO.
- IN4: Connected to D7 of Arduino UNO.
- ENA: Connected to +5V-J1 of L298N DC Motor Driver.
- ENB: Connected to +5V-J2 of L298N DC Motor Driver.
Tower Pro SG90 Servo
- Signal: Connected to D3 of Arduino UNO.
- +5V: Connected to Vin of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
Solar Panel
- +: Connected to 12V of L298N DC Motor Driver and Source of IRFZ44N.
- -: Connected to GND of Arduino UNO.
Battery 12V
- +: Connected to 12V of L298N DC Motor Driver and Source of IRFZ44N.
- -: Connected to GND of Arduino UNO.
Documented Code
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
ESP32 CAM Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This documentation provides a comprehensive overview of the circuit, including the components used, their wiring details, and the embedded code running on the microcontrollers.