Circuit Documentation
Summary
This circuit is designed to control two DC motors using an Arduino UNO microcontroller and an L298N DC motor driver. The circuit also includes an HC-05 Bluetooth module for wireless communication, allowing remote control of the motors. A 9V battery is used to power the motor driver, which in turn powers the motors. The Arduino UNO is powered through its Vin pin, which can accept the 9V from the battery, regulated down to 5V for the board's operation.
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 capable of driving two DC motors or one stepper motor.
- It has two enable inputs and four direction inputs, allowing for full control over the motor's speed and direction.
HC-05 Bluetooth Module
- A wireless communication module that allows for serial communication over Bluetooth.
- It can be used to pair with other Bluetooth-enabled devices like smartphones or computers.
Motor Amarillo Motorreductor Hobby (x2)
- A yellow hobby gearmotor that is commonly used in robotics and DIY projects.
- It operates at a nominal voltage and provides a good balance between speed and torque.
Gearmotor DC / Motorreductor (x2)
- A DC gearmotor that is similar in function to the hobby motorreductor.
- It is designed for applications requiring a high torque output.
Battery 9V
- A standard 9V battery used to provide power to the circuit.
- It is connected to the motor driver and the Arduino UNO to power the motors and the microcontroller.
Wiring Details
Arduino UNO
5Vconnected to HC-05 Bluetooth ModuleVCCGNDconnected to HC-05 Bluetooth ModuleGND, L298N DC Motor DriverGND, and Battery 9VGNDVinconnected to L298N DC Motor Driver5VD10connected to L298N DC Motor DriverENBD9connected to L298N DC Motor DriverIN4D8connected to L298N DC Motor DriverIN2D6connected to L298N DC Motor DriverIN1D5connected to L298N DC Motor DriverENAD4connected to HC-05 Bluetooth ModuleTXDD3connected to HC-05 Bluetooth ModuleRXD
L298N DC Motor Driver
OUT1connected to Gearmotor DC / MotorreductorPin2and Motor Amarillo Motorreductor HobbyvccOUT2connected to Gearmotor DC / MotorreductorPin1and Motor Amarillo Motorreductor HobbyGND12Vconnected to Battery 9VVCCOUT3connected to Motor Amarillo Motorreductor Hobbyvccand Gearmotor DC / MotorreductorPin2OUT4connected to Motor Amarillo Motorreductor HobbyGNDand Gearmotor DC / MotorreductorPin1
HC-05 Bluetooth Module
VCCconnected to Arduino UNO5VGNDconnected to Arduino UNOGNDTXDconnected to Arduino UNOD4RXDconnected to Arduino UNOD3
Motors
- Both Motor Amarillo Motorreductor Hobby and Gearmotor DC / Motorreductor have their
vccandGNDpins connected to the corresponding outputs of the L298N DC Motor Driver.
Battery 9V
VCCconnected to L298N DC Motor Driver12VGNDconnected to Arduino UNOGNDand L298N DC Motor DriverGND
Documented Code
Arduino UNO - sketch.ino
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 to control the motors or communicate with the Bluetooth module. The user will need to implement the setup and loop functions to initialize the motor driver and Bluetooth module and to handle the motor control logic.
