This circuit is designed to control two DC Mini Metal Gear Motors using an L298N DC motor driver, which is interfaced with an Arduino Nano microcontroller. The Arduino Nano also connects to a 5 channel IR array for input and an HC-05 Bluetooth Module for wireless communication. Power is supplied by a 7.4v battery, which is controlled by a Rocker Switch and regulated by an XL6009E1 Boost Converter to ensure stable operation of the motor driver and the microcontroller.
+
, -
OUT1
, OUT2
, 12V
, GND
, 5V
, OUT3
, OUT4
, 5V-ENA-JMP-I
, 5V-ENA-JMP-O
, +5V-J1
, +5V-J2
, ENA
, IN1
, IN2
, IN3
, IN4
, ENB
A5
, A4
, A3
, A2
, A1
, VCC
, GND
D1/TX
, D0/RX
, RESET
, GND
, D2
, D3
, D4
, D5
, D6
, D7
, D8
, D9
, D10
, D11/MOSI
, D12/MISO
, VIN
, 5V
, A7
, A6
, A5
, A4
, A3
, A2
, A1
, A0
, AREF
, 3V3
, D13/SCK
IN1
, IN2
Key
, VCC
, GND
, TXD
, RXD
, State
1
, 2
IN+
, IN-
, OUT-
, OUT+
+
connected to Rocker Switch pin 1
-
connected to GND net (common ground)OUT1
connected to DC Mini Metal Gear Motor (1) IN2
OUT2
connected to DC Mini Metal Gear Motor (1) IN1
12V
connected to XL6009E1 Boost Converter OUT+
GND
connected to GND net (common ground)5V
connected to Arduino Nano VIN
OUT3
connected to DC Mini Metal Gear Motor (2) IN2
OUT4
connected to DC Mini Metal Gear Motor (2) IN1
ENA
connected to Arduino Nano D3
IN1
connected to Arduino Nano D4
IN2
connected to Arduino Nano D5
IN3
connected to Arduino Nano D7
IN4
connected to Arduino Nano D8
ENB
connected to Arduino Nano D9
A5
connected to Arduino Nano A4
A4
connected to Arduino Nano A3
A3
connected to Arduino Nano A2
A2
connected to Arduino Nano A1
A1
connected to Arduino Nano A0
VCC
connected to Arduino Nano D2
GND
connected to GND net (common ground)GND
connected to GND net (common ground)VIN
connected to L298N DC Motor Driver 5V
D3
connected to L298N DC Motor Driver ENA
D4
connected to L298N DC Motor Driver IN1
D5
connected to L298N DC Motor Driver IN2
D7
connected to L298N DC Motor Driver IN3
D8
connected to L298N DC Motor Driver IN4
D9
connected to L298N DC Motor Driver ENB
A4
connected to 5 Channel IR Array A5
A3
connected to 5 Channel IR Array A4
A2
connected to 5 Channel IR Array A3
A1
connected to 5 Channel IR Array A2
A0
connected to 5 Channel IR Array A1
D2
connected to 5 Channel IR Array VCC
D1/TX
connected to HC-05 Bluetooth Module RXD
D0/RX
connected to HC-05 Bluetooth Module TXD
5V
connected to HC-05 Bluetooth Module VCC
GND
connected to GND net (common ground)VCC
connected to Arduino Nano 5V
TXD
connected to Arduino Nano D0/RX
RXD
connected to Arduino Nano D1/TX
1
connected to 7.4v Battery +
2
connected to XL6009E1 Boost Converter IN+
IN+
connected to Rocker Switch 2
IN-
connected to GND net (common ground)OUT+
connected to L298N DC Motor Driver 12V
OUT-
connected to GND net (common ground)void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional code. It is expected that the user will fill in the setup and loop functions with the necessary code to control the motors via the L298N driver, read inputs from the IR array, and communicate with the HC-05 Bluetooth module.