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 versatile and powerful Bluetooth module that enables wireless communication between devices. It operates on Bluetooth 2.0 technology and can serve as both a master and a slave device. Common applications of the HC-05 include wireless control systems, serial communication, and remote data logging.

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!
Arduino UNO-Based Smart Irrigation System with Motion Detection and Bluetooth Connectivity
Image of Copy of wiring TA: A project utilizing Hc 05 in a practical application
This circuit is a microcontroller-based control and monitoring system. It uses an Arduino UNO to read from a DHT22 temperature and humidity sensor and an HC-SR501 motion sensor, display data on an LCD, and control a water pump and an LED through a relay. The HC-05 Bluetooth module allows for wireless communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Bluetooth-Controlled Robotic System with IR Sensor Feedback
Image of cánh tay robot dành cho người bị mất khuỷu tay: A project utilizing Hc 05 in a practical application
This circuit features two Arduino UNO microcontrollers interfaced with multiple HC-05 Bluetooth modules for wireless communication. The Arduinos are also connected to several servo motors and IR sensors, likely for a robotic or remote control application where sensor input is used to drive the servos. Power is supplied to the components through connections to 18650 Li-ion batteries.
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 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 Mega 2560 Bluetooth-Controlled Ultrasonic Distance Measurement
Image of circuitcycle: A project utilizing Hc 05 in a practical application
This circuit features an Arduino Mega 2560 microcontroller interfaced with an HC-05 Bluetooth Module and an HC-SR04 Ultrasonic Sensor. The HC-05 is powered by the Arduino's VIN pin and is grounded to the Arduino's GND, enabling wireless communication capabilities. The HC-SR04 is powered by the Arduino's 5V output and uses two digital PWM pins (D7 for TRIG and D6 for ECHO) to measure distances via ultrasonic waves.
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 Copy of wiring TA: A project utilizing Hc 05 in a practical application
Arduino UNO-Based Smart Irrigation System with Motion Detection and Bluetooth Connectivity
This circuit is a microcontroller-based control and monitoring system. It uses an Arduino UNO to read from a DHT22 temperature and humidity sensor and an HC-SR501 motion sensor, display data on an LCD, and control a water pump and an LED through a relay. The HC-05 Bluetooth module allows for wireless communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of cánh tay robot dành cho người bị mất khuỷu tay: A project utilizing Hc 05 in a practical application
Bluetooth-Controlled Robotic System with IR Sensor Feedback
This circuit features two Arduino UNO microcontrollers interfaced with multiple HC-05 Bluetooth modules for wireless communication. The Arduinos are also connected to several servo motors and IR sensors, likely for a robotic or remote control application where sensor input is used to drive the servos. Power is supplied to the components through connections to 18650 Li-ion batteries.
Cirkit Designer LogoOpen Project in Cirkit Designer
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 circuitcycle: A project utilizing Hc 05 in a practical application
Arduino Mega 2560 Bluetooth-Controlled Ultrasonic Distance Measurement
This circuit features an Arduino Mega 2560 microcontroller interfaced with an HC-05 Bluetooth Module and an HC-SR04 Ultrasonic Sensor. The HC-05 is powered by the Arduino's VIN pin and is grounded to the Arduino's GND, enabling wireless communication capabilities. The HC-SR04 is powered by the Arduino's 5V output and uses two digital PWM pins (D7 for TRIG and D6 for ECHO) to measure distances via ultrasonic waves.
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
  • Operating Voltage: 3.3V (with 3.6V to 6V input voltage via onboard voltage regulator)
  • Operating Current: 30mA (when paired and connected)
  • Operating Temperature: -40°C to +105°C

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.6V to 6V (5V typical)
3 GND Power Ground
4 TXD Output Transmit Data (connect to RXD of MCU)
5 RXD Input Receive Data (connect to TXD of MCU)
6 STATE Output Indicates the connection status

Usage Instructions

Integrating HC-05 into 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 RXD pin of your microcontroller, and the RXD pin to the TXD pin.
  3. Pairing Mode: To enter the pairing mode, power the HC-05 without setting the KEY pin high. The LED on the module will blink, indicating it's in pairing mode.
  4. AT Command Mode: To configure the HC-05, set the KEY pin high upon power-up. This will allow you to send AT commands to the module for various settings.

Best Practices

  • Use a voltage divider or a level shifter when connecting RXD to a 5V microcontroller to avoid damaging the HC-05's 3.3V logic.
  • Ensure that the HC-05 is not in AT command mode during normal operation.
  • Always disconnect the HC-05 from power before making or changing connections.

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);
  Serial.println("Enter AT commands:");
  BTSerial.begin(38400);  // HC-05 default speed in AT command mode
}

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

  • LED Not Blinking: Ensure the module is properly powered. Check the voltage at the VCC and GND pins.
  • Cannot Pair: Make sure the device is in pairing mode and that the correct password (default is usually "1234" or "0000") is used.
  • No Response to AT Commands: Confirm that the KEY pin is set high to enable AT command mode and that the baud rate matches the HC-05's default rate.

FAQs

Q: How do I change the name or PIN of the HC-05 module? A: Enter AT command mode and use the commands AT+NAME=<newname> and AT+PIN=<newpin>.

Q: Can I use the HC-05 with a 3.3V microcontroller? A: Yes, the HC-05 operates at 3.3V logic levels, making it compatible with 3.3V systems.

Q: How can I check if my HC-05 is working? A: Power the HC-05 and use a smartphone with Bluetooth to search for new devices. The HC-05 should appear in the list of available devices.

Q: What is the range of the HC-05? A: The HC-05 is a Class 2 Bluetooth device, typically with a range of about 10 meters (30 feet) without obstructions.

Q: How do I reset the HC-05 to factory settings? A: Enter AT command mode and issue the AT+ORGL command.

This documentation provides a comprehensive guide to the HC-05 Bluetooth module, covering technical specifications, usage instructions, example code for Arduino UNO, and troubleshooting tips. For further assistance, consult the HC-05 datasheet or contact technical support.