Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use HC-05 Bluetooth Module: Examples, Pinouts, and Specs

Image of HC-05 Bluetooth Module
Cirkit Designer LogoDesign with HC-05 Bluetooth Module in Cirkit Designer

Introduction

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

Explore Projects Built with HC-05 Bluetooth Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO Bluetooth Communication Module
Image of HC-05 Connection with arduino: A project utilizing HC-05 Bluetooth Module in a practical application
This circuit consists of an Arduino UNO microcontroller connected to an HC-05 Bluetooth module. The Arduino provides power to the Bluetooth module and facilitates serial communication between the two devices, enabling wireless data transmission.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Bluetooth-Controlled Relay System
Image of home automaton: A project utilizing HC-05 Bluetooth Module in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an HC-05 Bluetooth module for wireless communication. It also includes two 5V two-channel relay modules, which are connected to the Arduino for controlling external devices. The setup allows for remote control of devices via Bluetooth.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and HC-05 Bluetooth Communication Interface
Image of blutooth: A project utilizing HC-05 Bluetooth Module in a practical application
This circuit connects an HC-05 Bluetooth Module to an Arduino UNO for wireless communication. The HC-05's VCC and GND are connected to the Arduino's 5V and GND for power. The HC-05's TXD and RXD pins are connected to the Arduino's D11 and D10 pins, respectively, allowing for serial communication between the two devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico-Based Navigation Assistant with Bluetooth and GPS
Image of sat_dish: compass example: A project utilizing HC-05 Bluetooth Module in a practical application
This circuit features a Raspberry Pi Pico microcontroller interfaced with an HC-05 Bluetooth module for wireless communication, an HMC5883L compass module for magnetic field measurement, and a GPS NEO 6M module for location tracking. The Pico is configured to communicate with the HC-05 via serial connection (TX/RX), with the compass module via I2C (SCL/SDA), and with the GPS module via serial (TX/RX). Common power (VCC) and ground (GND) lines are shared among all modules, indicating a unified power system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with HC-05 Bluetooth Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of HC-05 Connection with arduino: A project utilizing HC-05 Bluetooth Module in a practical application
Arduino UNO Bluetooth Communication Module
This circuit consists of an Arduino UNO microcontroller connected to an HC-05 Bluetooth module. The Arduino provides power to the Bluetooth module and facilitates serial communication between the two devices, enabling wireless data transmission.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of home automaton: A project utilizing HC-05 Bluetooth Module in a practical application
Arduino UNO Bluetooth-Controlled Relay System
This circuit features an Arduino UNO microcontroller interfaced with an HC-05 Bluetooth module for wireless communication. It also includes two 5V two-channel relay modules, which are connected to the Arduino for controlling external devices. The setup allows for remote control of devices via Bluetooth.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of blutooth: A project utilizing HC-05 Bluetooth Module in a practical application
Arduino UNO and HC-05 Bluetooth Communication Interface
This circuit connects an HC-05 Bluetooth Module to an Arduino UNO for wireless communication. The HC-05's VCC and GND are connected to the Arduino's 5V and GND for power. The HC-05's TXD and RXD pins are connected to the Arduino's D11 and D10 pins, respectively, allowing for serial communication between the two devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sat_dish: compass example: A project utilizing HC-05 Bluetooth Module in a practical application
Raspberry Pi Pico-Based Navigation Assistant with Bluetooth and GPS
This circuit features a Raspberry Pi Pico microcontroller interfaced with an HC-05 Bluetooth module for wireless communication, an HMC5883L compass module for magnetic field measurement, and a GPS NEO 6M module for location tracking. The Pico is configured to communicate with the HC-05 via serial connection (TX/RX), with the compass module via I2C (SCL/SDA), and with the GPS module via serial (TX/RX). Common power (VCC) and ground (GND) lines are shared among all modules, indicating a unified power system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Wireless communication between microcontrollers and smartphones
  • Remote control of devices (e.g., robots, home automation systems)
  • Data logging and wireless data transfer
  • Serial communication replacement in embedded systems
  • IoT (Internet of Things) applications

Technical Specifications

The HC-05 Bluetooth Module is designed to operate efficiently in a wide range of applications. Below are its key technical details:

Key Technical Details

Parameter Specification
Bluetooth Version 2.0 + EDR (Enhanced Data Rate)
Operating Voltage 3.3V to 5V
Operating Current 30mA (typical)
Communication Protocol UART (Universal Asynchronous Receiver-Transmitter)
Baud Rate (Default) 9600 bps
Range Up to 10 meters (unobstructed)
Frequency Band 2.4 GHz ISM band
Master/Slave Support Configurable
Dimensions 37.5mm x 15.2mm x 2.7mm

Pin Configuration and Descriptions

The HC-05 module has 6 pins, as described in the table below:

Pin Name Pin Number Description
EN/KEY 1 Used to switch between command and data modes. Pull HIGH to enter command mode.
VCC 2 Power supply input (3.3V to 5V).
GND 3 Ground connection.
TXD 4 Transmit data pin (connect to RXD of microcontroller).
RXD 5 Receive data pin (connect to TXD of microcontroller).
STATE 6 Indicates the connection status (HIGH when connected, LOW when disconnected).

Usage Instructions

The HC-05 Bluetooth Module is easy to integrate into a circuit. Follow the steps below to use it effectively:

Connecting the HC-05 to a Microcontroller

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Connect TXD and RXD:
    • Connect the TXD pin of the HC-05 to the RX pin of the microcontroller.
    • Connect the RXD pin of the HC-05 to the TX pin of the microcontroller. Use a voltage divider if the microcontroller operates at 5V logic levels.
  3. Optional Connections:
    • Connect the EN/KEY pin to a GPIO pin of the microcontroller if you need to switch between command and data modes.
    • Use the STATE pin to monitor the connection status.

Configuring the HC-05

The HC-05 can be configured using AT commands in command mode. To enter command mode:

  • Pull the EN/KEY pin HIGH before powering the module.
  • Use a serial terminal to send AT commands at the default baud rate of 9600 bps.

Example: Connecting HC-05 to Arduino UNO

Below is an example of how to use the HC-05 with an Arduino UNO to send and receive data:

Circuit Diagram

  • Connect VCC to the Arduino's 5V pin.
  • Connect GND to the Arduino's GND pin.
  • Connect TXD to the Arduino's RX pin (pin 0).
  • Connect RXD to the Arduino's TX pin (pin 1) through a voltage divider.

Arduino Code

// HC-05 Bluetooth Module Example with Arduino UNO
// This code sends and receives data via the HC-05 module.

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
SoftwareSerial BTSerial(10, 11); // RX = pin 10, TX = pin 11

void setup() {
  // Initialize hardware serial for debugging
  Serial.begin(9600);
  Serial.println("HC-05 Bluetooth Module Test");

  // Initialize Bluetooth serial communication
  BTSerial.begin(9600); // Default baud rate for HC-05
  Serial.println("Bluetooth module ready");
}

void loop() {
  // Check if data is available from the Bluetooth module
  if (BTSerial.available()) {
    char data = BTSerial.read(); // Read data from HC-05
    Serial.print("Received: ");
    Serial.println(data); // Print received data to Serial Monitor
  }

  // Check if data is available from the Serial Monitor
  if (Serial.available()) {
    char data = Serial.read(); // Read data from Serial Monitor
    BTSerial.write(data); // Send data to HC-05
    Serial.print("Sent: ");
    Serial.println(data); // Print sent data to Serial Monitor
  }
}

Important Considerations and Best Practices

  • Voltage Levels: The RXD pin is not 5V tolerant. Use a voltage divider or level shifter if your microcontroller operates at 5V logic.
  • Baud Rate: Ensure the baud rate of the microcontroller matches the HC-05's baud rate.
  • Command Mode: Always pull the EN/KEY pin HIGH before powering the module to enter command mode.
  • Range: Keep the module within its specified range (10 meters) for reliable communication.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Responding to AT Commands:

    • Ensure the EN/KEY pin is HIGH before powering the module.
    • Verify the baud rate is set to 9600 bps in your serial terminal.
  2. No Data Transmission:

    • Check the connections between the HC-05 and the microcontroller.
    • Ensure the TXD and RXD pins are correctly connected (crossed).
  3. Unstable Connection:

    • Reduce the distance between the HC-05 and the paired device.
    • Avoid interference from other 2.4 GHz devices.
  4. Module Not Pairing:

    • Ensure the module is in discoverable mode (LED blinking rapidly).
    • Verify the pairing code (default is 1234 or 0000).

FAQs

Q1: Can the HC-05 work with 5V logic levels?
A1: The TXD pin can output 5V logic, but the RXD pin is not 5V tolerant. Use a voltage divider for safe operation.

Q2: How do I reset the HC-05 to factory settings?
A2: Enter command mode and send the AT+ORGL command to reset the module to its default settings.

Q3: Can I use the HC-05 for audio transmission?
A3: No, the HC-05 is designed for serial data communication and does not support audio transmission.

Q4: How do I change the module's name or PIN?
A4: Use the following AT commands in command mode:

  • Change name: AT+NAME=YourName
  • Change PIN: AT+PSWD=YourPIN

By following this documentation, you can effectively integrate and troubleshoot the HC-05 Bluetooth Module in your projects.