HC-05 Bluetooth Module: A Comprehensive Guide

| | |

The HC-05 Bluetooth module is a widely used and versatile wireless communication module that enables Bluetooth connectivity in electronic projects. Manufactured by various suppliers, this module is popular among hobbyists, engineers, and developers for its ease of use, cost-effectiveness, and compatibility with microcontrollers like Arduino.

HC-05 Bluetooth Module - Unraveling its Comprehensive Guide

Below are some key features and details about the HC-05 Bluetooth module:

Key Features HC-05 Bluetooth Module:

Bluetooth Standard:

The HC-05 Bluetooth module operates on Bluetooth version 2.0 + EDR (Enhanced Data Rate), supporting reliable and efficient wireless communication.

Operating Modes:

The module can operate in both Master and Slave modes. In Slave mode, it can pair with other Bluetooth devices, while in Master mode, it can initiate connections.

Communication Range:

The HC-05 is classified as a Class 2 Bluetooth device, providing a communication range of approximately 10 meters (33 feet). This makes it suitable for short to medium-range applications.

Serial Communication:

It communicates with other devices using a serial communication interface, making it compatible with microcontrollers like Arduino. The module typically supports standard baud rates like 9600 bps.

AT Command Configuration:

The HC-05 Bluetooth module can be configured using AT commands, allowing users to customize various parameters such as the device name, pairing code, and operating mode.

Voltage Compatibility:

The module operates within a voltage range of 3.6V to 6V, making it compatible with a variety of power sources.

Security Features:

The HC-05 supports basic security features, including the ability to set a PIN code for pairing and configuring security modes.

LED Indicator:

Many HC-05 modules have an onboard LED indicator that provides visual feedback on the pairing status and communication activity.

HC-05 Bluetooth Module Pinout Configuration

HC-05 Bluetooth module stands out as a compact marvel, bridging the gap between traditional wired connections and the boundless realm of wireless communication. If you’re venturing into the exciting domain of IoT projects, robotics, or any application where wireless connectivity is paramount, understanding the HC-05 Bluetooth module pinout configuration is essential.

HC-05 Bluetooth Module Pinout - Navigating Connectivity
Understanding the Pin Configuration of HC-05

Embark on a journey into the wireless frontier with our extensive HC-05 Bluetooth module guide. From understanding power nuances to configuring roles, this in-depth exploration ensures you harness the full potential of the HC-05 in your projects. Whether you’re a coding enthusiast or a hardware wizard, our guide demystifies the HC-05 pinout configuration, making Bluetooth technology accessible and exciting for all.

VCC (Pin 1): Power Supply Voltage

This pin is the lifeblood of the HC-05, requiring a power supply voltage ranging from 3.6V to 6V. Ensure a stable power source to keep your module operating seamlessly.

GND (Pin 2): Ground Connection

Grounding is as crucial as powering. Connect Pin 2 to the ground of your circuit to create a complete and reliable circuit loop.

EN (Enable) (Pin 3): Module Enable Pin

This pin determines whether the module is active or in a low-power state. A high signal (3.3V) enables the module, while a low signal (0V) disables it.

State (Pin 4): Status Indicator

Pin 4 acts as a status indicator, signaling the pairing status. When high, it indicates the module is paired; when low, it signals that pairing is yet to occur.

Key (Pin 5): Role Configuration

Pin 5, the Key pin, is used to configure the role of the module, deciding whether it operates as a Master or Slave device.

RXD (Pin 6): Serial Data Input

Connect Pin 6 to the TXD (transmit data) pin of your microcontroller, enabling the module to receive serial data.

TXD (Pin 7): Serial Data Output

Pin 7 serves as the serial data output, linking to the RXD (receive data) pin of your microcontroller to transmit data wirelessly.

IO6 (Pin 8): General-Purpose I/O

Pin 8 is a general-purpose input/output pin, providing flexibility for additional functionalities and customizations.

HC-05 Bluetooth Module Pinout Configuration - Navigating Connectivity
Understanding the Pin Configuration of HC-05

HC-05 Bluetooth Module Default Settings

Before you set sail into the vast sea of connectivity, understanding the HC-05 default settings is crucial. These settings act as the gateway to seamless integration and hassle-free operation, making your experience not only productive but also enjoyable.

HC-05 Bluetooth Module Default Settings:

1. Baud Rate:

One of the fundamental settings is the baud rate, which determines the speed of data transmission between the HC-05 module and the connected devices. The default baud rate for HC-05 is typically set to 9600 bps (bits per second).

2. Device Name:

The HC-05 Bluetooth module comes with a default device name, usually set to “HC-05” or “Linvor.” This is the identifier that appears when searching for nearby Bluetooth devices.

3. Password:

Security is paramount, even in the wireless realm. The default password for HC-05 is often set to ‘1234,’ serving as a basic security measure. It’s advisable to change this password for enhanced protection.

4. Mode:

The HC-05 module operates in two primary modes: Master and Slave. The default setting is often as a Slave device. In this mode, it can pair with other Bluetooth devices but doesn’t initiate connections.

5. AT Mode:

The HC-05 can be configured using AT commands, and the default mode for configuration is the AT mode. In this mode, the module awaits commands, allowing users to customize various parameters.

6. Factory Reset:

If things get a bit tangled up or if you want to start fresh, the HC-05 can be reset to its factory settings. This brings all the configurations back to their default values, providing a clean slate for your wireless endeavors.

HC-05 Technical Specifications


The HC-05 Bluetooth module is a versatile and widely used component that facilitates wireless communication in various electronic projects. Here are the technical specifications of the HC-05 Bluetooth module:

Bluetooth Version:

The HC-05 module typically operates on Bluetooth version 2.0 + EDR (Enhanced Data Rate), providing reliable and efficient communication.

Bluetooth Class:

The module falls under Class 2 Bluetooth devices, which means it has a range of approximately 10 meters (or 33 feet). This makes it suitable for short to medium-range wireless applications.

Frequency Range:

The HC-05 module operates within the 2.4GHz ISM (Industrial, Scientific, and Medical) band, ensuring compatibility with other Bluetooth devices and minimizing interference.

Operating Voltage:

The recommended operating voltage for the HC-05 module is typically between 3.6V and 6V, making it compatible with a wide range of power sources.

Default Baud Rate:

The default baud rate for communication is often set to 9600 bps (bits per second). However, users can configure the baud rate according to their specific requirements using AT commands.

Modulation:

The module uses Gaussian Frequency Shift Keying (GFSK) modulation, a digital modulation technique that is common in Bluetooth communication.

Transmit Power:

The transmit power of the HC-05 Bluetooth module is generally around 4 dBm, allowing for reliable communication within its specified range.

Serial Communication Interface:

The HC-05 module communicates using a serial interface, featuring RXD (Receive Data) and TXD (Transmit Data) pins for data exchange with microcontrollers and other devices.

Profiles Supported:

The HC-05 supports various Bluetooth profiles, including the Serial Port Profile (SPP), making it suitable for applications requiring serial communication.

Operating Modes:

The module operates in two primary modes – Master and Slave. In Slave mode, it can pair with other Bluetooth devices, while in Master mode, it can initiate connections.

AT Command Support:

The HC-05 module can be configured using AT commands, allowing users to customize settings such as baud rate, device name, and pairing parameters.

HC-05 Equivalent Bluetooth Module

Several Bluetooth modules on the market are considered equivalent to or alternatives for the HC-05. Keep in mind that new modules may have been introduced since then, and it’s advisable to check the latest information and user reviews for the most current options. Here are a few Bluetooth modules that were popular alternatives:

HC-06:

The HC-06 is often considered a close counterpart to the HC-05. It is also a Bluetooth 2.0 module with Serial Port Profile (SPP) support. However, it primarily operates as a Slave device and lacks the Master mode functionality that the HC-05 offers.

HC-11:

The HC-11 is another Bluetooth module that shares similarities with the HC-05. It operates on Bluetooth 2.0, supports SPP, and offers a range of configurable settings using AT commands. It is commonly used for wireless data transmission in various projects.

HC-08:

The HC-08 is a Bluetooth Low Energy (BLE) module, offering energy-efficient communication suitable for applications with power constraints. While it operates on a different Bluetooth standard (BLE instead of Classic), it might be considered an alternative depending on your project’s requirements.

JDY-08:

The JDY-08 is a Bluetooth 4.0 module with BLE capabilities. It is compact and offers low power consumption, making it suitable for battery-powered devices. Similar to the HC-08, it operates on Bluetooth Low Energy.

RN-42:

The RN-42 is a Bluetooth module from Microchip’s Bluetooth Audio module series. It supports Bluetooth 2.1 + EDR and is known for its ease of use. It offers Serial Port Profile (SPP) and has a range of configuration options.

Before choosing an equivalent Bluetooth module, consider the specific requirements of your project, such as range, power consumption, and communication protocol. Additionally, check the availability and community support for the module to ensure that it fits your development needs.

Where to use HC-05 Bluetooth module

The HC-05 Bluetooth module finds utility in a wide range of applications across various domains due to its versatility, ease of use, and cost-effectiveness. Here are some common areas where the HC-05 Bluetooth module is frequently employed:

Home Automation:

The HC-05 module can be integrated into home automation systems to enable wireless control of lights, appliances, and other devices using a smartphone or tablet.

Robotics:

In robotics projects, the HC-05 Bluetooth module facilitates wireless communication between the robot and a remote control device, allowing for tasks such as remote operation, data logging, and sensor monitoring.

IoT (Internet of Things):

The HC-05 enables IoT devices to communicate wirelessly with each other and with cloud services. It can be used in smart home applications, environmental monitoring systems, and wearable devices.

Vehicle Diagnostics:

Automotive enthusiasts and professionals can use the HC-05 Bluetooth module to build Bluetooth-enabled diagnostic tools for monitoring vehicle performance, reading error codes, and performing diagnostics.

Wireless Data Transfer:

The HC-05 facilitates wireless data transfer between electronic devices such as microcontrollers, Arduino boards, and Raspberry Pi computers. It can be used for transmitting sensor data, commands, and firmware updates.

Healthcare Monitoring:

In healthcare applications, the HC-05 can be used to transmit vital signs and other health-related data from wearable sensors to smartphones or medical monitoring systems.

Remote Control Systems:

The HC-05 module enables the development of remote control systems for various applications, including home entertainment systems, drones, and industrial machinery.

Education and Prototyping:

The HC-05 Bluetooth module is widely used in educational settings and prototyping environments for teaching and experimenting with wireless communication concepts, Bluetooth protocols, and IoT technologies.

Security Systems:

The HC-05 can be integrated into security systems for remote monitoring and control of surveillance cameras, access control systems, and alarm systems.

Environmental Monitoring:

Researchers and environmentalists use the HC-05 module to develop wireless environmental monitoring systems for measuring parameters such as temperature, humidity, and air quality.

How to Use the HC-05 Bluetooth module


Using the HC-05 Bluetooth module involves a few key steps, from hardware connections to software configuration. Here’s a general guide to get you started:

Hardware Setup:

Power Supply:

  • Connect the VCC pin of the HC-05 to a power source within its specified voltage range (3.6V to 6V). Connect GND to the ground.

Enable Pin (EN) Connection:

  • Connect the EN (Enable) pin to a high (3.3V) to enable the module.

TX/RX Connection:

  • Connect the RXD pin of the HC-05 to the TXD pin of your microcontroller, and connect the TXD pin of the HC-05 to the RXD pin of your microcontroller. This establishes the serial communication link.

Key Pin:

  • The Key pin is often used to set the module in AT command mode. Connect it to ground (LOW) for normal operation and to VCC (HIGH) to enter AT command mode.

State Pin:

  • The State pin provides information about the pairing status. Connect it to an indicator LED if you want a visual cue.

Software Configuration:

AT Mode:

To configure the HC-05, you need to enter AT command mode. Set the Key pin to HIGH, power up the module, and use a serial terminal (like Arduino IDE’s Serial Monitor) to send AT commands. Common commands include:

  • AT – Check if the module responds.
  • AT+NAME=YourDeviceName – Set the Bluetooth device name.
  • AT+PIN=YourPIN – Set a secure PIN.

Baud Rate Configuration:

The default baud rate is usually 9600 bps. If you wish to change it, use the AT+UART= command, followed by the desired baud rate. Remember to update your serial terminal settings accordingly.

Role Configuration:

Set the role of the module using the AT+ROLE= command. The module can operate as a Master or a Slave. For most applications, setting it as a Slave is common.

Testing Connection:

Once configured, power off the HC-05, set the Key pin back to LOW, and power it on again. The module should now be in normal operation mode.

Bluetooth Pairing:

Use your smartphone or another Bluetooth-enabled device to discover and pair with the HC-05. Enter the PIN if you’ve set one.

Example Arduino Code (for Serial Communication):

void setup() {

  Serial.begin(9600); // Set this baud rate based on your HC-05 configuration

}

void loop() {

  if (Serial.available() > 0) {

    char data = Serial.read();

    // Process the received data as needed

  }

}

This simple Arduino code reads data from the HC-05 and allows you to perform actions based on the received information.

hc 05 bluetooth module interface with arduino

The HC-05 Bluetooth module can be interfaced with an Arduino microcontroller to enable wireless communication between the Arduino and other Bluetooth-enabled devices such as smartphones, tablets, or other Arduino boards.

HC-05 Bluetooth Module Interface with Arduino - Seamless Connectivity
Navigating Connectivity between Arduino and HC-05

Here’s a basic guide on how to interface the HC-05 module with an Arduino:

Hardware Setup:

Connections:

  • Connect the HC-05 module to the Arduino as follows:
  • HC-05 TXD pin to Arduino RX pin (usually pin 0).
  • HC-05 RXD pin to Arduino TX pin (usually pin 1).
  • HC-05 VCC pin to Arduino 5V pin.
  • HC-05 GND pin to Arduino GND pin.
  • Ensure the module is properly powered and connected.

Mode Selection (Optional):

Some HC-05 modules have a mode selection pin (KEY). You might need to set this pin HIGH or LOW to configure the module for AT command mode or normal operation mode.

Software Setup:

SoftwareSerial Library:

Since the HC-05 Bluetooth module communicates using serial communication, you’ll need to use the SoftwareSerial library to create a software serial port on the Arduino for communication with the module.

Arduino Sketch:

Here’s a simple Arduino sketch to establish communication with the HC-05 module and exchange data:

#include <SoftwareSerial.h>

SoftwareSerial bluetoothSerial(0, 1); // RX, TX

void setup() {

  Serial.begin(9600); // Serial monitor

  bluetoothSerial.begin(9600); // Bluetooth module

}

void loop() {

  if (bluetoothSerial.available()) {

    char data = bluetoothSerial.read();

    Serial.print(data); // Print received data on serial monitor

  }

  if (Serial.available()) {

    char data = Serial.read();

    bluetoothSerial.write(data); // Send data to Bluetooth module

  }

}

Explanation:

We include the SoftwareSerial library and define a software serial port called bluetoothSerial using pins 0 (RX) and 1 (TX).

In the setup() function, we initialize both the hardware serial port (for serial monitor) and the software serial port (for the HC-05 Bluetooth module) at a baud rate of 9600.

In the loop() function, we continuously check for incoming data on both the hardware serial port (from serial monitor) and the software serial port (from the HC-05 module).

If data is available on either port, we read it and then write it to the other port to establish bidirectional communication.

Testing:

  • Upload the code to your Arduino board.
  • Open the Arduino IDE Serial Monitor (make sure the baud rate is set to 9600).
  • You should be able to send and receive data between the Arduino and any Bluetooth-enabled device paired with the HC-05 module.

This basic setup allows you to establish a wireless communication link between your Arduino and other Bluetooth devices, opening up a wide range of possibilities for remote control, data logging, sensor monitoring, and more.

hc 05 bluetooth module range

The range of the HC-05 Bluetooth module is typically around 10 meters (approximately 33 feet). This is a standard range for Class 2 Bluetooth devices, which includes most consumer-oriented Bluetooth devices like smartphones, headsets, and modules like the HC-05.

The Bluetooth specification defines three classes of devices based on their transmit power and range:

Class 1: Devices with a range of around 100 meters (or about 328 feet). These are typically higher-powered devices, often used in industrial or specialized applications.

Class 2: Devices with a range of around 10 meters (or about 33 feet). This class includes many common consumer devices, including most Bluetooth headsets, keyboards, mice, and the HC-05 Bluetooth module.

Class 3: Devices with a range of about 1 meter (or approximately 3 feet). This class is less common and is often used for very short-range applications.

It’s important to note that the actual range you experience with the HC-05 module can be influenced by several factors, including:

Obstacles: Walls and other physical obstructions can reduce the effective range.

Interference: Other electronic devices operating in the 2.4GHz band (common for Bluetooth) can cause interference.

Antenna Design: The design of the Bluetooth module’s antenna and the presence of obstacles can impact signal strength.

For most practical applications, the HC-05’s 10-meter range is suitable for short to medium-range communication tasks, such as connecting to a smartphone or another Bluetooth-enabled device within the same room.

Frequently Asked Questions

What is the range of the HC-05 Bluetooth module?

The HC-05 is a Class 2 Bluetooth device, providing a communication range of approximately 10 meters (33 feet). It is suitable for short to medium-range wireless applications.

Can the HC-05 module be used as a Master and a Slave?

Yes, the HC-05 Bluetooth module is a versatile module that can operate in both Master and Slave modes. In Slave mode, it can pair with other Bluetooth devices, while in Master mode, it can initiate connections.

How is the HC-05 configured for different settings?

The HC-05 Bluetooth module can be configured using AT commands. By sending specific commands through a microcontroller, you can customize parameters such as the device name, pairing code, and operating mode.

What is the default baud rate of the HC-05 module?

The default baud rate of the HC-05 is typically set to 9600 bps (bits per second). However, it can be configured to operate at different baud rates using AT commands.

How can I pair the HC-05 with other Bluetooth devices?

To pair the HC-05 Bluetooth module, ensure it is in discoverable mode (AT+ROLE command), then search for available Bluetooth devices on your phone or computer. Pair with the HC-05 by entering the default PIN (usually 1234).

Can I use the HC-05 for wireless communication between Arduino boards?

Yes, the HC-05 is commonly used for wireless communication between Arduino boards. You can establish a serial communication link between two HC-05 modules for data exchange.

What is the power supply voltage range for the HC-05?

The HC-05 Bluetooth module operates within a voltage range of 3.6V to 6V. It is essential to provide a stable power source within this range for reliable operation.

How do I enter AT command mode on the HC-05?

The HC-05 can enter AT command mode by pulling the Key pin HIGH and powering on the module. Some modules may require connecting the EN pin to HIGH as well.

What is the LED indicator on the HC-05 for?

Many HC-05 Bluetooth modules have an onboard LED indicator. It provides visual feedback on the pairing status and communication activity. The LED may blink to indicate pairing mode or remain steady when paired.

Can I change the default password on the HC-05 for security?

Yes, for improved security, it is advisable to change the default password using the AT+PSWD command. Ensure that your microcontroller code is updated to use the new password.

Worth Read Posts

  1. Touch Sensors
  2. ESP8266 Pinout
  3. Hysteresis Loss Formula
  4. ESP32 Pinout
  5. Work Function Formula
  6. Power Triangle
  7. BC547 Pinout

Subscribe to our Newsletter “Electrical Insights Daily” to get the latest updates in Electrical Engineering. You can also Follow us on LinkedIn and Facebook to see our latest posts on Electrical Engineering Topics.

Related Posts

Pressure Sensors: 7 Important Types, Working & Applications

Since the 1590s, humanity’s fascination with measuring pressure changes has evolved from…

Ultrasonic Sensors: A Comprehensive Guide

Ultrasonic sensors are devices that use ultrasonic waves, which are sound waves with…

Humidity Sensors: Best Guide on Types & Applications

Humidity sensors, also known as hygrometers, are devices designed to measure and monitor…

Temperature Sensors: A Comprehensive Guide

In the dynamic world of sensing technology, Temperature Sensors stand as vital…

Infrared Sensors: Unveiling the Power of Invisible Light

In the dynamic field of sensing technologies, Infrared Sensors emerge as unsung heroes…

Touch Sensors: A Comprehensive Guide

In our increasingly interconnected and digital era, touch sensors stand as silent conduits…
Sharing is Caring

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertisement