This circuit is designed to control two DC motors using an Arduino UNO microcontroller and an L298N DC motor driver. The Arduino UNO is also interfaced with an HC-05 Bluetooth module for potential wireless control capabilities. The circuit is powered by a 12V battery, which supplies power to both the motor driver and the Arduino UNO. The Arduino UNO controls the motor driver by sending signals to the input pins of the L298N, which in turn drives the motors. Ground connections are shared among the Arduino, motor driver, motors, and the battery to complete the circuit.
5V
connected to HC-05 VCC
GND
connected to HC-05 GND
, L298N GND
, and Battery 12V
-
Vin
connected to L298N 5V
D5
connected to L298N IN4
D4
connected to L298N IN3
D3
connected to L298N IN2
D2
connected to L298N IN1
D1
(TX) connected to HC-05 RXD
D0
(RX) connected to HC-05 TXD
12V
connected to Battery 12V
+
GND
connected to Arduino UNO GND
and Battery 12V
-
5V
connected to Arduino UNO Vin
OUT1
connected to Motor Amarillo Motorreductor Hobby GND
OUT2
connected to Motor Amarillo Motorreductor Hobby Vcc
OUT3
connected to Motor Amarillo Motorreductor Hobby GND
OUT4
connected to Motor Amarillo Motorreductor Hobby Vcc
IN1
connected to Arduino UNO D2
IN2
connected to Arduino UNO D3
IN3
connected to Arduino UNO D4
IN4
connected to Arduino UNO D5
GND
connected to L298N OUT1
Vcc
connected to L298N OUT2
GND
connected to L298N OUT3
Vcc
connected to L298N OUT4
+
connected to L298N 12V
-
connected to Arduino UNO GND
and L298N GND
VCC
connected to Arduino UNO 5V
GND
connected to Arduino UNO GND
RXD
connected to Arduino UNO D1
(TX)TXD
connected to Arduino UNO D0
(RX)void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The code provided for the Arduino UNO is a template with empty setup and loop functions. This code needs to be filled in with the logic to control the motors via the L298N motor driver and to handle Bluetooth communication with the HC-05 module.