HC-05 / HC-06 Bluetooth Module: A Practical Guide
Bluetooth continues to be a key wireless communication standard in electronics projects. The HC-05 and HC-06 modules are among the most accessible ways to add serial-based Bluetooth to your microcontroller system. This article walks through their differences, how to use them, and tips for success.
What Are HC-05 and HC-06?
These modules are classic Bluetooth (Bluetooth 2.0 / SPP) interface devices that communicate via UART (serial). They let microcontrollers talk with smartphones, PCs, or other Bluetooth-enabled devices over the 2.4 GHz band.
HC-05 vs HC-06: Key Differences
| Feature | HC-05 | HC-06 |
|---|---|---|
| Role (Master / Slave) | Can be set as master or slave | Typically fixed as slave |
| AT Commands & Flexibility | Full command set, allows changing role, initiating connections | More limited, simpler configuration |
| Pins / Features | Has extra control pins (e.g. EN, STATE) | Basic pin layout (VCC, GND, TXD, RXD) |
| Best Use | Projects requiring dynamic connections or master mode | Simpler, single-connection scenarios |
If your project requires your microcontroller to initiate connections or manage multiple Bluetooth links, HC-05 is preferable. For straightforward, one-way communications, HC-06 is typically sufficient.
Specifications & Operational Data
Typical parameters (varies by module variant):
-
Interface: UART TTL (3.3 V logic)
-
Operating voltage: 3.0 V – 3.6 V
-
Current draw: ~15 mA (HC-05)
-
Signal sensitivity: ~ –85 dBm
-
Default baud rate: 9600 bps
-
Operating temperature range: –25 °C to 85 °C
These details (and more) are covered in the linked documentation above.
AT Commands & Configuration
You can adjust module settings (name, baud rate, etc.) using AT commands (text commands sent over serial).
-
HC-05: Enter AT mode (often via a button or pin) and use commands like
AT+NAME=...,AT+ROLE=0/1,AT+UART=.... -
HC-06: Uses simpler commands like
AT+NAMExxx,AT+PINxxxx,AT+BAUDxfor configuration.
Proper line endings (CR / LF) are essential for commands to be accepted.
Wiring & Example with a Microcontroller
Basic wiring with an Arduino:
-
Module VCC → 5V (or 3.3V if required)
-
Module GND → Ground
-
Module RXD → Arduino TX
-
Module TXD → Arduino RX
If module logic is 3.3 V, use a voltage divider or level shifter for connections from a 5 V microcontroller. Use a sketch to forward data between USB serial and the Bluetooth module to test communication.
Use Cases
-
Remote sensor data transmission
-
Robot / device control via smartphone
-
Wireless debugging / logging
-
Home automation with Bluetooth link
Tips & Troubleshooting
-
Match baud rates exactly, or you'll see garbled data
-
Ensure correct voltage levels to avoid damaging the module
-
Use proper line endings (CR / LF) with AT commands
-
Test simple connections before adding complexity
-
Be aware of signal interference or obstacles limiting range
Sign In Or Register Comment after
No comments yet. Be the first to comment!