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 is a widely-used wireless communication device that enables Bluetooth connectivity for electronic projects. It operates in both master and slave modes, allowing it to either initiate a connection or accept connections from other Bluetooth devices. This versatility makes it ideal for a range of applications, including robotics, home automation, and Internet of Things (IoT) projects.

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

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

Technical Specifications

Key Technical Details

  • Bluetooth Technology: Bluetooth 2.0+EDR (Enhanced Data Rate)
  • Frequency: 2.4GHz ISM band
  • Modulation: GFSK (Gaussian Frequency Shift Keying)
  • Supply Voltage: 3.3V to 6V (Typically 5V compatible)
  • Operating Current: 30mA (pairing), 10mA (communication)
  • Communication Range: Up to 10 meters (in open space)
  • Serial Interface: Asynchronous, full-duplex, serial port profile (SPP)
  • Default Baud Rate: 9600,8,N,1 (can be configured)
  • Security: Authentication and encryption
  • Profiles: Bluetooth Serial Port

Pin Configuration and Descriptions

Pin Number Name Type Description
1 KEY Input Module enters AT command mode when pulled HIGH
2 VCC Power Supply voltage (3.3V to 6V)
3 GND Power Ground
4 TXD Output Transmit Data (connect to RX of host device)
5 RXD Input Receive Data (connect to TX of host device)
6 STATE Output Indicates the connection status

Usage Instructions

Integrating HC-05 with a Circuit

  1. Power Connections: Connect the VCC pin to a 5V supply and the GND pin to the ground.
  2. Data Connections: Connect the TXD pin of the HC-05 to the RX pin of the host microcontroller (e.g., Arduino UNO) and the RXD pin to the TX pin of the microcontroller.
  3. AT Command Mode: To enter AT command mode for configuration, pull the KEY pin HIGH, power on the HC-05, and use a serial monitor to send commands.

Important Considerations and Best Practices

  • Ensure that the power supply is stable and within the specified voltage range.
  • Use a voltage divider or a level shifter if the host microcontroller operates at a different logic level than the HC-05.
  • When pairing with other devices, ensure that the HC-05 is in the appropriate mode (master or slave).
  • Avoid placing the module near sources of interference, such as Wi-Fi routers or microwave ovens.

Example Code for Arduino UNO

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(10, 11); // RX | TX

void setup() {
  pinMode(9, OUTPUT);  // KEY pin if needed for AT commands
  digitalWrite(9, HIGH); // Enable AT command mode
  Serial.begin(9600);
  BTSerial.begin(38400);  // HC-05 default speed in AT command mode
  Serial.println("Enter AT commands:");
}

void loop() {
  // Keep reading from HC-05 and send to Arduino Serial Monitor
  if (BTSerial.available())
    Serial.write(BTSerial.read());

  // Keep reading from Arduino Serial Monitor and send to HC-05
  if (Serial.available())
    BTSerial.write(Serial.read());
}

Troubleshooting and FAQs

Common Issues

  • Module not responding: Ensure that the module is powered correctly and that the TX/RX connections are correct.
  • Cannot pair or connect: Make sure the device is in the correct mode and is discoverable. Also, check the proximity of the devices.
  • Unstable connection: Interference from other devices can cause instability. Try changing the location of the HC-05.

Solutions and Tips for Troubleshooting

  • Power Cycle: If the module is unresponsive, try disconnecting and reconnecting the power.
  • LED Indicator: The STATE pin can be used to determine the connection status through the onboard LED.
  • AT Commands: Use AT commands to check and configure the settings of the HC-05.

FAQs

Q: How do I change the baud rate of the HC-05? A: Enter AT command mode and use the command AT+UART=<baud rate>,<stop bits>,<parity> to set the desired baud rate.

Q: Can the HC-05 be used to communicate with smartphones? A: Yes, the HC-05 can communicate with smartphones that have Bluetooth capabilities.

Q: What is the default password for pairing the HC-05? A: The default password is usually '1234' or '0000'.