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

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

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

Introduction

The HC-05 is a Bluetooth module manufactured by BLUETOOTH, with the part ID HC-05. It is a versatile and widely used component that enables wireless communication between devices. Operating in the 2.4 GHz frequency range, the HC-05 is designed for seamless integration into embedded systems, allowing microcontrollers to communicate with smartphones, laptops, or other Bluetooth-enabled devices.

Explore Projects Built with HC-05

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi Pico-Based Navigation Assistant with Bluetooth and GPS
Image of sat_dish: compass example: A project utilizing HC-05 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
Arduino UNO Bluetooth Communication Interface
Image of Bluetooth: A project utilizing HC-05 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, respectively, for power. The TXD pin of the HC-05 is connected to the Arduino's D1 (RX) pin, and the RXD pin of the HC-05 is connected through a voltage divider made of two resistors to the Arduino's D0 (TX) pin, allowing for serial communication between the two devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Bluetooth-Controlled Relay System
Image of home automaton: A project utilizing HC-05 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 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

Explore Projects Built with HC-05

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 sat_dish: compass example: A project utilizing HC-05 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
Image of Bluetooth: A project utilizing HC-05 in a practical application
Arduino UNO 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, respectively, for power. The TXD pin of the HC-05 is connected to the Arduino's D1 (RX) pin, and the RXD pin of the HC-05 is connected through a voltage divider made of two resistors to the Arduino's D0 (TX) pin, allowing for serial communication between the two devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of home automaton: A project utilizing HC-05 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 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

Common Applications and Use Cases

  • Wireless data transfer between microcontrollers and smartphones
  • Remote control of devices via Bluetooth
  • Home automation systems
  • Robotics and IoT projects
  • Serial communication in embedded systems

Technical Specifications

The HC-05 module is a Class 2 Bluetooth device with a range of approximately 10 meters. Below are its key technical details:

Parameter Value
Bluetooth Version 2.0 + EDR (Enhanced Data Rate)
Operating Voltage 3.3V to 5V
Operating Current 30 mA (typical)
Communication Protocol UART (Universal Asynchronous Receiver-Transmitter)
Baud Rate (Default) 9600 bps
Frequency Range 2.4 GHz ISM band
Range Up to 10 meters
Operating Temperature -20°C to +75°C
Dimensions 28 mm x 15 mm x 2.35 mm

Pin Configuration and Descriptions

The HC-05 module has six 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. Sends serial data to the connected microcontroller.
RXD 5 Receive data pin. Receives serial data from the connected microcontroller.
STATE 6 Indicates the connection status (HIGH when connected, LOW when disconnected).

Usage Instructions

How to Use the HC-05 in a Circuit

  1. Powering the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Serial Communication: Connect the 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. Use a voltage divider if the microcontroller operates at 5V logic levels to avoid damaging the RXD pin.
  3. AT Command Mode: To configure the module, pull the EN (Key) pin HIGH and communicate with the module using AT commands via a serial terminal.
  4. Normal Operation: Leave the EN (Key) pin LOW for standard Bluetooth communication.

Important Considerations and Best Practices

  • Voltage Levels: Ensure the RXD pin does not receive voltages higher than 3.3V. Use a voltage divider or level shifter if necessary.
  • Baud Rate: The default baud rate is 9600 bps. Configure your microcontroller or serial terminal to match this rate.
  • Pairing: The default pairing code for the HC-05 is usually "1234" or "0000". This can be changed using AT commands.
  • Antenna Placement: Avoid placing the module near metal objects or other RF sources to minimize interference.

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 Connections

  • HC-05 VCC → Arduino 5V
  • HC-05 GND → Arduino GND
  • HC-05 TXD → Arduino RX (Pin 0)
  • HC-05 RXD → Arduino TX (Pin 1) (use a voltage divider if needed)

Arduino Code

#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
  Serial.begin(9600); 
  // Start the Bluetooth serial communication
  BTSerial.begin(9600); 

  Serial.println("HC-05 Bluetooth Module Test");
}

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 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
  }
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Responding to AT Commands

    • Ensure the EN (Key) pin is pulled HIGH.
    • Verify the baud rate is set to 9600 bps (or the configured rate).
    • Check the wiring and ensure the TX and RX pins are correctly connected.
  2. Bluetooth Device Not Pairing

    • Confirm the module is powered and in discoverable mode (blinking LED).
    • Verify the pairing code (default is "1234" or "0000").
    • Ensure the device is within the 10-meter range.
  3. Data Transmission Issues

    • Check for proper voltage levels on the RXD pin.
    • Ensure the baud rate matches between the HC-05 and the microcontroller.
    • Minimize interference from other RF devices.

FAQs

Q: Can the HC-05 be used in master mode?
A: Yes, the HC-05 can operate in both master and slave modes. Use AT commands to configure the mode.

Q: What is the difference between HC-05 and HC-06?
A: The HC-05 supports both master and slave modes, while the HC-06 operates only in slave mode.

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

Q: Can the HC-05 communicate with BLE devices?
A: No, the HC-05 uses Bluetooth 2.0 and is not compatible with Bluetooth Low Energy (BLE) devices.