Arduino-Controlled Dual DC Motor Driver with Bluetooth Interface
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
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.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
L298N DC Motor Driver
- A dual H-bridge motor driver that can drive two DC motors or one bipolar stepper motor.
- It has 2 input terminals for the battery, 4 output terminals for the motors, and several control pins.
Motor Amarillo Motorreductor Hobby (x2)
- A yellow hobby gear motor that operates on a nominal voltage, typically around 5V to 6V.
- It has two terminals: one for the power supply (Vcc) and one for the ground (GND).
Battery 12V
- A 12V battery used to provide power to the circuit.
- It has a positive (+) and a negative (-) terminal.
HC-05 Bluetooth Module
- A Bluetooth module that can be used for wireless communication.
- It has pins for enabling (EN), power supply (VCC), ground (GND), transmit (TXD), receive (RXD), and state (STATE).
Wiring Details
Arduino UNO
5Vconnected to HC-05VCCGNDconnected to HC-05GND, L298NGND, and Battery12V-Vinconnected to L298N5VD5connected to L298NIN4D4connected to L298NIN3D3connected to L298NIN2D2connected to L298NIN1D1(TX) connected to HC-05RXDD0(RX) connected to HC-05TXD
L298N DC Motor Driver
12Vconnected to Battery12V+GNDconnected to Arduino UNOGNDand Battery12V-5Vconnected to Arduino UNOVinOUT1connected to Motor Amarillo Motorreductor HobbyGNDOUT2connected to Motor Amarillo Motorreductor HobbyVccOUT3connected to Motor Amarillo Motorreductor HobbyGNDOUT4connected to Motor Amarillo Motorreductor HobbyVccIN1connected to Arduino UNOD2IN2connected to Arduino UNOD3IN3connected to Arduino UNOD4IN4connected to Arduino UNOD5
Motor Amarillo Motorreductor Hobby
- One motor's
GNDconnected to L298NOUT1 - One motor's
Vccconnected to L298NOUT2 - The other motor's
GNDconnected to L298NOUT3 - The other motor's
Vccconnected to L298NOUT4
Battery 12V
+connected to L298N12V-connected to Arduino UNOGNDand L298NGND
HC-05 Bluetooth Module
VCCconnected to Arduino UNO5VGNDconnected to Arduino UNOGNDRXDconnected to Arduino UNOD1(TX)TXDconnected to Arduino UNOD0(RX)
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:
}
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.