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

How to Use HC05 Bluetooth Module: Examples, Pinouts, and Specs

Image of HC05 Bluetooth Module
Cirkit Designer LogoDesign with HC05 Bluetooth Module in Cirkit Designer

Introduction

The HC05 Bluetooth Module is a wireless communication device that allows for the transmission of data over short distances using Bluetooth technology. It operates on the Bluetooth 2.0 protocol and supports both master and slave modes, making it versatile for a wide range of applications. The module is commonly used in embedded systems, IoT applications, and robotics to enable wireless connectivity between devices such as microcontrollers, smartphones, and computers.

Explore Projects Built with HC05 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-Controlled Relay System
Image of home automaton: A project utilizing HC05 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 Bluetooth Communication Module
Image of HC-05 Connection with arduino: A project utilizing HC05 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 Nano and BNO055 Sensor with Bluetooth Connectivity
Image of Clutch Pedal Gyro: A project utilizing HC05 Bluetooth Module in a practical application
This circuit features an Arduino Nano interfaced with a BNO055 sensor and an HC-05 Bluetooth module. The Arduino communicates with the BNO055 via I2C (using A4 for SDA and A5 for SCL) and with the HC-05 via serial communication (using D0/RX and D1/TX for data transfer). The HC-05's Key and State pins are connected to D2 and D3 of the Arduino for module control, and all components share a common ground with the Arduino powered at 5V and the BNO055 at 3.3V from the Arduino's 3V3 output.
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 HC05 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 HC05 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 home automaton: A project utilizing HC05 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 HC-05 Connection with arduino: A project utilizing HC05 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 Clutch Pedal Gyro: A project utilizing HC05 Bluetooth Module in a practical application
Arduino Nano and BNO055 Sensor with Bluetooth Connectivity
This circuit features an Arduino Nano interfaced with a BNO055 sensor and an HC-05 Bluetooth module. The Arduino communicates with the BNO055 via I2C (using A4 for SDA and A5 for SCL) and with the HC-05 via serial communication (using D0/RX and D1/TX for data transfer). The HC-05's Key and State pins are connected to D2 and D3 of the Arduino for module control, and all components share a common ground with the Arduino powered at 5V and the BNO055 at 3.3V from the Arduino's 3V3 output.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sat_dish: compass example: A project utilizing HC05 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 in IoT devices
  • Remote control of robots and drones
  • Data logging and wireless sensor networks
  • Serial communication between microcontrollers and PCs
  • Home automation systems

Technical Specifications

The HC05 Bluetooth Module is designed for ease of use and reliable performance. Below are its 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 (configurable)
Range Up to 10 meters (unobstructed)
Frequency Band 2.4 GHz ISM
Modes Master and Slave
Dimensions 37.5mm x 15.2mm x 2.7mm

Pin Configuration and Descriptions

The HC05 module has six pins, as described in the table below:

Pin Name Description
1 EN (Key) Enables AT command mode when pulled HIGH. Leave LOW for normal operation.
2 VCC Power supply input (3.3V to 5V).
3 GND Ground connection.
4 TXD Transmit data pin. Sends serial data to the connected device.
5 RXD Receive data pin. Receives serial data from the connected device.
6 STATE Indicates the connection status (HIGH when connected, LOW when disconnected).

Usage Instructions

The HC05 Bluetooth Module is straightforward to use and can be easily integrated into a circuit. Below are the steps and considerations for using the module:

Connecting the HC05 to a Microcontroller

  1. Power Supply: Connect the VCC pin to a 5V power source and the GND pin to ground.
  2. Serial Communication:
    • Connect the TXD pin of the HC05 to the RX pin of the microcontroller.
    • Connect the RXD pin of the HC05 to the TX pin of the microcontroller. Use a voltage divider if the microcontroller operates at 5V logic levels to avoid damaging the HC05.
  3. Enable AT Command Mode (if needed):
    • Pull the EN pin HIGH before powering the module to enter AT command mode.
    • Use AT commands to configure the module (e.g., change the baud rate, set the device name, or switch between master and slave modes).

Example: Connecting HC05 to Arduino UNO

Below is an example of how to use the HC05 module with an Arduino UNO for basic serial communication:

Circuit Connections

  • HC05 VCC → Arduino 5V
  • HC05 GND → Arduino GND
  • HC05 TXD → Arduino RX (Pin 0)
  • HC05 RXD → Arduino TX (Pin 1) (use a voltage divider if necessary)

Arduino Code Example

#include <SoftwareSerial.h>

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

void setup() {
  // Initialize serial communication with the computer
  Serial.begin(9600);
  // Initialize serial communication with the HC05 module
  BTSerial.begin(9600);

  Serial.println("HC05 Bluetooth Module Test");
  Serial.println("Type a message to send via Bluetooth:");
}

void loop() {
  // Check if data is available from the HC05 module
  if (BTSerial.available()) {
    char received = BTSerial.read();
    Serial.print("Received: ");
    Serial.println(received);
  }

  // Check if data is available from the Serial Monitor
  if (Serial.available()) {
    char toSend = Serial.read();
    BTSerial.write(toSend); // Send data to the HC05 module
    Serial.print("Sent: ");
    Serial.println(toSend);
  }
}

Important Considerations and Best Practices

  • Voltage Levels: The HC05 operates at 3.3V logic levels. If your microcontroller uses 5V logic, use a voltage divider or level shifter for the RXD pin.
  • AT Command Mode: Always ensure the EN pin is HIGH before powering the module to enter AT command mode.
  • Baud Rate: The default baud rate is 9600 bps. Ensure your microcontroller's UART settings match this value.
  • Connection Status: Use the STATE pin to monitor the connection status of the module.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Responding to AT Commands

    • Ensure the EN pin is HIGH before powering the module.
    • Verify the baud rate is set to 38400 bps in AT command mode.
  2. No Data Transmission

    • Check the wiring of the TXD and RXD pins.
    • Ensure the baud rate of the microcontroller matches the HC05's baud rate.
  3. Unstable Connection

    • Reduce the distance between devices to within 10 meters.
    • Avoid interference from other 2.4 GHz devices.
  4. Module Not Pairing with Other Devices

    • Use AT commands to verify the module is in the correct mode (master or slave).
    • Ensure the pairing code (default: 1234) matches the other device's requirements.

FAQs

Q: Can the HC05 module communicate with smartphones?
A: Yes, the HC05 can pair with smartphones that support Bluetooth 2.0 or higher. Use a Bluetooth terminal app to send and receive data.

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

Q: Can I use the HC05 module for audio transmission?
A: No, the HC05 is designed for serial data communication and does not support audio transmission.

Q: How do I change the module's name?
A: Enter AT command mode and send the AT+NAME=<desired_name> command to set a new name.

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