Bluetooth-Controlled Dual DC Motor Driver with Servo Actuation
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control two DC motors and a servo motor through an Arduino UNO microcontroller. It includes a Bluetooth module for wireless communication and a motor driver to handle the high current required by the DC motors. The circuit is powered by a 12V battery, and the Arduino UNO regulates the 5V supply for the low-power components.
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 H-bridge circuits to allow for forward and reverse control of two motors.
DC Motor (x2)
- Standard DC motors for rotational motion.
- Each motor has two pins for power connection, allowing for bidirectional control.
Battery 12V
- A 12-volt battery providing the main power source for the motor driver and motors.
Bluetooth HC-06
- A Bluetooth module for wireless communication.
- It can be used for setting up a wireless serial connection with a smartphone or computer.
Servo
- A rotary actuator or linear actuator that allows for precise control of angular or linear position.
- It has three pins: power, ground, and signal (PWM).
Wiring Details
Arduino UNO
- GND connected to the common ground net.
- 5V output providing power to the Bluetooth HC-06, Servo, and L298N motor driver's 5V input.
- Digital Pins (D3, D4, D5, D6, D7, D8, D9, D11, D12) controlling the Bluetooth module, motor driver, and servo.
L298N DC Motor Driver
- GND connected to the common ground net.
- 12V input connected to the 12V battery.
- 5V input connected to the Arduino's 5V output.
- ENA, ENB connected to Arduino's digital pins for enabling motor control.
- IN1, IN2, IN3, IN4 connected to Arduino's digital pins for motor direction control.
- OUT1, OUT2, OUT3, OUT4 connected to the DC motors.
DC Motors
- Motor 1 Pins connected to OUT1 and OUT2 of the motor driver.
- Motor 2 Pins connected to OUT3 and OUT4 of the motor driver.
Battery 12V
- + connected to the 12V input of the motor driver.
- - connected to the common ground net.
Bluetooth HC-06
- VCC connected to the Arduino's 5V output.
- GND connected to the common ground net.
- TXD connected to Arduino's digital pin D3.
- RXD connected to Arduino's digital pin D4.
Servo
- VCC connected to the Arduino's 5V output.
- GND connected to the common ground net.
- PWM connected to Arduino's digital pin D9.
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The provided code is a template for the Arduino UNO microcontroller. The setup() function is called once when the microcontroller is first powered on or reset. The loop() function is called repeatedly and contains the main logic of the program. The actual implementation of the control logic for the motors and the Bluetooth communication needs to be added to this template.