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 Arduino, with the part ID "Bluetooth Module." It is designed to enable wireless communication between devices over the 2.4 GHz frequency range. The module supports both master and slave modes, making it a versatile choice for a wide range of applications. It is commonly used in Internet of Things (IoT) projects, robotics, and wireless data transfer systems.

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 communication between microcontrollers and devices
  • IoT systems for remote monitoring and control
  • Robotics for wireless control and data exchange
  • Serial communication between computers and embedded systems
  • Home automation projects

Technical Specifications

The HC-05 Bluetooth module is a robust and reliable component with the following key specifications:

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

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 device.
RXD 5 Receive data pin. Receives serial data from the connected device.
STATE 6 Indicates the connection status (HIGH when connected, LOW when disconnected).

Usage Instructions

How to Use the HC-05 in a Circuit

  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 your microcontroller (e.g., Arduino UNO).
    • Connect the RXD pin of the HC-05 to the TX pin of your microcontroller. Use a voltage divider if the microcontroller operates at 5V logic levels to avoid damaging the HC-05.
  3. Enable Communication:
    • For normal operation, leave the EN pin unconnected or LOW.
    • To configure the module using AT commands, pull the EN pin HIGH.
  4. Pair the Module:
    • Search for the HC-05 on your Bluetooth-enabled device (default name: "HC-05").
    • Pair using the default PIN code (usually "1234" or "0000").
  5. Establish Serial Communication: Use a serial terminal or microcontroller code to send and receive data.

Important Considerations and Best Practices

  • Voltage Levels: Ensure the RXD pin does not receive signals higher than 3.3V. Use a voltage divider if necessary.
  • Baud Rate: The default baud rate is 9600 bps. Configure it using AT commands if needed.
  • Connection Range: Keep the module within 10 meters of the paired device for reliable communication.
  • Interference: Avoid placing the module near sources of electromagnetic interference (e.g., motors, power supplies).

Example: Connecting HC-05 to Arduino UNO

Below is an example code to establish communication between an Arduino UNO and the HC-05 module:

// Example: HC-05 Bluetooth Module 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 communication
  Serial.begin(9600); // For communication with the PC
  Serial.println("Enter AT commands:");

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

void loop() {
  // Check if data is available from the Bluetooth module
  if (BTSerial.available()) {
    char data = BTSerial.read(); // Read data from HC-05
    Serial.write(data);          // Send data to the Serial Monitor
  }

  // Check if data is available from the Serial Monitor
  if (Serial.available()) {
    char data = Serial.read();   // Read data from the Serial Monitor
    BTSerial.write(data);        // Send data to the HC-05
  }
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Powering On

    • Cause: Insufficient or incorrect power supply.
    • Solution: Ensure the VCC pin is connected to a 3.3V or 5V power source and the GND pin is properly grounded.
  2. Unable to Pair with Device

    • Cause: Incorrect PIN code or module not in discoverable mode.
    • Solution: Use the default PIN code ("1234" or "0000"). Ensure the module is powered on and not already connected to another device.
  3. No Data Transmission

    • Cause: Incorrect TXD/RXD connections or mismatched baud rate.
    • Solution: Verify the TXD pin of the HC-05 is connected to the RX pin of the microcontroller and vice versa. Ensure the baud rate matches the module's configuration.
  4. AT Commands Not Working

    • Cause: EN pin not pulled HIGH or incorrect baud rate.
    • Solution: Pull the EN pin HIGH to enter AT command mode. Use a baud rate of 38400 bps for AT commands.

FAQs

  • Q: Can the HC-05 module communicate with smartphones?

    • A: Yes, the HC-05 can pair with smartphones that support Bluetooth 2.0 or higher.
  • Q: How do I reset the HC-05 to factory settings?

    • A: Enter AT command mode and send the command AT+ORGL.
  • 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 transmission.
  • Q: What is the difference between master and slave modes?

    • A: In master mode, the HC-05 initiates connections with other devices. In slave mode, it waits for incoming connections.

By following this documentation, you can effectively integrate the HC-05 Bluetooth module into your projects and troubleshoot common issues.