Arduino UNO Bluetooth-Controlled Robotic System with Servo and Geared Motors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, an L298N DC motor driver, a 12V battery, a 5V battery, a rocker switch, an HC-05 Bluetooth module, two MG996R servo motors, and two 12V geared motors. The circuit is designed to control the motors via the Arduino, with power supplied by the batteries and control signals managed through the Bluetooth module.
Component List
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
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver module.
- 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
12V Battery
- Description: A 12V power source.
- Pins: +, -
5V Battery
- Description: A 5V power source.
- Pins: +, -
Rocker Switch
- Description: A simple on/off switch.
- Pins: 1, 2
HC-05 Bluetooth Module
- Description: A Bluetooth module for wireless communication.
- Pins: Key, VCC, GND, TXD, RXD, State
Servo Motor MG996R
- Description: A high-torque servo motor.
- Pins: PMW, VCC 5V, GND
12V Geared Motor
- Description: A 12V motor with a gearbox.
- Pins: Terminal 1, Terminal 2
Wiring Details
Arduino UNO
- 5V connected to VCC of HC-05 Bluetooth Module
- GND connected to GND of HC-05 Bluetooth Module, GND of Servo Motor MG996R (both), GND of L298N DC Motor Driver, and pin 1 of Rocker Switch
- Vin connected to 5V of L298N DC Motor Driver
- D11 connected to IN4 of L298N DC Motor Driver
- D10 connected to IN3 of L298N DC Motor Driver
- D9 connected to IN2 of L298N DC Motor Driver
- D8 connected to IN1 of L298N DC Motor Driver
- D6 connected to PMW of Servo Motor MG996R
- D5 connected to PMW of Servo Motor MG996R
- D1 connected to RXD of HC-05 Bluetooth Module
- D0 connected to TXD of HC-05 Bluetooth Module
L298N DC Motor Driver
- GND connected to GND of Arduino UNO
- 5V connected to Vin of Arduino UNO
- IN4 connected to D11 of Arduino UNO
- IN3 connected to D10 of Arduino UNO
- IN2 connected to D9 of Arduino UNO
- IN1 connected to D8 of Arduino UNO
- OUT1 connected to Terminal 2 of 12V Geared Motor
- OUT2 connected to Terminal 1 of 12V Geared Motor
- OUT3 connected to Terminal 1 of 12V Geared Motor
- OUT4 connected to Terminal 2 of 12V Geared Motor
- 12V connected to + of 12V Battery
- ENA connected to +5V-J1 of L298N DC Motor Driver
- ENB connected to +5V-J2 of L298N DC Motor Driver
12V Battery
- + connected to 12V of L298N DC Motor Driver
- - connected to pin 2 of Rocker Switch
5V Battery
- + connected to VCC 5V of Servo Motor MG996R (both)
- - connected to pin 2 of Rocker Switch
Rocker Switch
- pin 1 connected to GND of Servo Motor MG996R (both), GND of Arduino UNO, and GND of L298N DC Motor Driver
- pin 2 connected to - of 12V Battery and - of 5V Battery
HC-05 Bluetooth Module
- VCC connected to 5V of Arduino UNO
- GND connected to GND of Arduino UNO
- RXD connected to D1 of Arduino UNO
- TXD connected to D0 of Arduino UNO
Servo Motor MG996R
- PMW connected to D6 of Arduino UNO
- VCC 5V connected to + of 5V Battery
- GND connected to pin 1 of Rocker Switch
Servo Motor MG996R
- PMW connected to D5 of Arduino UNO
- VCC 5V connected to + of 5V Battery
- GND connected to pin 1 of Rocker Switch
12V Geared Motor
- Terminal 2 connected to OUT1 of L298N DC Motor Driver
- Terminal 1 connected to OUT2 of L298N DC Motor Driver
12V Geared Motor
- Terminal 1 connected to OUT3 of L298N DC Motor Driver
- Terminal 2 connected to OUT4 of L298N DC Motor Driver
Documented Code
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 used to initialize any settings or configurations, and the loop function contains the main code that runs repeatedly.