Arduino UNO-Based Line Following Robot with IR Sensors and Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, an H-bridge motor driver, two hobby gear motors, two IR sensors, and a 12V battery. The circuit is designed to control the motors based on the input from the IR sensors.
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
H-Bridge Motor Driver (ponte h)
- Description: A motor driver module used to control the direction and speed of motors.
- Pins: OUT4-Motor2, OUT3-Motor2, OUT2-Motor1, OUT1-Motor1, 5V, GND, 12V, IN3, IN1, IN2, IN4
Hobby Gear Motor (Motor amarillo motorreductor hobby)
- Description: A small DC motor with a gearbox for increased torque.
- Pins: vcc, GND
IR Sensor
- Description: An infrared sensor used for detecting objects.
- Pins: out, gnd, vcc
12V Battery
- Description: A power source providing 12V DC.
- Pins: +, -
Wiring Details
Arduino UNO
5V is connected to:
- vcc of IR Sensor 1
- vcc of IR Sensor 2
GND is connected to:
- gnd of IR Sensor 1
- gnd of IR Sensor 2
- GND of H-Bridge Motor Driver
- - of 12V Battery
Vin is connected to:
- 5V of H-Bridge Motor Driver
D8 is connected to:
- out of IR Sensor 2
D7 is connected to:
- out of IR Sensor 1
D6 is connected to:
- IN4 of H-Bridge Motor Driver
D5 is connected to:
- IN3 of H-Bridge Motor Driver
D4 is connected to:
- IN2 of H-Bridge Motor Driver
D3 is connected to:
- IN1 of H-Bridge Motor Driver
H-Bridge Motor Driver (ponte h)
OUT4-Motor2 is connected to:
- GND of Hobby Gear Motor 2
OUT3-Motor2 is connected to:
- vcc of Hobby Gear Motor 2
OUT2-Motor1 is connected to:
- GND of Hobby Gear Motor 1
OUT1-Motor1 is connected to:
- vcc of Hobby Gear Motor 1
12V is connected to:
- + of 12V Battery
Hobby Gear Motor 1
vcc is connected to:
- OUT1-Motor1 of H-Bridge Motor Driver
GND is connected to:
- OUT2-Motor1 of H-Bridge Motor Driver
Hobby Gear Motor 2
vcc is connected to:
- OUT3-Motor2 of H-Bridge Motor Driver
GND is connected to:
- OUT4-Motor2 of H-Bridge Motor Driver
IR Sensor 1
vcc is connected to:
- 5V of Arduino UNO
gnd is connected to:
- GND of Arduino UNO
out is connected to:
- D7 of Arduino UNO
IR Sensor 2
vcc is connected to:
- 5V of Arduino UNO
gnd is connected to:
- GND of Arduino UNO
out is connected to:
- D8 of Arduino UNO
12V Battery
+ is connected to:
- 12V of H-Bridge Motor Driver
- is connected to:
- GND of Arduino UNO
- GND of H-Bridge Motor Driver
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 Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including the components used, their connections, and the code running on the Arduino UNO microcontroller.