Arduino UNO-Based Wi-Fi Controlled Robotic Vehicle with IR and Ultrasonic Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller interfacing with various sensors, motors, and a WiFi module. The circuit is designed to control motors, read sensor data, and communicate wirelessly. Key components include IR sensors, a motor driver, a rocker switch, an ultrasonic sensor, a servo motor, and a WiFi module.
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
IR Sensor
- Description: Infrared sensor for obstacle detection.
- Pins: out, gnd, vcc
Motor (Yellow Gear Motor)
- Description: Hobby motor with a gearbox.
- Pins: vcc, GND
L298N DC Motor Driver
- Description: 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
Rocker Switch
- Description: A simple on/off switch.
- Pins: output, input
HC-SR04 Ultrasonic Sensor
- Description: Ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND
18650 Li-ion Battery x 2
- Description: Rechargeable lithium-ion batteries.
- Pins: +, -
Micro Servo 9G
- Description: Small servo motor.
- Pins: GND, +5V, PWM
WiFi Module ESP8266-01
- Description: WiFi module for wireless communication.
- Pins: RX, GPIO0, GPIO2, GND, +3V3, Reset, CH-PD Chip power down, TX
Wiring Details
Arduino UNO
- GND: Connected to GND of L298N DC motor driver, both IR sensors, HC-SR04 Ultrasonic Sensor, Micro servo 9G, and 18650 Li-ion Battery.
- 3.3V: Connected to +3V3 and CH-PD Chip power down of WiFi module ESP8266-01.
- 5V: Connected to vcc of both IR sensors, VCC of HC-SR04 Ultrasonic Sensor, and +5V of Micro servo 9G.
- Vin: Connected to 12V of L298N DC motor driver and output of rocker switch.
- A0: Connected to out of the first IR sensor.
- A1: Connected to out of the second IR sensor.
- A2: Connected to ECHO of HC-SR04 Ultrasonic Sensor.
- A3: Connected to TRIG of HC-SR04 Ultrasonic Sensor.
- A5: Connected to PWM of Micro servo 9G.
- D10: Connected to ENA of L298N DC motor driver.
- D9: Connected to IN1 of L298N DC motor driver.
- D8: Connected to IN2 of L298N DC motor driver.
- D7: Connected to IN3 of L298N DC motor driver.
- D6: Connected to IN4 of L298N DC motor driver.
- D5: Connected to ENB of L298N DC motor driver.
- D1: Connected to RX of WiFi module ESP8266-01.
- D0: Connected to TX of WiFi module ESP8266-01.
IR Sensor (First)
- out: Connected to A0 of Arduino UNO.
- gnd: Connected to GND of Arduino UNO.
- vcc: Connected to 5V of Arduino UNO.
IR Sensor (Second)
- out: Connected to A1 of Arduino UNO.
- gnd: Connected to GND of Arduino UNO.
- vcc: Connected to 5V of Arduino UNO.
Motor (Yellow Gear Motor)
- vcc: Connected to OUT2 and OUT3 of L298N DC motor driver.
- GND: Connected to OUT1 and OUT4 of L298N DC motor driver.
L298N DC Motor Driver
- GND: Connected to GND of Arduino UNO.
- 12V: Connected to Vin of Arduino UNO and output of rocker switch.
- ENA: Connected to D10 of Arduino UNO.
- IN1: Connected to D9 of Arduino UNO.
- IN2: Connected to D8 of Arduino UNO.
- IN3: Connected to D7 of Arduino UNO.
- IN4: Connected to D6 of Arduino UNO.
- ENB: Connected to D5 of Arduino UNO.
- OUT1: Connected to GND of both motors.
- OUT2: Connected to vcc of both motors.
- OUT3: Connected to vcc of both motors.
- OUT4: Connected to GND of both motors.
Rocker Switch
- input: Connected to + of 18650 Li-ion Battery.
- output: Connected to 12V of L298N DC motor driver and Vin of Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 5V of Arduino UNO.
- TRIG: Connected to A3 of Arduino UNO.
- ECHO: Connected to A2 of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
18650 Li-ion Battery x 2
- +: Connected to input of rocker switch.
- -: Connected to GND of Arduino UNO.
Micro Servo 9G
- GND: Connected to GND of Arduino UNO.
- +5V: Connected to 5V of Arduino UNO.
- PWM: Connected to A5 of Arduino UNO.
WiFi Module ESP8266-01
- RX: Connected to D1 of Arduino UNO.
- TX: Connected to D0 of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- +3V3: Connected to 3.3V of Arduino UNO.
- CH-PD Chip power down: Connected to 3.3V of Arduino UNO.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a detailed component list, wiring details, and the code used in the Arduino UNO microcontroller.