Arduino-Controlled Obstacle-Avoiding Robot with IR and Ultrasonic Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components to perform a set of functions, which are not explicitly defined in the provided information. The circuit includes an Arduino UNO as the central microcontroller, two TCRT 5000 IR sensors for detecting proximity or measuring light intensity, an L298N DC motor driver to control two gearmotors, an HC-SR04 Ultrasonic Sensor for distance measurement, a rocker switch as a power control mechanism, and a power source consisting of two 18650 Li-ion batteries.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
TCRT 5000 IR SENSOR (x2)
- Reflective IR sensor with both analog and digital outputs
- Includes an infrared emitter and phototransistor in a leaded package which blocks visible light.
L298N DC motor driver
- Dual H-Bridge motor driver capable of driving a pair of DC motors or a stepper motor
- Provides up to 2A per channel with thermal overload protection.
Gearmotor DC / Motorreductor (x2)
- DC gearmotor used for applications requiring torque over speed
- Typically includes a DC motor and a gearbox.
HC-SR04 Ultrasonic Sensor
- Ultrasonic ranging module that provides 2cm to 400cm non-contact measurement functionality
- Operates on a 5V power supply with a triggering pulse of 10us.
18650 Li-ion Battery x 2
- Rechargeable lithium-ion battery cells
- Commonly used for portable electronics and electric vehicles.
Rocker Switch
- A simple on/off switch mechanism that rocks back and forth
- Often used to power the main circuit or a part of it.
Wiring Details
Arduino UNO
5Vconnected to the 5V power busGNDconnected to the ground busA0connected to TCRT 5000 IR SENSOR (Analog Output)A1connected to TCRT 5000 IR SENSOR (Analog Output)D10connected to HC-SR04 Ultrasonic Sensor (ECHO)D9connected to HC-SR04 Ultrasonic Sensor (TRIG)D5connected to L298N DC motor driver (IN1)D4connected to L298N DC motor driver (IN2)D3connected to L298N DC motor driver (IN3)D2connected to L298N DC motor driver (IN4)
TCRT 5000 IR SENSOR
VCCconnected to the 5V power busGNDconnected to the ground busAOconnected to Arduino UNO (A0 or A1)
L298N DC motor driver
5Vconnected to the 5V power busGNDconnected to the ground busIN1toIN4connected to Arduino UNO (D2 to D5)OUT1toOUT4connected to Gearmotor DC / Motorreductor
Gearmotor DC / Motorreductor
- One pin connected to L298N DC motor driver (OUT1 or OUT3)
- Other pin connected to L298N DC motor driver (OUT2 or OUT4)
HC-SR04 Ultrasonic Sensor
VCCconnected to the 5V power busGNDconnected to the ground busTRIGconnected to Arduino UNO (D9)ECHOconnected to Arduino UNO (D10)
18650 Li-ion Battery x 2
+connected to the rocker switch (input)-connected to the ground bus
Rocker Switch
inputconnected to 18650 Li-ion Battery x 2 (+)outputconnected to the 5V power bus
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:
}
Additional Notes
- The code provided for the Arduino UNO is a template with empty
setup()andloop()functions. Actual implementation details are required to fulfill the circuit's intended purpose. - The
documentation.txtfile is empty and does not provide additional information about the code's functionality.