Stufin
Home Quick Cart Profile

HC-05 Bluetooth Module ( Pack of 25)

Buy Now on Stufin

Bluetooth Version

2.0 + EDR

Frequency

2.4 GHz

Data Transfer Rate

Up to 3 Mbps

Range

Up to 10 meters (33 feet)

Power Supply

3.3V to 5V DC

Current Consumption

30 mA (average), 100 mA (peak)

Operating Temperature

-20C to +75C

### Communication Features

Serial Communication

UART interface (RX, TX, VCC, GND)

Baud Rate

9600, 19200, 38400, 57600, 115200 bps

Data Format

8-bit data, 1-bit stop bit, no parity

### Other Features

LED Indicators

Power, Bluetooth connection, and data transmission status

Sleep Mode

Supports sleep mode to conserve power

Firmware

Upgradable via UART interface

Compact Design

Small size (12.5 mm x 25 mm) for easy integration into projects

### Package Contents

25x HC-05 Bluetooth Modules

25x 4-pin Headers (for easy connection to microcontrollers)

Applications

---------------

The HC-05 Bluetooth Module is suitable for a wide range of IoT applications, including

Robotics and robotic arms

Home automation systems

Wireless sensors and monitoring systems

Smart home devices

Wearable devices

Industrial automation systems

Important Notes

-------------------

The HC-05 module is a slave device and cannot act as a master device.

The module requires an external power supply.

The module's default baud rate is 9600 bps. Changing the baud rate requires reconfiguration.

The module's firmware can be upgraded using the UART interface.

By providing a reliable and compact wireless communication solution, the HC-05 Bluetooth Module is an excellent choice for IoT projects that require Bluetooth connectivity.

Pin Configuration

  • HC-05 Bluetooth Module (Pack of 25) Pinouts and Connection Guide
  • The HC-05 Bluetooth Module is a popular and compact wireless communication module used in various IoT projects. This documentation provides a detailed explanation of each pin on the HC-05 module, along with a step-by-step connection guide.
  • Pinouts:
  • The HC-05 Bluetooth Module has 6 pins, which are:
  • 1. VCC (Power Supply)
  • Function: Provides power to the module
  • Voltage: 3.3V to 5V
  • Connection: Connect to a power source, such as a battery or a voltage regulator
  • 2. GND (Ground)
  • Function: Ground connection for the module
  • Connection: Connect to the ground of the power source and the circuit
  • 3. TXD (Transmit Data)
  • Function: Serial transmit data from the microcontroller to the HC-05 module
  • Connection: Connect to the TX (transmit) pin of the microcontroller
  • 4. RXD (Receive Data)
  • Function: Serial receive data from the HC-05 module to the microcontroller
  • Connection: Connect to the RX (receive) pin of the microcontroller
  • 5. EN (Enable)
  • Function: Enables the HC-05 module
  • Connection: Connect to a digital output pin of the microcontroller or a resistor divider to set the module to AT command mode
  • 6. STATE (Status)
  • Function: Indicates the status of the HC-05 module (pairing, connected, etc.)
  • Connection: Connect to a digital input pin of the microcontroller to monitor the module's status
  • Connection Structure:
  • To connect the HC-05 Bluetooth Module to a microcontroller, follow this structure:
  • 1. Power Supply:
  • Connect VCC to a 3.3V or 5V power source.
  • Connect GND to the ground of the power source and the circuit.
  • 2. Serial Communication:
  • Connect TXD to the TX pin of the microcontroller.
  • Connect RXD to the RX pin of the microcontroller.
  • 3. Enable and Status:
  • Connect EN to a digital output pin of the microcontroller or a resistor divider to set the module to AT command mode.
  • Connect STATE to a digital input pin of the microcontroller to monitor the module's status.
  • Important Notes:
  • Make sure to use a level shifter or voltage divider to convert the 5V logic level of the microcontroller to 3.3V, which is the recommended operating voltage for the HC-05 module.
  • Use a breadboard or PCB to connect the module to the microcontroller and other components.
  • Ensure that the serial communication pins (TXD and RXD) are connected correctly to prevent data corruption or transmission errors.
  • By following this guide, you can successfully connect and use the HC-05 Bluetooth Module in your IoT projects.

Code Examples

HC-05 Bluetooth Module Documentation
Overview
The HC-05 Bluetooth Module is a widely used Bluetooth Serial Pass-Through Module that enables wireless communication between microcontrollers, computers, and other devices. It supports master and slave modes, making it a versatile component for various IoT applications.
Technical Specifications
Operating Voltage: 3.3V to 5V
 Operating Frequency: 2.4GHz
 Transmission Range: Up to 10 meters (30 feet)
 Data Transfer Rate: Up to 3Mbps
 Power Consumption: 30mA (average), 80mA (peak)
Pinout
VCC: Power Supply (3.3V to 5V)
 GND: Ground
 RXD: Receive Data
 TXD: Transmit Data
 STATE: Bluetooth Connection Status Indicator
 EN: Enable Pin (High to Enable)
Examples
### Example 1: Arduino Bluetooth Serial Communication
In this example, we will use the HC-05 Bluetooth Module to establish a serial communication between an Arduino Uno board and a smartphone or computer.
Hardware Requirements
Arduino Uno Board
 HC-05 Bluetooth Module
 Breadboard and Jumper Wires
Software Requirements
Arduino IDE (version 1.8.x or later)
Code
```c++
#include <SoftwareSerial.h>
// Define the RX and TX pins for the HC-05 module
SoftwareSerial btSerial(2, 3); // RX, TX
void setup() {
  Serial.begin(9600);
  btSerial.begin(9600);
}
void loop() {
  // Read data from Bluetooth module
  if (btSerial.available() > 0) {
    String data = btSerial.readStringUntil('
');
    Serial.print("Received: ");
    Serial.println(data);
  }
// Send data to Bluetooth module
  String sendData = "Hello, Bluetooth!";
  btSerial.println(sendData);
  Serial.print("Sent: ");
  Serial.println(sendData);
delay(1000);
}
```
 Explanation
In this example, we use the `SoftwareSerial` library to establish a serial communication between the Arduino Uno board and the HC-05 Bluetooth Module. We define the RX and TX pins for the module and initialize the serial communication at 9600bps. In the `loop()` function, we read data from the Bluetooth module and send data to the module using the `btSerial` object.
### Example 2: MicroPython Bluetooth Serial Communication with Raspberry Pi
In this example, we will use the HC-05 Bluetooth Module to establish a serial communication between a Raspberry Pi and a microcontroller or another device.
Hardware Requirements
Raspberry Pi Board
 HC-05 Bluetooth Module
 Breadboard and Jumper Wires
Software Requirements
MicroPython (version 1.12 or later)
Code
```python
import machine
import uart
# Initialize the UART interface for the HC-05 module
uart0 = machine.UART(0, baudrate=9600)
while True:
    # Read data from Bluetooth module
    data = uart0.readline()
    if data:
        print("Received: ", data.decode())
# Send data to Bluetooth module
    sendData = "Hello, Bluetooth!
"
    uart0.write(sendData.encode())
    print("Sent: ", sendData)
machine.sleep(1000)
```
Explanation
In this example, we use the `machine` and `uart` modules to establish a serial communication between the Raspberry Pi and the HC-05 Bluetooth Module. We initialize the UART interface for the module and set the baudrate to 9600bps. In the `while` loop, we read data from the Bluetooth module using the `readline()` method and send data to the module using the `write()` method.
Note: These examples are just a starting point, and you may need to modify the code to suit your specific requirements. Always ensure that the HC-05 module is properly configured and paired with the device before using it in your application.