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 versatile and powerful device for wireless communication. It operates on Bluetooth 2.0 technology and can be used to establish a serial connection between two devices, enabling them to communicate over a short range of up to 10 meters (class 2). Common applications of the HC-05 include wireless control systems, data logging, and remote sensor monitoring. It is particularly popular in the DIY electronics community for projects involving Arduino, Raspberry Pi, and other microcontrollers.

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

Technical Specifications

Key Technical Details

  • Bluetooth protocol: Bluetooth Specification v2.0+EDR
  • Frequency: 2.4GHz ISM band
  • Modulation: GFSK (Gaussian Frequency Shift Keying)
  • Emission power: ≤4dBm, Class 2
  • Sensitivity: ≤-84dBm at 0.1% BER
  • Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps; Synchronous: 1Mbps/1Mbps
  • Security: Authentication and encryption
  • Profiles: Bluetooth serial port
  • Power supply: +3.3VDC 50mA
  • Working temperature: -20 ~ +75°C

Pin Configuration and Descriptions

Pin Number Name Description
1 KEY Used to switch between command and data mode (active high)
2 VCC Power supply (3.3V to 6V input, typically 5V)
3 GND Ground connection
4 TXD Transmit data (connect to RXD of the host device)
5 RXD Receive data (connect to TXD of the host device)
6 STATE Indicates the module status (paired/not paired)
7 EN Module enable pin (active high)

Usage Instructions

How to Use the HC-05 in a Circuit

  1. Powering the Module: Connect the VCC pin to a 5V supply and the GND pin to the ground of your circuit.
  2. Establishing Communication: Connect the TXD pin of the HC-05 to the RXD pin of your microcontroller and the RXD pin to the TXD pin.
  3. Pairing: The HC-05 module enters pairing mode automatically when powered on and not connected. Use your device's Bluetooth settings to find and pair with the module, typically using the code "1234" or "0000".
  4. Data Transmission: Once paired, data can be sent and received wirelessly between the connected devices.

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 you need to connect the RXD pin to a 5V microcontroller to avoid damaging the module.
  • Avoid placing the module near sources of interference, such as Wi-Fi routers or microwave ovens.
  • For reliable communication, keep the distance between devices within the effective range.

Example Code for Arduino UNO

#include <SoftwareSerial.h>

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

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

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

This example demonstrates how to set up a basic serial communication between an Arduino UNO and the HC-05 Bluetooth module. The code initializes a SoftwareSerial instance to communicate with the HC-05 module and sets up the serial communication with the PC for debugging.

Troubleshooting and FAQs

Common Issues

  • Module not responding: Ensure that the module is powered correctly and that the TXD and RXD pins are connected properly.
  • Unable to pair: Check if the module is in pairing mode and that the correct pairing code is used.
  • Intermittent connection: Make sure there are no physical obstructions or sources of interference between the devices.

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 monitored for the module's status; a blinking LED indicates that it is not paired.
  • AT Commands: Use AT commands to configure the module and troubleshoot issues. Ensure the KEY pin is high to enter AT command mode.

FAQs

Q: What is the default baud rate of the HC-05? A: The default baud rate for communication is 9600 bps, but it can be changed using AT commands.

Q: Can I use the HC-05 with a 3.3V microcontroller? A: Yes, the HC-05 can be interfaced with 3.3V logic directly. However, ensure that the VCC is supplied with the correct voltage.

Q: How do I reset the HC-05 to factory settings? A: You can reset the HC-05 by issuing the AT command AT+ORGL.

Q: Can the HC-05 be used as both master and slave? A: Yes, the HC-05 can be configured as either a master or a slave device using AT commands.

This documentation provides a comprehensive guide to using the HC-05 Bluetooth Module. For further assistance, consult the datasheet or contact technical support.