
If you’re working on a DIY electronics project and want to add wireless communication, the HC-05 Bluetooth module is one of the easiest and most cost-effective solutions available. Whether you’re building a Bluetooth-controlled robot, smart home device, or just experimenting with serial communication, the HC-05 has you covered.
In this in-depth guide, we’ll explore everything you need to know about the HC-05 moduleโhow it works, how to use it with Arduino, and how it compares to other popular Bluetooth modules like HC-06 and HM-10.
๐ Table of Contents
Contents
- 1 ๐ Table of Contents
- 2 ๐ง 1. What is the HC-05 Bluetooth Module?
- 3 โ๏ธ 2. Key Features and Specifications
- 4 ๐งช 3. HC-05 Pinout and Wiring
- 5 ๐ง 4. How HC-05 Works
- 6 ๐ก 5. How to Use HC-05 with Arduino (Example Code)
- 7 ๐ 6. Applications of HC-05 Module
- 8 ๐ 7. HC-05 vs HC-06 vs HM-10: Which One is Better?
- 9 โ 8. Frequently Asked Questions (FAQs)
- 10 ๐งพ 9. Final Thoughts: Is HC-05 Worth It?
- 11 โ Key Takeaways
- 12 ๐ Related Posts You Might Like
- What is the HC-05 Bluetooth Module?
- Key Features and Specifications
- Pinout and Wiring with Arduino
- How the HC-05 Module Works
- Setting Up HC-05 with Arduino (with Example Code)
- Common Applications
- HC-05 vs HC-06 vs HM-10: Which One Should You Use?
- Frequently Asked Questions
- Final Thoughts
๐ง 1. What is the HC-05 Bluetooth Module?
The HC-05 is a popular Bluetooth SPP (Serial Port Protocol) module that allows devices to communicate wirelessly via UART (serial communication). It supports both Master and Slave modes, making it suitable for two-way communication between two Bluetooth devices.
It uses Bluetooth 2.0 technology, which makes it compatible with most Android devices and Windows PCs. However, it does not support iPhones since it lacks BLE (Bluetooth Low Energy).
In simple terms:
HC-05 = Easy Bluetooth Communication for Arduino & Microcontrollers
โ๏ธ 2. Key Features and Specifications
Feature | Details |
---|---|
Bluetooth Version | 2.0 + EDR |
Operating Voltage | 3.3V (Accepts 3.6โ6V) |
Logic Level | 3.3V (Use voltage divider on RX) |
Default Baud Rate | 9600 |
Range | ~10 meters (unobstructed) |
Configurable via AT Commands | Yes |
Mode Support | Master/Slave |
Antenna | Built-in |
Size | ~28mm x 15mm |
๐งช 3. HC-05 Pinout and Wiring
Pin | Function |
---|---|
VCC | Power supply (3.6V to 6V) |
GND | Ground |
TXD | Transmits serial data |
RXD | Receives serial data |
EN/KEY | Enables AT command mode |
STATE | Shows Bluetooth connection status |
โก Voltage Note:
The TX pin on Arduino is 5V, but the RX pin on HC-05 expects 3.3V. So use a voltage divider (two resistors) or a logic level shifter to avoid damaging the module.
๐ท Basic Arduino Wiring:
plaintextCopyEditHC-05 Arduino
----- -------
VCC --> 5V
GND --> GND
TXD --> Pin 10 (Arduino RX via SoftwareSerial)
RXD --> Pin 11 (Arduino TX via voltage divider)
๐ง 4. How HC-05 Works
The HC-05 acts like a wireless serial port. It transmits and receives data wirelessly between your microcontroller and a Bluetooth-enabled device like a smartphone or computer.
It has two main modes:
- AT Mode: Used for configuration. You can set the module name, baud rate, password, and Master/Slave role.
- Data Mode: Used for regular communication with connected devices.
When you power it on, the module starts blinking rapidly, indicating itโs waiting for a connection. Once connected, the blinking slows down.
๐ก 5. How to Use HC-05 with Arduino (Example Code)
Hereโs a simple project to send and receive data between your smartphone and Arduino via HC-05.
โ Arduino Code (using SoftwareSerial):
cppCopyEdit#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX | TX
void setup() {
Serial.begin(9600);
BTSerial.begin(9600);
Serial.println("Ready to pair with HC-05");
}
void loop() {
if (BTSerial.available()) {
Serial.write(BTSerial.read());
}
if (Serial.available()) {
BTSerial.write(Serial.read());
}
}
๐ฑ Pairing with Your Phone:
- Turn on Bluetooth.
- Pair with device โHC-05โ (default password:
1234
or0000
). - Use a Bluetooth Terminal app to send/receive data.
๐ 6. Applications of HC-05 Module
- Bluetooth-controlled robots
- Wireless home automation (lights, fans, etc.)
- Remote sensor monitoring
- Bluetooth-controlled car using Android
- Wireless data logging
- Serial communication between two Arduinos
๐ 7. HC-05 vs HC-06 vs HM-10: Which One is Better?
Feature | HC-05 | HC-06 | HM-10 (BLE) |
---|---|---|---|
Mode Support | Master & Slave | Slave only | Master & Slave |
Bluetooth Version | 2.0 + EDR | 2.0 + EDR | 4.0 (BLE) |
AT Commands | Full | Limited | Full |
iOS Compatibility | โ | โ | โ |
Android Compatibility | โ | โ | โ |
Power Consumption | Moderate | Low | Very Low |
Range | ~10 meters | ~10 meters | ~50 meters |
Price | $3โ$5 | $2โ$4 | $4โ$7 |
๐ Verdict:
- Choose HC-05: If you need both master/slave capability, full AT command control, and are working with Android or PC.
- Choose HC-06: For simple, one-way communication projects (slave only).
- Choose HM-10: If you need BLE support (iOS compatibility, low power).
โ 8. Frequently Asked Questions (FAQs)
Q1: Can I use HC-05 with iPhone?
No. iPhones support only BLE, and HC-05 uses classic Bluetooth 2.0. Use HM-10 for iOS compatibility.
Q2: How do I change the module name or baud rate?
Use AT commands:
AT+NAME=NewName
AT+UART=9600,0,0
To enter AT mode, hold the KEY pin HIGH while powering the module.
Q3: Whatโs the default pairing password?
The default is usually 1234 or 0000.
Q4: Can I program Arduino wirelessly with HC-05?
Technically possible, but not recommended for beginners. It requires bootloader access and reconfiguration.
Q5: Whatโs the range of HC-05?
Approx. 10 meters in open space. Walls and interference can reduce range.
๐งพ 9. Final Thoughts: Is HC-05 Worth It?
Absolutely! If you’re a beginner or hobbyist looking to add wireless functionality to your electronics project, the HC-05 module is one of the best tools out there. Itโs affordable, well-documented, easy to use, and compatible with a wide range of platforms.
Yes, itโs not ideal for iPhone users or low-energy applications, but for most Arduino-based DIY projects, HC-05 is the sweet spot between simplicity, flexibility, and price.
โ Key Takeaways
- HC-05 is a Bluetooth 2.0 module supporting both Master and Slave modes.
- Easy to connect with Arduino, Raspberry Pi, and other microcontrollers.
- Fully configurable using AT commands.
- Perfect for DIY projects like robots, home automation, and data logging.
- Alternatives like HC-06 (simpler) and HM-10 (BLE/iOS compatible) are available.
๐ Related Posts You Might Like
- ๐ Getting Started with Arduino Uno
- ๐ค How to Make a Bluetooth-Controlled Robot
- ๐ฟ Build a Smart Plant Watering System Using HC-05
- ๐ก Top 10 Bluetooth Projects for Beginners
If you found this guide helpful, share it with fellow makers! Got any questions or facing issues while using HC-05? Drop a comment or contact usโweโre here to help.