/ HC-05 Bluetooth Module Guide
← All Guides
🌐 Translate:
⏱ 25 min 🔌 4 wires + 2 resistors ✅ Beginner

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.

Arduino HC-05: Bluetooth Module Configurator & AT Commands
Paul Marriott - CHANNEL of STUFF · YouTube
▶ YouTube
HC-05 Bluetooth Module with Arduino — MIT App Inventor
BINARYUPDATES · YouTube
▶ YouTube

Community videos. Tishvi is not affiliated with creators.

1

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.

📡
Range
~10m line-of-sight
Class 2 Bluetooth
⚡
Voltage
3.6V – 6V DC
Onboard 3.3V LDO regulator
🔻
Logic Level
3.3V TTL
RXD needs level-shifting
🔌
Pins
STATE, RXD, TXD, GND, VCC, EN
6 pins total
💡
This module has an onboard push-button on the front PCB — hold it while powering up to enter AT command mode for configuration, without any extra wiring to the EN pin. See Step 4.
2

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.

3

Wiring to Arduino UNO R3

Uses SoftwareSerial on pins D2/D3 — keeps the USB serial pins free for uploading.

ARDUINO UNO R3 5V GND D2 D3 R1 1kΩ R2 2kΩ to GND HC-05 (Carrier Board) 2.4GHz PCB Antenna BTN HC-05 CORE STA RXD TXD GND VCC EN VCC (Red) GND (Black) D2 ← TXD (Blue) D3 → RXD via divider STATE & EN — optional, not required for basic use
HC-05 PinConnect to ArduinoWire ColourNotes
VCC5V■ Red3.6V–6V accepted; onboard regulator drops it to 3.3V internally
GNDGND■ BlackAny GND pin works
TXDPin D2■ BlueWire directly — 3.3V is high enough for the Arduino's D2 input
RXDPin D3 (via divider)■ PurpleNever wire directly to 5V — see voltage divider below
STATENot connected—Optional: goes HIGH when paired. Wire to a spare pin to detect connection status.
ENNot connected—Optional: pull HIGH to force AT mode. This module's push-button does the same job.
⚠️
RXD needs a voltage divider. The HC-05's logic level is 3.3V, but the Arduino's TX pin outputs 5V. Feeding 5V straight into RXD can damage the module over time. Build a simple divider with two resistors: 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.
💡
TXD doesn't need a divider — the HC-05's 3.3V output is still recognised as HIGH by the Arduino's 5V-logic input pins.
4

Entering AT Command Mode

Configure the module's name, pairing PIN, and baud rate before first use.

1

Disconnect power from the module

Unplug the VCC wire, or unplug the Arduino from USB.

2

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.

3

Reconnect power while still holding the button

Plug the Arduino back into USB (or reconnect VCC). Keep holding for about 2 seconds, then release.

4

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.

5

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".

hc05_at_bridge.ino
// 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());
}
ℹ️
Useful AT commands: 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.
5

Test the Connection — Serial Passthrough

Confirms the wiring works before building anything on top of it.

hc05_passthrough.ino
// 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());
  }
}
✅
Upload this, open Serial Monitor at 9600 baud, then pair your phone with the HC-05 (Step 6) and send a message from a Bluetooth terminal app. If it shows up in Serial Monitor, your wiring is correct.
6

Pair With Your Phone

Standard Bluetooth pairing — the same way you'd pair headphones.

1

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.

2

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.

3

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.

4

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.

5

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.

💡
Each phone can only actively connect to one HC-05 at a time (it's a point-to-point SPP link, not a broadcast). Disconnect from one project before pairing with another.
7

Project: Control an LED via Bluetooth

Send a single character from your phone to switch an LED on or off.

hc05_led_control.ino
// 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");
    }
  }
}
💡
In your Bluetooth terminal app, send just the character 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.
8

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.

📄
hc05_bluetooth_sample.ino
Serial passthrough · LED control commands · SoftwareSerial (no extra libraries)
⬇ Download .ino
💡
How to open: In Arduino IDE go to File → Open and select the downloaded .ino file. Only the built-in SoftwareSerial library is needed — no extra installs.