Skip to content
A

Bluetooth

Interfacing HC-05 Bluetooth Module with Arduino Uno

What is the HC-05 Bluetooth Module?

HC-05 Bluetooth Module practical reference

What is the HC-05 Bluetooth module?

The HC-05 adds Bluetooth Classic serial communication to a microcontroller project. It exposes a UART interface on one side and a wireless Serial Port Profile (SPP) connection on the other, so bytes sent by a paired phone or computer can be read by your Arduino or ESP32 firmware. That makes it useful for robot commands, configuration tools, simple telemetry, and wireless serial debugging.

What you can—and cannot—do with it

Use an HC-05 when your project needs a transparent serial link to a compatible Bluetooth Classic SPP client, commonly an Android phone or a PC with a serial terminal. It does not provide Wi-Fi, and it is not a BLE module. iPhones and iPads generally cannot use the HC-05 through ordinary BLE apps because SPP is a Bluetooth Classic profile. If you need iOS support or a modern BLE app, choose a BLE-capable module or use the ESP32's built-in Bluetooth capability where suitable.

HC-05 pinout explained

  • VCC: power input on the breakout. Many breakout boards accept about 5 V because they include a regulator; the bare radio module itself is a 3.3 V device. Verify the board you own.
  • GND: common ground with the microcontroller.
  • TXD: data transmitted by the HC-05; connect it to the host UART's RX pin.
  • RXD: data received by the HC-05; connect it to the host UART's TX pin, but protect this 3.3 V input from a 5 V signal.
  • KEY/EN: used to enter AT command mode on supported boards; the exact method depends on breakout and firmware.
  • STATE: optional status output on some boards; it is not required for basic serial communication.

Electrical safety: the detail that matters most

The HC-05 breakout's VCC regulator does not mean its UART pins are 5 V tolerant. On a 5 V Arduino Uno, place a resistor divider or logic-level shifter between Uno TX and HC-05 RXD. A common divider uses 1 kΩ from the Uno TX signal to HC-05 RXD and 2 kΩ from HC-05 RXD to GND, reducing the 5 V signal to roughly 3.3 V. HC-05 TXD's 3.3 V output is normally read as HIGH by the Uno. With an ESP32, both sides use 3.3 V logic, so direct UART connections are usually appropriate.

Wiring overview

UART crosses over: module TXD → microcontroller RX, and microcontroller TX → module RXD. Connect GND to GND, and power the breakout according to its documentation. For the Arduino Uno example, use SoftwareSerial on pins 10 (RX) and 11 (TX); for ESP32, use UART2 on GPIO16 (RX2) and GPIO17 (TX2). These are example pin choices, not mandatory pins.

First connection: pair and test

  1. Upload the matching board example below.
  2. Power the HC-05 and wait for its status LED to indicate it is discoverable; blink patterns vary by firmware.
  3. On a compatible phone or PC, open Bluetooth settings and pair with the module. Many units ship with a default PIN such as 1234 or 0000, but this can vary and should be changed where the firmware supports it.
  4. Open a Bluetooth SPP serial-terminal app and connect to the paired device.
  5. Send a short line of text. The sample firmware forwards received Bluetooth bytes to the USB Serial Monitor and forwards USB serial input back to Bluetooth.

UART settings and AT command mode

Many HC-05 units use 9600 baud in data mode, but do not assume every board has the same configuration. AT command mode can use a different baud rate and may require holding KEY/EN high or pressing a breakout button while powering up. Commands and responses differ between firmware versions. Enter AT mode only using the procedure for your specific board, and verify the baud rate before troubleshooting normal data mode.

Common problems and fixes

  • Pairs but sends no data: confirm the Bluetooth terminal is connected using SPP, check TX/RX crossover, and match the configured baud rate.
  • No device appears: check power, wait for discoverability, and inspect the status LED; some units may already be connected to another host.
  • Garbled characters: make sure the HC-05 UART baud rate matches the firmware's begin() setting.
  • Uno resets or behaves unpredictably: check the power supply and avoid wiring the HC-05 RXD directly to a 5 V TX signal.
  • AT commands fail: the module may not be in AT mode, or the firmware expects a different command-mode baud rate.
  • Cannot connect from an iPhone: this is usually a Bluetooth Classic SPP compatibility limitation, not a wiring fault.

HC-05 vs HC-06 vs BLE modules

The HC-05 is commonly configurable as master or slave, depending on firmware; HC-06 modules are generally slave-only. Both are Bluetooth Classic serial modules. BLE modules such as HM-10-style devices use a different Bluetooth mode and application protocol, so code and phone-app compatibility are not interchangeable. Check the exact module revision before relying on master-mode support or a particular AT command.

Can the HC-05 be simulated?

A circuit simulator can help you practise the wiring and inspect the microcontroller-side UART code, but a normal Arduino circuit simulation does not reproduce real Bluetooth discovery, pairing, or an external phone's SPP connection unless it explicitly implements those behaviors. Treat a wiring-only simulation as a learning aid, not proof that wireless communication works. Validate pairing and two-way serial data with the physical module.

Project ideas

  • Bluetooth-controlled robot with command characters such as F, B, L, R, and S.
  • Wireless configuration menu for a standalone Arduino.
  • Telemetry stream that sends sensor readings to an Android serial terminal.
  • A PC-to-microcontroller serial bridge for short-range testing.

For motor projects, use a motor driver and a suitable external motor supply; do not power motors from the HC-05 or a microcontroller GPIO.

Quick checklist before powering up

  • Confirm whether your breakout accepts 5 V at VCC.
  • Protect HC-05 RXD from 5 V Uno TX logic.
  • Cross TX and RX, and connect grounds together.
  • Use the same UART baud rate at both ends.
  • Pair using a Bluetooth Classic SPP-compatible client.
  • Test real wireless behavior on hardware; wiring simulation alone cannot verify pairing.

Key specifications

  • Bluetooth type: Bluetooth Classic with Serial Port Profile (SPP), not Bluetooth Low Energy.
  • Host interface: UART serial; TX/RX must be crossed between module and controller.
  • UART logic: The bare radio module uses 3.3 V logic; protect RXD from 5 V Arduino TX signals.
  • Breakout power: Many breakout boards accept 5 V at VCC via onboard regulation, but the exact board must be checked.
  • Common data baud: 9600 baud is common in data mode; configuration varies by firmware and module.
  • Client compatibility: Use a Bluetooth Classic SPP-compatible client; ordinary BLE-only apps and iOS SPP support are not interchangeable.

Pinout and connection notes

The HC-05 is Bluetooth Classic SPP, not BLE. Many breakout boards accept 5 V at VCC, but UART RXD remains a 3.3 V logic input unless the board explicitly includes level shifting. Verify your exact board and use a compatible client.

  • Power: Breakout input voltage is board-dependent; follow the exact module documentation.
  • Ground: Common ground with the host controller.
  • UART transmit: Connect to the controller UART RX input.
  • UART receive: Connect to the controller UART TX output through suitable level shifting if the host is 5 V logic.
  • Mode control: Optional; AT-command-mode entry depends on breakout and firmware revision.
  • Connection status: Optional status output on some breakout variants.

Integration checklist

  1. Confirm the exact part number and breakout-board revision.
  2. Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
  3. Check controller pin assignments and bus address or interface mode against the example code.
  4. Power up with external loads disconnected, then test signals before full integration.
  5. If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.

Troubleshooting and reproducibility

Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.

Setting Up HC-05 Bluetooth Module with Arduino Uno

Library

SoftwareSerial by Arduino built-in

Built into the Arduino IDE — no install needed

Wiring

Component pinArduino Uno pinNote
VCC5VSome HC-05 breakouts are 3.3V-only on RX — check your module's silkscreen
GNDGND
TXDPin 10 (SoftwareSerial RX)HC-05 TXD → Uno RX
RXDPin 11 (SoftwareSerial TX)Use a voltage divider (or logic-level shifter) — HC-05 RXD is 3.3V logic, the Uno's TX pin outputs 5V

Swipe sideways to see every column →

C++

HC-05 RXD is not 5V-tolerant — feeding it 5V directly from the Uno's TX pin can damage it over time. Use a simple resistor divider (e.g. 1kΩ/2kΩ) on that line. VCC can usually take 5V, but double-check your specific breakout.

Related Components

Related Guides & Projects