HC-05 Bluetooth
Module Setup Guide
Add wireless serial communication to your Arduino UNO. Pair with a phone, stream sensor data, or build a Bluetooth-controlled project — no soldering required, just a couple of jumper wires and two resistors.
Video walkthrough
Prefer to watch? These cover the same steps.
Community videos. Tishvi is not affiliated with creators.
How the HC-05 Works
It's a transparent wireless wire — nothing more.
The HC-05 is a Bluetooth-to-serial bridge. Once your phone or PC pairs with it over Bluetooth (using the Serial Port Profile, or "SPP"), anything you type on one side comes out the other side's RX/TX pins — exactly like a wired serial cable, just without the wire. Your Arduino sketch doesn't need to know anything about Bluetooth at all; it just reads and writes serial data as usual.
Class 2 Bluetooth
Onboard 3.3V LDO regulator
RXD needs level-shifting
6 pins total
What You Need
A small voltage divider protects the module's 3.3V RXD pin.
Tishvi Arduino UNO R3
Any variant (DIP or SMD). Must have Arduino IDE installed. See the UNO R3 Setup Guide first if needed.
HC-05 Bluetooth Module
6-pin breakout with heat-shrink tubing over the core module. Pinout (left to right): STATE, RXD, TXD, GND, VCC, EN. Has a push-button for AT mode on the front PCB.
6× Male-to-Male Jumper Wires
Or Female-to-Male depending on your breadboard setup.
2× Resistors (1kΩ and 2kΩ)
Used to build a voltage divider that drops the Arduino's 5V TX signal down to a safe level for the HC-05's 3.3V RXD pin. A small breadboard makes wiring these easier.
Optional: Phone or laptop with Bluetooth
To pair with the module and send commands. Android users: install "Serial Bluetooth Terminal" from the Play Store for Step 6.
Wiring to Arduino UNO R3
Uses SoftwareSerial on pins D2/D3 — keeps the USB serial pins free for uploading.
| HC-05 Pin | Connect to Arduino | Wire Colour | Notes |
|---|---|---|---|
| VCC | 5V | ■ Red | 3.6V–6V accepted; onboard regulator drops it to 3.3V internally |
| GND | GND | ■ Black | Any GND pin works |
| TXD | Pin D2 | ■ Blue | Wire directly — 3.3V is high enough for the Arduino's D2 input |
| RXD | Pin D3 (via divider) | ■ Purple | Never wire directly to 5V — see voltage divider below |
| STATE | Not connected | — | Optional: goes HIGH when paired. Wire to a spare pin to detect connection status. |
| EN | Not connected | — | Optional: pull HIGH to force AT mode. This module's push-button does the same job. |
Arduino D3 → R1 (1kΩ) → HC-05 RXD → R2 (2kΩ) → GND. This drops the 5V signal to about 3.3V, which HC-05 reads as a clean HIGH.Entering AT Command Mode
Configure the module's name, pairing PIN, and baud rate before first use.
Disconnect power from the module
Unplug the VCC wire, or unplug the Arduino from USB.
Press and hold the push-button
The small button on the top-left of the front PCB — hold it down and don't release yet.
Reconnect power while still holding the button
Plug the Arduino back into USB (or reconnect VCC). Keep holding for about 2 seconds, then release.
Check the LED blink pattern
A slow blink (about once every 2 seconds) means the module is in AT command mode. A fast blink (a couple of times a second) means it's back in normal data mode, waiting to pair.
Upload the AT Bridge sketch below
Then open Serial Monitor, set the baud rate to 38400 (the AT mode baud rate on most HC-05 firmware) and line ending to "Both NL & CR".
// HC-05 Bluetooth Module — AT Command Bridge // Use ONLY while the module is in AT mode (see steps above). // Serial Monitor: 38400 baud, line ending "Both NL & CR" // Wiring: VCC→5V | GND→GND | TXD→D2 | RXD→D3 (via divider) #include <SoftwareSerial.h> SoftwareSerial BTSerial(2, 3); // RX, TX void setup() { Serial.begin(38400); // Serial Monitor — AT mode baud rate BTSerial.begin(38400); // HC-05 AT mode baud rate Serial.println("AT bridge ready. Try typing: AT"); } void loop() { if (BTSerial.available()) Serial.write(BTSerial.read()); if (Serial.available()) BTSerial.write(Serial.read()); }
AT (should reply "OK") · AT+NAME=MyRobot (rename the device) · AT+PSWD=1234 (set pairing PIN) · AT+UART=9600,0,0 (set data-mode baud rate). Power-cycle the module normally (without holding the button) afterwards to return to data mode.Test the Connection — Serial Passthrough
Confirms the wiring works before building anything on top of it.
// HC-05 Bluetooth Module — Serial Passthrough Test // Tishvi Docs · Wiring: VCC→5V | GND→GND | TXD→D2 | RXD→D3 (via divider) #include <SoftwareSerial.h> SoftwareSerial BTSerial(2, 3); // RX, TX — D2←TXD, D3→RXD void setup() { Serial.begin(9600); BTSerial.begin(9600); // HC-05 default data-mode baud rate Serial.println("HC-05 ready. Pair with 'HC-05' on your phone (PIN 1234 or 0000)."); } void loop() { // Anything from the phone app → printed on Serial Monitor if (BTSerial.available()) { Serial.write(BTSerial.read()); } // Anything typed in Serial Monitor → sent to the phone app if (Serial.available()) { BTSerial.write(Serial.read()); } }
Pair With Your Phone
Standard Bluetooth pairing — the same way you'd pair headphones.
Install a Bluetooth serial terminal app
On Android, "Serial Bluetooth Terminal" (by Kai Morich) on the Play Store is free and widely used. iOS has similar apps such as "BLE Terminal" — note some iPhones can't use Classic Bluetooth SPP at all, so Android is more reliable for HC-05.
Power the module in normal mode
Power it up without holding the button — the LED should blink quickly, meaning it's discoverable and waiting to pair.
Scan and pair from your phone's Bluetooth settings
Look for a device named HC-05 (or whatever you set with AT+NAME). Enter the PIN 1234 or 0000 when prompted — these are the two common defaults.
Connect inside the terminal app
Open the Bluetooth terminal app, select the paired HC-05 device, and connect. The module's LED should switch to a slow blink, confirming an active connection.
Send a test message
Type anything and send it — it should appear on your Arduino's Serial Monitor if you uploaded the passthrough sketch from Step 5.
Project: Control an LED via Bluetooth
Send a single character from your phone to switch an LED on or off.
// HC-05 Bluetooth Module — LED Control // Send '1' to turn the LED on, '0' to turn it off, from any // Bluetooth serial terminal app. // Wiring: VCC→5V | GND→GND | TXD→D2 | RXD→D3 (via divider) | LED→pin 13 #include <SoftwareSerial.h> SoftwareSerial BTSerial(2, 3); // RX, TX const int ledPin = 13; void setup() { pinMode(ledPin, OUTPUT); Serial.begin(9600); BTSerial.begin(9600); Serial.println("Send '1' or '0' from your phone to control the LED."); } void loop() { if (BTSerial.available()) { char cmd = BTSerial.read(); if (cmd == '1') { digitalWrite(ledPin, HIGH); BTSerial.println("LED ON"); } else if (cmd == '0') { digitalWrite(ledPin, LOW); BTSerial.println("LED OFF"); } } }
1 or 0 (no quotes, no newline needed). To control more than an LED, replace digitalWrite(ledPin, ...) with a call to a servo, relay, or motor driver.Troubleshooting
Common problems and fixes.
LED blinks fast and phone can't find the device
Fast blinking means the module is in normal mode and should be discoverable — make sure your phone's Bluetooth is on and you're scanning for new devices, not just looking at already-paired ones.
AT commands get no response ("OK")
You must be in AT mode (slow LED blink, button held during power-up) and Serial Monitor must be set to 38400 baud with line ending "Both NL & CR". Wrong baud rate is the most common cause.
Serial Monitor shows garbled characters
Baud rate mismatch between your sketch and Serial Monitor's dropdown — AT mode uses 38400, data mode uses whatever you set with AT+UART (9600 by default).
Can't upload sketches to the Arduino
This happens if HC-05 is wired to pins 0/1 (the hardware Serial pins used for USB uploads). This guide uses SoftwareSerial on pins 2/3 specifically to avoid that conflict — double-check your wiring matches the table in Step 3.
Paired, but no data goes through
Check the voltage divider on the RXD line — a missing or wrong-value resistor is a common cause. Also confirm TXD/RXD aren't swapped: Arduino D2 reads from HC-05 TXD, and Arduino D3 (through the divider) writes to HC-05 RXD.
Module resets randomly or gets warm
Usually a wiring mistake — double-check VCC and GND aren't swapped. Also confirm you're powering from the Arduino's 5V pin, not 3.3V (the module needs at least 3.6V).
Download Sample Sketch
Get a ready-to-upload .ino file for the HC-05 Bluetooth module.
Download the complete sample sketch below — it includes wiring comments, the serial passthrough test, and the LED control commands, all in one file. Ready to upload without any changes.
.ino file. Only the built-in SoftwareSerial library is needed — no extra installs.Next Steps
What to build with wireless control next.
SG90 Servo + HC-05
Send angle commands from your phone to sweep a servo remotely — a simple Bluetooth remote-control starter project.
Stream Sensor Data over Bluetooth
Wire an HC-SR04 distance sensor alongside the HC-05 and stream live readings to your phone instead of the Serial Monitor.
Compare with ESP32's Built-in Bluetooth
Need Wi-Fi too, or a single board with Bluetooth built in? The ESP32 Dev Board covers both Classic Bluetooth and BLE natively.