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

How to Use HC-06: Examples, Pinouts, and Specs

Image of HC-06
Cirkit Designer LogoDesign with HC-06 in Cirkit Designer

Introduction

The HC-06 is a widely used Bluetooth module that enables wireless communication between devices. It operates as a slave device, meaning it can only accept connections from a master Bluetooth device such as a smartphone or a computer. Common applications include wireless control for robotics, serial communication between microcontrollers, and DIY electronics projects that require Bluetooth connectivity.

Explore Projects Built with HC-06

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 Health Monitoring System with Bluetooth Connectivity
Image of Vital Monitoring System: A project utilizing HC-06 in a practical application
This circuit is designed to monitor environmental and physiological parameters, display data, and provide wireless connectivity. It includes sensors for temperature and blood oxygen levels, visual output via an LCD, and indication through LEDs and a buzzer, all controlled by an Arduino UNO. The HC-06 Bluetooth module allows for remote data communication.
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-06 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-06 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
Arduino-Based Bluetooth-Controlled Pill Dispenser with LCD and Servo Mechanism
Image of spd: A project utilizing HC-06 in a practical application
This circuit is a Bluetooth-controlled pill dispenser that uses an Arduino UNO to manage four servos for dispensing pills, LEDs for status indication, and an I2C LCD for displaying messages. The HC-05 Bluetooth module receives commands to control the servos, while the buzzer provides audio feedback for invalid commands or successful operations.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with HC-06

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 Vital Monitoring System: A project utilizing HC-06 in a practical application
Arduino UNO Health Monitoring System with Bluetooth Connectivity
This circuit is designed to monitor environmental and physiological parameters, display data, and provide wireless connectivity. It includes sensors for temperature and blood oxygen levels, visual output via an LCD, and indication through LEDs and a buzzer, all controlled by an Arduino UNO. The HC-06 Bluetooth module allows for remote data communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sat_dish: compass example: A project utilizing HC-06 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-06 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
Image of spd: A project utilizing HC-06 in a practical application
Arduino-Based Bluetooth-Controlled Pill Dispenser with LCD and Servo Mechanism
This circuit is a Bluetooth-controlled pill dispenser that uses an Arduino UNO to manage four servos for dispensing pills, LEDs for status indication, and an I2C LCD for displaying messages. The HC-05 Bluetooth module receives commands to control the servos, while the buzzer provides audio feedback for invalid commands or successful operations.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Bluetooth Protocol: Bluetooth 2.0+EDR (Enhanced Data Rate)
  • Operating Frequency: 2.4 GHz ISM band
  • Modulation Mode: GFSK (Gaussian Frequency Shift Keying)
  • Supply Voltage: 3.6V to 6V (Typically 5V compatible)
  • Operating Current: 30mA (when paired)
  • Communication Interface: Serial/UART (Universal Asynchronous Receiver/Transmitter)
  • Default Baud Rate: 9600 bps (can be configured from 1200 to 1382400 bps)
  • Security: Authentication and encryption
  • Default Pairing Code: 1234 or 0000
  • Operating Temperature: -20°C to +55°C

Pin Configuration and Descriptions

Pin Number Name Description
1 KEY Used to switch the module to AT command mode
2 VCC Power supply (3.6V to 6V)
3 GND Ground connection
4 TXD Transmit Data, connects to RXD of the host device
5 RXD Receive Data, connects to TXD of the host device
6 STATE Indicates the status of the Bluetooth connection

Usage Instructions

Connecting to a Circuit

  1. Connect the VCC pin to the 5V output on the Arduino UNO.
  2. Connect the GND pin to one of the GND pins on the Arduino UNO.
  3. Connect the TXD pin of the HC-06 to the RX pin (Pin 0) on the Arduino UNO.
  4. Connect the RXD pin of the HC-06 to the TX pin (Pin 1) on the Arduino UNO.

Important Considerations and Best Practices

  • Ensure that the power supply is within the specified range to avoid damaging the module.
  • When connecting to a microcontroller, use voltage dividers or level shifters if necessary to match the logic levels.
  • Avoid placing the module near sources of interference, such as motors or high-frequency signals.
  • For stable performance, add a decoupling capacitor (typically 100nF to 1μF) between VCC and GND close to the module.

Example Arduino Code

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // Open the serial communication
  Serial.begin(9600);
  mySerial.begin(9600); // Set the baud rate for the HC-06
  Serial.println("Enter AT commands:");
}

void loop() {
  // Forward what Serial received to Software Serial Port
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
  // Forward what Software Serial received to Serial Port
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
}

This code sets up a pass-through from the Arduino's serial monitor to the HC-06, allowing you to send AT commands directly from the serial monitor to configure the HC-06.

Troubleshooting and FAQs

Common Issues

  • Module not responding to AT commands: Ensure the KEY pin is pulled HIGH to enter AT command mode.
  • Unable to pair or connect: Check that the device is in range, and the pairing code is correct.
  • Intermittent connectivity: Ensure there are no sources of interference nearby and that the power supply is stable.

Solutions and Tips

  • AT command mode: To enter AT command mode, the KEY pin must be HIGH before powering on the module.
  • LED Indicator: The onboard LED indicates the module's status. A blinking LED means it's not connected, while a solid LED indicates an established connection.
  • Baud Rate: If experiencing communication issues, verify that the baud rate of the HC-06 matches that of the host device.

FAQs

Q: Can the HC-06 act as a master device? A: No, the HC-06 is designed to function as a slave device.

Q: How do I change the name or PIN of the HC-06? A: You can change these settings using AT commands when the module is in AT command mode.

Q: What is the range of the HC-06 Bluetooth module? A: The typical range is up to 10 meters without obstacles, but this can vary depending on the environment and interference.

Q: Can I use the HC-06 with iOS devices? A: The HC-06 uses the SPP (Serial Port Profile), which is not supported by iOS. You would need a module that supports Bluetooth Low Energy (BLE) for iOS compatibility.