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 (Part ID: Bluetooth) that enables wireless communication between devices. It is a versatile and cost-effective solution for implementing Bluetooth connectivity in various projects. The module supports both master and slave modes, making it suitable for a wide range of applications, including Internet of Things (IoT) devices, 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 smartphones
  • IoT devices for remote monitoring and control
  • Robotics projects requiring wireless control
  • Serial data transfer between devices
  • Home automation systems

Technical Specifications

The HC-05 module is designed to operate efficiently in embedded systems and offers the following key specifications:

Parameter Value
Operating Voltage 3.3V to 5V
Operating Current 30mA (typical)
Communication Protocol UART (Universal Asynchronous Receiver-Transmitter)
Baud Rate Default: 9600 bps (configurable)
Bluetooth Version 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 Description
VCC Power supply pin (3.3V to 5V). Connect to the power source.
GND Ground pin. Connect to the ground of the circuit.
TXD Transmit pin. Sends serial data to the connected device.
RXD Receive pin. Receives serial data from the connected device.
EN (Key) Enable pin. Used to switch between command mode and data mode.
STATE Indicates the connection status. High when connected, low when not connected.

Usage Instructions

The HC-05 module is straightforward to use in a circuit. Follow the steps below to integrate it into your project:

Connecting the HC-05 to an Arduino UNO

  1. Wiring the Module:

    • Connect the VCC pin of the HC-05 to the 5V pin on the Arduino.
    • Connect the GND pin of the HC-05 to the GND pin on the Arduino.
    • Connect the TXD pin of the HC-05 to the RX pin (pin 0) on the Arduino.
    • Connect the RXD pin of the HC-05 to the TX pin (pin 1) on the Arduino. Use a voltage divider (e.g., 1kΩ and 2kΩ resistors) to step down the Arduino's 5V TX signal to 3.3V for the HC-05's RXD pin.
  2. Configuring the Module:

    • By default, the HC-05 operates in slave mode. To configure it as a master or change settings, use AT commands in command mode.
    • To enter command mode, set the EN pin high (connect it to 3.3V) before powering the module.
  3. Arduino Code Example: Below is an example code to send and receive data between the Arduino and a Bluetooth-enabled device (e.g., smartphone):

    #include <SoftwareSerial.h>
    
    // Define RX and TX pins for SoftwareSerial
    SoftwareSerial BTSerial(10, 11); // RX = pin 10, TX = pin 11
    
    void setup() {
      Serial.begin(9600); // Start Serial Monitor communication
      BTSerial.begin(9600); // Start Bluetooth communication
      Serial.println("HC-05 Bluetooth Module Initialized");
    }
    
    void loop() {
      // Check if data is received from Bluetooth
      if (BTSerial.available()) {
        char data = BTSerial.read(); // Read the incoming data
        Serial.print("Received: ");
        Serial.println(data); // Print the received data to Serial Monitor
      }
    
      // Check if data is sent from Serial Monitor
      if (Serial.available()) {
        char data = Serial.read(); // Read the data from Serial Monitor
        BTSerial.write(data); // Send the data to the Bluetooth device
        Serial.print("Sent: ");
        Serial.println(data); // Print the sent data to Serial Monitor
      }
    }
    

Important Considerations and Best Practices

  • Voltage Levels: The RXD pin of the HC-05 is not 5V tolerant. Always use a voltage divider or level shifter to step down the Arduino's 5V TX signal to 3.3V.
  • Baud Rate: Ensure the baud rate of the HC-05 matches the baud rate of the microcontroller for proper communication.
  • Command Mode: Use command mode to configure the module (e.g., change the name, password, or mode). Enter command mode by setting the EN pin high before powering the module.
  • Range: The module's range is up to 10 meters in an unobstructed environment. Walls and other obstacles may reduce the range.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Response from the Module:

    • Ensure the VCC and GND pins are properly connected.
    • Verify that the RXD and TXD pins are correctly wired (crossed connections: TXD to RX, RXD to TX).
    • Check the baud rate settings in your code and ensure they match the module's default (9600 bps).
  2. Data Not Transmitting or Receiving:

    • Confirm that the Bluetooth device is paired with the HC-05.
    • Check for loose connections or incorrect wiring.
    • Ensure the module is in the correct mode (data mode for communication).
  3. Unable to Enter Command Mode:

    • Make sure the EN pin is set high before powering the module.
    • Use a terminal program (e.g., Arduino Serial Monitor) to send AT commands. Ensure "No line ending" is selected in the Serial Monitor settings.

FAQs

Q1: Can the HC-05 connect to multiple devices simultaneously?
A1: No, the HC-05 can only connect to one device at a time.

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

Q3: Can I use the HC-05 with a 3.3V microcontroller?
A3: Yes, the HC-05 operates at 3.3V logic levels and is compatible with 3.3V microcontrollers.

Q4: What is the difference between master and slave modes?
A4: In master mode, the HC-05 initiates connections with other Bluetooth devices. In slave mode, it waits for incoming connection requests.