Embedded

Bluetooth Module Arduino

By CourseTron Team ·  7 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    ? Print / Save as PDF

    In short: The HC-05 is a UART-to-Bluetooth SPP bridge, so you wire its TXD/RXD across to the Arduino's serial pins (with a divider on the HC-05 RX), set a matching baud rate, and read bytes exactly as you would from a wired serial link — a phone app then drives your project wirelessly.

    Bluetooth is still the quickest way to put a smartphone in charge of an Arduino project, and the HC-05 module remains the workhorse for that job. It hides the entire Bluetooth stack behind a plain serial port, which means you never touch RF, pairing state machines, or the L2CAP layer — you just send and receive bytes. This guide explains how the link actually works, how to wire and configure it safely, and how to build a robust phone-controlled sketch.

    What the HC-05 actually is

    The HC-05 is a carrier board built around a Bluetooth 2.0+EDR chip (the CSR BC417) running the Serial Port Profile (SPP). SPP emulates an RS-232 cable over Bluetooth, so to your microcontroller the module looks like a UART peer. Data you write to the Arduino's serial transmit pin is modulated and broadcast; bytes arriving over the air appear on the module's TXD pin at the configured baud rate. Nothing about your firmware needs to know radio exists.

    The board accepts 3.6–6 V on its VCC pin (an onboard regulator drops it to 3.3 V), but the logic pins are strictly 3.3 V tolerant. This single fact causes most first-time failures, and we return to it below.

    The HC-05 defaults to 9600 baud in data mode but 38400 baud in AT command mode. Mixing these up is the single most common reason a brand-new module appears "dead."

    HC-05 to Arduino: cross-connect TX and RX Arduino Uno D10 (RX) D11 (TX) HC-05 TXD RXD TXD to D10 (direct) divider D11 to RXD (5 V down to 3.3 V) 1 kΩ + 2 kΩ resistor pair CourseTron · coursetron.com
    Cross-connect TXD→RX and TX→RXD. The HC-05 RXD must see 3.3 V, so drop the Arduino's 5 V with a voltage divider.

    Wiring it safely

    Four wires carry a basic link: VCC, GND, TXD, and RXD. The crossover is the rule that trips beginners: the module's transmit pin feeds the Arduino's receive pin and vice versa. On a 5 V Arduino Uno:

    • VCC → 5 V, GND → GND.
    • HC-05 TXD → Arduino RX directly. The 3.3 V output is comfortably above the Uno's ~2.5 V logic-high threshold, so no level shift is needed here.
    • Arduino TX → HC-05 RXD through a divider. A 1 kΩ / 2 kΩ pair knocks 5 V down to ~3.3 V. Feeding raw 5 V here will slowly damage the input over time even if it seems to work at first.

    Use SoftwareSerial on pins D10/D11 rather than D0/D1, so the hardware UART stays free for USB debugging. Our companion build on the HC-SR04 ultrasonic sensor with Arduino uses the same pin-budgeting logic, and for a motor-driven robot see our guide on the L298N motor driver.

    Divider on the HC-05 RXD line D11 (5 V) R1 1 kΩ R2 2 kΩ GND HC-05 RXD Vout = 5 V × 2k / (1k + 2k) Vout ≈ 3.33 V CourseTron · coursetron.com
    A 1 kΩ / 2 kΩ divider leaves 2/3 of 5 V, about 3.33 V, at the HC-05 RXD pin.

    Configuring with AT commands

    To rename the device, change the PIN, or set a baud rate, you enter AT command mode. Hold the module's KEY/EN pin high (or press its onboard button) while powering up; the status LED then blinks slowly at roughly 2 s intervals instead of the fast data-mode blink. Open the serial monitor at 38400 baud with "Both NL & CR" line endings and try:

    • AT → should reply OK
    • AT+NAME=RobotCtrl → set the advertised name
    • AT+PSWD=4821 → set the pairing PIN
    • AT+UART=115200,0,0 → raise the data-mode baud rate

    SPP throughput tops out near 2.1 Mbps on paper, but real HC-05 links sustain roughly 20–40 kB/s. That is ample for commands and sensor telemetry, but not for streaming audio or images.

    A phone-controlled sketch

    Because SPP is just serial, the firmware is trivial. This sketch toggles an LED and reports a sensor value when the phone sends single-character commands:

    • Phone sends '1' → Arduino drives the LED high and replies LED ON.
    • Phone sends '0' → LED low, replies LED OFF.
    • Phone sends 'r' → Arduino reads analogRead(A0) and sends the value back as text.

    The core loop reads one byte with bt.read(), branches on it, and writes a response with bt.println(). Any generic "Bluetooth Serial Terminal" Android app pairs with the module (default PIN 1234 or 0000) and gives you a text box plus buttons — no app development required to get started.

    One command byte: phone to LED Phone terminal app HC-05 SPP slave Arduino SoftwareSerial Bluetooth SPP link UART, 9600 baud '1' '1' LED CourseTron · coursetron.com
    A single command byte crosses the SPP link; the Arduino acts the moment it arrives.

    HC-05 vs HC-06 vs BLE

    ModuleRoleProtocolBest for
    HC-05Master or slaveBT 2.0 SPPTwo-way control, module-to-module links
    HC-06Slave onlyBT 2.0 SPPSimplest phone-to-Arduino projects
    HM-10BLE central/peripheralBT 4.0 LEiOS support, low-power sensors

    Choose HC-05 when you need master mode (for example, pairing two Arduinos) or bidirectional control. Note that classic SPP is not exposed to apps on iOS, so for iPhone projects reach for a BLE module such as the HM-10 instead.

    Debugging a link that won't talk

    • Fast-blinking LED but no data: baud mismatch. Confirm both ends agree (usually 9600).
    • AT commands ignored: you are in data mode — re-enter command mode via KEY high at power-up and switch the monitor to 38400.
    • Garbage characters: floating RX, missing common ground, or a reversed TX/RX crossover.
    • Pairs but drops out: brown-out from a shared supply when motors spin up; give the radio its own decoupled rail.

    Teams that later graduate to custom RF or SoC-based designs will meet far heavier verification tools — Synopsys VCS for RTL simulation, Siemens Questa for mixed-signal, Cadence Xcelium for the full chip — but the serial-debugging instinct you build here transfers directly. If you need production-grade embedded or silicon design help, our sister team at Avecas VLSI design services works on exactly those flows.

    Want to build a full smartphone-controlled robot from scratch — wiring, firmware, and a custom app? Our hands-on Embedded & IoT track walks you through it step by step. Explore the CourseTron course catalogue.

    Frequently asked questions

    Can I connect an HC-05 to an Arduino without a voltage divider?

    You can for the module's TXD → Arduino RX direction. But the Arduino's 5 V TX into the HC-05 RXD exceeds the module's 3.3 V rating; a 1k/2k divider or a logic-level shifter protects the input and prevents gradual failure.

    Why does my HC-05 blink fast and never accept AT commands?

    Fast blinking means data mode. AT commands only work in command mode, which you enter by holding the KEY/EN pin high during power-up; the LED then blinks slowly and the module responds at 38400 baud.

    Will the HC-05 work with an iPhone?

    No. iOS does not expose the classic Bluetooth SPP that the HC-05 uses. For iPhone projects, use a Bluetooth Low Energy module such as the HM-10.

    What range can I expect?

    A standard Class 2 HC-05 reaches about 10 metres indoors, less through walls. Range falls quickly with obstructions and interference on the 2.4 GHz band.

    Advertisement