Stufin
Home Quick Cart Profile

HC-05 Bluetooth Module with with TTL Output (Pack of 20)

Buy Now on Stufin

Operating Frequency

2.4 GHz

Communication Distance

Up to 10 meters (33 feet)

Bluetooth Version

2.0 with EDR

Serial Port Protocol

SPP

Baud Rate

9600, 19200, 38400, 57600, 115200

TTL Output

3.3V or 5V

Power Consumption

Approximately 30mA

Operating Temperature

-20C to 75C

Operating Humidity

5% to 95% RH

Dimensions

12.7mm x 27.5mm

Weight

Approximately 2 grams

Applications

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

Robotics and automation

IoT devices and sensors

Wearable devices

Smart home devices

Industrial control systems

Medical devices

Automotive systems

Conclusion

The HC-05 Bluetooth Module with TTL Output is a reliable and cost-effective solution for wireless communication in various IoT applications. Its compact size, low power consumption, and TTL output make it an ideal choice for integration into space-constrained devices. With its wide range of features and technical specifications, this module is suitable for both technical professionals and informed hobbyists.

Pin Configuration

  • HC-05 Bluetooth Module with TTL Output Pin Description
  • The HC-05 Bluetooth Module is a widely used wireless communication module that enables devices to communicate with each other over short distances. The module has a total of 6 pins, which are used to establish connections and transmit data. Below is a detailed description of each pin and their functions:
  • Pin Description:
  • 1. VCC (Voltage Supply Pin)
  • Function: Provides power to the module
  • Voltage Range: 3.3V to 5V
  • Connection: Connect to a voltage source (e.g., a battery or a power supply) that meets the specified voltage range
  • 2. GND (Ground Pin)
  • Function: Provides a common ground reference for the module
  • Connection: Connect to the ground of the voltage source or the circuit
  • 3. TXD (Transmit Data Pin)
  • Function: Sends data from the microcontroller to the Bluetooth module
  • Connection: Connect to the TX (transmit) pin of a microcontroller or a serial communication device
  • Note: This pin is used for serial communication and should be connected to the TX pin of the microcontroller or serial device
  • 4. RXD (Receive Data Pin)
  • Function: Receives data from the Bluetooth module and sends it to the microcontroller
  • Connection: Connect to the RX (receive) pin of a microcontroller or a serial communication device
  • Note: This pin is used for serial communication and should be connected to the RX pin of the microcontroller or serial device
  • 5. EN (Enable Pin)
  • Function: Enables or disables the Bluetooth module
  • Connection: Connect to a digital output of a microcontroller or a logic signal that controls the module's power state
  • Note: A high logic level (1) on this pin enables the module, while a low logic level (0) disables it
  • 6. STATE (Status Pin)
  • Function: Indicates the Bluetooth module's status (blue LED indicates paired, red LED indicates unpaired)
  • Connection: Not necessary for operation, but can be connected to a LED or an indicator to monitor the module's status
  • Connection Structure:
  • To connect the HC-05 Bluetooth Module to a microcontroller or a serial communication device, follow this structure:
  • VCC -> Power source (3.3V to 5V)
  • GND -> Ground of the power source or circuit
  • TXD -> TX pin of the microcontroller or serial device
  • RXD -> RX pin of the microcontroller or serial device
  • EN -> Digital output of the microcontroller or logic signal controlling the module's power state
  • STATE -> Optional connection to a LED or indicator for status monitoring
  • Important Notes:
  • The HC-05 Bluetooth Module operates at a baud rate of 9600 by default. Make sure to configure the microcontroller or serial device to match this baud rate for proper communication.
  • The module requires a stable power supply and a good quality ground connection to ensure reliable operation.
  • When using the EN pin, ensure that the logic signal controlling the module's power state is clean and free from noise.
  • By following this pin description and connection structure, you can successfully integrate the HC-05 Bluetooth Module into your IoT project and establish reliable wireless communication.

Code Examples

HC-05 Bluetooth Module with TTL Output (Pack of 20) Documentation
Overview
The HC-05 Bluetooth Module is a widely used, low-cost, and compact Bluetooth 2.0 module that provides a simple way to add Bluetooth connectivity to microcontrollers, robots, and other electronic projects. This module operates at a frequency of 2.4 GHz and has a range of up to 10 meters. It is compatible with most Bluetooth devices and supports serial communication via TTL (Transistor-Transistor Logic) output.
Key Features
Bluetooth 2.0 specification
 Operating frequency: 2.4 GHz
 Range: up to 10 meters
 TTL output
 Supports serial communication
 Compatible with most Bluetooth devices
 Low power consumption
 Small size: 12.7 x 25.5 mm
Pinout
The HC-05 Bluetooth Module has the following pinout:
| Pin | Function |
| --- | --- |
| VCC | Power supply (3.3V - 5V) |
| GND | Ground |
| TXD | Transmit data |
| RXD | Receive data |
| EN | Enable (high to enable, low to disable) |
| STATE | State indicator (high when connected, low when disconnected) |
Code Examples
### Example 1: Basic Serial Communication using Arduino
This example demonstrates how to use the HC-05 Bluetooth Module with an Arduino Uno board to establish a serial communication connection between the module and a Bluetooth device (e.g., a smartphone).
```c++
#include <SoftwareSerial.h>
#define RX 2  // RX pin of Arduino Uno
#define TX 3  // TX pin of Arduino Uno
SoftwareSerial bluetooth(RX, TX);
void setup() {
  Serial.begin(9600);
  bluetooth.begin(9600);
}
void loop() {
  if (bluetooth.available() > 0) {
    String data = bluetooth.readStringUntil('
');
    Serial.println(data);
  }
  if (Serial.available() > 0) {
    String data = Serial.readStringUntil('
');
    bluetooth.println(data);
  }
}
```
### Example 2: Controlling an LED using Bluetooth and Python
This example demonstrates how to use the HC-05 Bluetooth Module with a Raspberry Pi board to control an LED using Bluetooth commands sent from a Python script.
```python
import time
import serial
# Open the serial connection to the HC-05 module
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
while True:
    # Read incoming Bluetooth data
    data = ser.readline().decode('utf-8').strip()
    if data:
        if data == 'led_on':
            # Turn on the LED
            print('LED is ON')
            # Send a confirmation message back to the Bluetooth device
            ser.write(b'LED is ON
')
        elif data == 'led_off':
            # Turn off the LED
            print('LED is OFF')
            # Send a confirmation message back to the Bluetooth device
            ser.write(b'LED is OFF
')
    time.sleep(0.1)
```
Additional Resources
HC-05 Bluetooth Module datasheet: [link](https://www.google.com/url?q=https://www.electronicscomp.com/datasheet/HC-05-Bluetooth-Module-Datasheet.pdf)
 Bluetooth 2.0 specification: [link](https://www.google.com/url?q=https://www.bluetooth.org/en/specification/adopted-specifications)
Troubleshooting and FAQs
For troubleshooting and FAQs, please refer to the HC-05 Bluetooth Module datasheet and the manufacturer's documentation.