This circuit integrates an Arduino UNO microcontroller with a line sensor and two DC motors through an L298N DC motor driver. The system is powered by an 18650 Li-Ion battery. The Arduino UNO is responsible for processing the signals from the line sensor and controlling the DC motors via the motor driver based on the sensor inputs.
5V
connected to Line Sensor +5v
GND
connected to Line Sensor GND
, L298N Motor Driver GND
, and 18650 Li-Ion Battery Negative
Vin
connected to L298N Motor Driver 12V
and 18650 Li-Ion Battery Positive
A0 - A5
connected to Line Sensor pins 2 - 7
respectivelyD11
connected to L298N Motor Driver IN1
D10
connected to L298N Motor Driver IN2
D9
connected to L298N Motor Driver IN3
D8
connected to L298N Motor Driver IN4
D6
connected to L298N Motor Driver ENA
D5
connected to L298N Motor Driver ENB
+5v
connected to Arduino UNO 5V
GND
connected to Arduino UNO GND
2 - 7
connected to Arduino UNO A0 - A5
respectivelyGND
connected to Arduino UNO GND
and 18650 Li-Ion Battery Negative
12V
connected to Arduino UNO Vin
and 18650 Li-Ion Battery Positive
IN1 - IN4
connected to Arduino UNO D11 - D8
respectivelyENA
connected to Arduino UNO D6
ENB
connected to Arduino UNO D5
OUT1
connected to DC Motor (Instance 1) pin 2
OUT2
connected to DC Motor (Instance 1) pin 1
OUT3
connected to DC Motor (Instance 2) pin 2
OUT4
connected to DC Motor (Instance 2) pin 1
pin 1
connected to L298N Motor Driver OUT2
pin 2
connected to L298N Motor Driver OUT1
pin 1
connected to L298N Motor Driver OUT4
pin 2
connected to L298N Motor Driver OUT3
Positive
connected to Arduino UNO Vin
and L298N Motor Driver 12V
Negative
connected to Arduino UNO GND
and L298N Motor Driver GND
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
No additional code documentation was provided.