Arduino Leonardo-Based Line Following Robot with TCRT-5000 IR Sensors and L298N Motor Driver
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes multiple TCRT-5000 IR sensors, an L298N Dual Motor Driver Module, an Arduino Leonardo, a 7.4V battery, DC Mini Metal Gear Motors, and a rocker switch. The circuit is designed to interface the IR sensors with the Arduino for input, control motors via the motor driver, and power the system using a 7.4V battery.
Component List
TCRT-5000 IR sensor
- Description: Infrared sensor used for proximity detection.
- Pins: 5V, GND, D0, A0
L298N 2A Dual Motor Driver Module with PWM Control
- Description: Motor driver module used to control the speed and direction of two DC motors.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT4, OUT3, ENA, IN1, IN2, IN3, ENB, IN4
Arduino Leonardo (Rev3b)
- Description: Microcontroller board based on the ATmega32u4.
- Pins: D0/RX, D1/TX, D2/SDA, D3 PWM/SCL, D4/A6, D5 PWM, D6 PWM/A7, D7, n.c., IOREF, RESET, 3V3, 5V, GND, VIN, A0, A1, A2, A3, A4, A5, D8/A8, D9 PWM/A9, D10 PWM/A10, D11 PWM, D12/A11, D13 PWM, AREF, SDA, SCL
7.4V Battery
- Description: Power source for the circuit.
- Pins: +, -
DC Mini Metal Gear Motor
- Description: Small DC motor with metal gears.
- Pins: IN1, IN2
Rocker Switch
- Description: Switch used to control the power supply.
- Pins: output, input
Wiring Details
TCRT-5000 IR sensor
- GND connected to GND of Arduino Leonardo.
- 5V connected to 5V of Arduino Leonardo.
- A0 of the first sensor connected to A0 of Arduino Leonardo.
- A0 of the second sensor connected to A1 of Arduino Leonardo.
- A0 of the third sensor connected to A3 of Arduino Leonardo.
- A0 of the fourth sensor connected to A2 of Arduino Leonardo.
L298N 2A Dual Motor Driver Module with PWM Control
- 5V connected to 5V of Arduino Leonardo.
- GND connected to GND of Arduino Leonardo.
- 12V connected to input of the rocker switch.
- OUT1 connected to IN1 of the first DC Mini Metal Gear Motor.
- OUT2 connected to IN2 of the first DC Mini Metal Gear Motor.
- OUT4 connected to IN1 of the second DC Mini Metal Gear Motor.
- OUT3 connected to IN2 of the second DC Mini Metal Gear Motor.
- IN1 connected to D8/A8 of Arduino Leonardo.
- IN2 connected to D9 PWM/A9 of Arduino Leonardo.
- IN3 connected to D10 PWM/A10 of Arduino Leonardo.
- IN4 connected to D11 PWM of Arduino Leonardo.
Arduino Leonardo (Rev3b)
- GND connected to GND of TCRT-5000 IR sensors and L298N Motor Driver.
- 5V connected to 5V of TCRT-5000 IR sensors and L298N Motor Driver.
- A0 connected to A0 of the first TCRT-5000 IR sensor.
- A1 connected to A0 of the second TCRT-5000 IR sensor.
- A2 connected to A0 of the fourth TCRT-5000 IR sensor.
- A3 connected to A0 of the third TCRT-5000 IR sensor.
- D8/A8 connected to IN1 of L298N Motor Driver.
- D9 PWM/A9 connected to IN2 of L298N Motor Driver.
- D10 PWM/A10 connected to IN3 of L298N Motor Driver.
- D11 PWM connected to IN4 of L298N Motor Driver.
7.4V Battery
- - connected to GND of Arduino Leonardo.
- + connected to output of the rocker switch.
DC Mini Metal Gear Motor
- IN1 of the first motor connected to OUT1 of L298N Motor Driver.
- IN2 of the first motor connected to OUT2 of L298N Motor Driver.
- IN1 of the second motor connected to OUT4 of L298N Motor Driver.
- IN2 of the second motor connected to OUT3 of L298N Motor Driver.
Rocker Switch
- input connected to 12V of L298N Motor Driver.
- output connected to + of 7.4V Battery.
Code
No code provided for this circuit.