Arduino UNO and L298N Motor Driver Bluetooth-Controlled Robot
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to control two DC motors using an Arduino UNO, an L298N DC motor driver, and an HC-05 Bluetooth module. The circuit is powered via a USB power source. The Arduino UNO is programmed to control the motor driver and communicate with the Bluetooth module.
Component List
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver that allows control of the speed and direction of two DC motors.
- Pins: 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
HC-05 Bluetooth Module
- Description: A Bluetooth module used for wireless communication.
- Pins: Key, VCC, GND, TXD, RXD, State
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
DC Mini Metal Gear Motor
- Description: A small DC motor with metal gears for increased torque.
- Pins: IN1, IN2
USB Power
- Description: A USB power source for providing power to the circuit.
- Pins: +, -
Wiring Details
L298N DC Motor Driver
- OUT1 connected to IN2 of the first DC Mini Metal Gear Motor
- OUT2 connected to IN1 of the first DC Mini Metal Gear Motor
- GND connected to GND of the Arduino UNO
- 5V connected to VCC of the HC-05 Bluetooth Module and 5V of the Arduino UNO
- OUT3 connected to IN2 of the second DC Mini Metal Gear Motor
- OUT4 connected to IN1 of the second DC Mini Metal Gear Motor
- IN1 connected to D8 of the Arduino UNO
- IN2 connected to D9 of the Arduino UNO
- IN3 connected to D10 of the Arduino UNO
- IN4 connected to D11 of the Arduino UNO
HC-05 Bluetooth Module
- VCC connected to 5V of the L298N DC Motor Driver and 5V of the Arduino UNO
- GND connected to GND of the Arduino UNO
- TXD connected to D0 of the Arduino UNO
- RXD connected to D1 of the Arduino UNO
Arduino UNO
- GND connected to GND of the L298N DC Motor Driver and GND of the HC-05 Bluetooth Module
- 5V connected to 5V of the L298N DC Motor Driver and VCC of the HC-05 Bluetooth Module
- D8 connected to IN1 of the L298N DC Motor Driver
- D9 connected to IN2 of the L298N DC Motor Driver
- D10 connected to IN3 of the L298N DC Motor Driver
- D11 connected to IN4 of the L298N DC Motor Driver
- D0 connected to TXD of the HC-05 Bluetooth Module
- D1 connected to RXD of the HC-05 Bluetooth Module
DC Mini Metal Gear Motor (First Motor)
- IN1 connected to OUT2 of the L298N DC Motor Driver
- IN2 connected to OUT1 of the L298N DC Motor Driver
DC Mini Metal Gear Motor (Second Motor)
- IN1 connected to OUT4 of the L298N DC Motor Driver
- IN2 connected to OUT3 of the L298N DC Motor Driver
Code Documentation
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup function is where you initialize your settings, and the loop function is where the main code runs repeatedly. You can add motor control and Bluetooth communication code here to achieve the desired functionality of your circuit.