Fun & Interactive Projects
Arduino UNO Bluetooth-Controlled Servo Motor System
Control a servo motor wirelessly from your smartphone using an HC-05 Bluetooth module. Perfect for robotics beginners, STEM learners, and anyone building smart automation projects.
01 — What You Need
Components Required
Gather these parts before starting. The HC-05 and HC-06 are interchangeable; both will work with this project.
02 — Concept
How It Works
The project uses serial communication over Bluetooth to pass angle values from a smartphone to the Arduino, which then drives the servo motor to that exact position using PWM signals.
- The HC-05 Bluetooth module pairs with your smartphone.
- You send an angle (e.g.
90) via a Bluetooth terminal app. - The Arduino reads the value through its hardware serial port (D0/D1).
- The
Servo.write(angle)function rotates the motor to that position.
03 — Visual
Circuit Diagram
Arduino UNO + HC-05 + SG90 Servo — Connection Overview
04 — Connections
Wiring Connections
HC-05 Bluetooth Module → Arduino UNO
| HC-05 Pin | Arduino Pin | Wire Colour | Note |
|---|---|---|---|
| VCC | 5V | Red | Power supply |
| GND | GND | Black | Common ground |
| TX | D0 (RX) | Green | HC-05 transmits → Arduino receives |
| RX | D1 (TX) | Yellow | Arduino transmits → HC-05 receives |
SG90 Servo Motor → Arduino UNO
| Servo Wire | Arduino Pin | Wire Colour | Note |
|---|---|---|---|
| Signal | D9 (PWM) | Orange | PWM control signal |
| Power | 5V | Red | Use external PSU for MG996R |
| Ground | GND | Brown/Black | Common ground |
05 — Sketch
Arduino Code
Upload this sketch using Arduino IDE. Disconnect the HC-05 TX/RX wires from D0/D1 before uploading, then reconnect after flashing.
/* Arduino UNO Bluetooth-Controlled Servo Motor System MakeMindz.com | makemindz.com/2026/02/arduino-uno-bluetooth-controlled-servo.html HC-05 connected to D0 (RX) and D1 (TX) SG90 Servo signal wire connected to D9 Send angle values 0–180 via Bluetooth terminal app */ #include <Servo.h> Servo myServo; const int servoPin = 9; // PWM pin for servo signal const int bluetoothRx = 0; // Arduino RX ← HC-05 TX const int bluetoothTx = 1; // Arduino TX → HC-05 RX void setup() { Serial.begin(9600); // Match HC-05 baud rate myServo.attach(servoPin); // Attach servo to D9 myServo.write(90); // Start at 90° (centre) } void loop() { if (Serial.available() > 0) { // Data received? int angle = Serial.parseInt(); // Parse integer angle if (angle >= 0 && angle <= 180) { // Valid range check myServo.write(angle); // Move servo } } }
06 — Build Guide
Step-by-Step Instructions
Install Arduino IDE & Servo Library
Download Arduino IDE from arduino.cc. The Servo.h library is included by default — no extra installation needed.
Wire the HC-05 Bluetooth Module
Connect HC-05 VCC → 5V, GND → GND, TX → D0, RX → D1 as shown in the wiring table above. Use a voltage divider (1kΩ + 2kΩ) on the RX line if your HC-05 is 3.3V only.
⚠️ Important: Disconnect D0/D1 wires before uploading code or the upload will fail.
Connect the SG90 Servo Motor
Plug the servo's orange/yellow signal wire to D9, red wire to 5V, and brown/black wire to GND. For the MG996R, use an external 5–6V power supply to avoid Arduino brownout.
Upload the Sketch
Open Arduino IDE, paste the code above, select Board: Arduino UNO and the correct COM port, then click Upload. Reconnect D0/D1 after uploading completes.
Pair HC-05 with Your Smartphone
Power the Arduino. On your phone, go to Bluetooth settings and pair with HC-05. The default pairing PIN is 1234 (or 0000).
💡 Tip: Use the "Serial Bluetooth Terminal" app (Android) or "Bluetooth Screen" (iOS) for sending commands.
Send Angle Commands
Open the Bluetooth terminal app, connect to HC-05, and type an angle between 0 and 180 followed by Enter. Watch the servo rotate to that exact position in real time!
🎯 Try: Send 0, then 90, then 180 to sweep the full range.
08 — Try It Online
Simulation Links
Run in Cirkit Designer
Simulate this full circuit online — no hardware needed. Wire the components, paste the sketch, and test Bluetooth angle commands virtually.
Wokwi Online Simulator
Alternatively, use Wokwi for a browser-based Arduino + HC-05 + Servo simulation with live Serial Monitor.
▶ Open Wokwi09 — Results
Learning Outcomes & Applications
🎓 What You'll Learn
- Bluetooth serial communication
- Serial data parsing with Arduino
- Servo PWM motor control
- Mobile-based automation
- Embedded C++ programming
🚀 Real-World Applications
- Wireless robotic arm
- Remote camera positioning
- Smart door lock
- DIY home automation
- STEM robotics education
10 — Explore More
Related MakeMindz Projects
Robotics
Arduino UNO Smart Obstacle Avoiding Robot
Robotics
Autonomous Obstacle Avoidance Robot with Servo
Robotics
Bluetooth Controlled 4WD Robot Car
IoT & Smart Systems
IoT Weather Monitoring System (NodeMCU + DHT11)
Fun & Interactive
Pong Game with Arduino UNO & OLED Display
Fun & Interactive
Interactive Touch & Distance Sensing System
Robotics / IoT
ESP32 4WD Robot Car with Dual L298N
Industrial / Automation
Automatic Pill Dispenser with Servo & Buzzer
Comments
Post a Comment