

The HC-05 Bluetooth Module, manufactured by Bluetooth Serial Port Profile (Part ID: HC-05), is a versatile wireless communication module designed for short-range data transmission. It operates using the Bluetooth Serial Port Protocol (SPP) and is widely used in embedded systems to enable seamless communication between devices. The module supports both master and slave modes, making it suitable for a variety of applications.








The HC-05 Bluetooth Module is designed to provide reliable and efficient communication. Below are its key technical details:
| Parameter | Value |
|---|---|
| Bluetooth Version | 2.0 + EDR (Enhanced Data Rate) |
| Operating Voltage | 3.3V to 5V |
| Communication Protocol | UART (Universal Asynchronous Receiver-Transmitter) |
| Default Baud Rate | 9600 bps |
| Power Consumption | < 50mA |
| Range | Up to 10 meters (line of sight) |
| Operating Temperature | -20°C to +75°C |
The HC-05 module has 6 pins, as described in the table below:
| Pin Name | Pin Number | Description |
|---|---|---|
| EN/KEY | 1 | Enables AT command mode when pulled HIGH. Leave LOW for normal operation. |
| VCC | 2 | Power supply input (3.3V to 5V). |
| GND | 3 | Ground connection. |
| TXD | 4 | Transmit data pin (connect to RX of microcontroller). |
| RXD | 5 | Receive data pin (connect to TX of microcontroller). |
| STATE | 6 | Indicates connection status (HIGH when connected, LOW when disconnected). |
The HC-05 Bluetooth Module is easy to integrate into a circuit. Follow the steps below to use it effectively:
VCC pin to a 3.3V or 5V power source and the GND pin to ground.TXD pin of the HC-05 to the RX pin of the microcontroller, and the RXD pin of the HC-05 to the TX pin of the microcontroller.EN/KEY pin HIGH and use AT commands via a serial terminal.Below is an example of how to connect and use the HC-05 with an Arduino UNO:
| HC-05 Pin | Arduino UNO Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| TXD | Pin 10 (RX) |
| RXD | Pin 11 (TX) |
| EN/KEY | Not connected |
#include <SoftwareSerial.h>
// Define RX and TX pins for SoftwareSerial
SoftwareSerial BTSerial(10, 11); // RX = Pin 10, TX = Pin 11
void setup() {
// Start the hardware serial communication for debugging
Serial.begin(9600);
Serial.println("HC-05 Bluetooth Module Test");
// Start the software serial communication with HC-05
BTSerial.begin(9600); // Default baud rate of HC-05
Serial.println("Enter AT commands:");
}
void loop() {
// Check if data is available from HC-05
if (BTSerial.available()) {
char c = BTSerial.read();
Serial.write(c); // Forward data to Serial Monitor
}
// Check if data is available from Serial Monitor
if (Serial.available()) {
char c = Serial.read();
BTSerial.write(c); // Forward data to HC-05
}
}
STATE pin to determine if the module is connected to a device.Module Not Responding to AT Commands
EN/KEY pin is pulled HIGH.No Data Transmission
TXD and RXD pins are correctly connected to the microcontroller.Unstable Connection
Cannot Pair with Another Device
1234 or 0000).Q: Can the HC-05 module work with 5V logic levels?
A: The TXD pin can output 5V logic, but the RXD pin is not 5V tolerant. Use a voltage divider or level shifter for safe operation with 5V microcontrollers.
Q: How do I reset the HC-05 module?
A: Disconnect the power supply, then reconnect it. Alternatively, use the AT command AT+RESET.
Q: Can I use the HC-05 for audio transmission?
A: No, the HC-05 is designed for serial data communication and does not support audio profiles.
Q: How do I switch between master and slave modes?
A: Use the AT command AT+ROLE=1 for master mode and AT+ROLE=0 for slave mode.
By following this documentation, you can effectively integrate and troubleshoot the HC-05 Bluetooth Module in your projects.