Electronics

Bluetooth HC-05 Module 6Pins

AED 24.90

Low stock
1

Description

The Bluetooth HC-05 Module is a reliable and efficient Bluetooth communication module that is ideal for use in a wide range of applications. With its compact and lightweight design, six-pin interface, and support for Bluetooth 2.0+EDR communication, the HC-05 module provides a flexible and easy-to-use solution for wireless communication needs.

 

Package Includes:

  • 1 x Bluetooth HC-05 Module 6Pins

 

Features:

  • Wireless communication module for easy and reliable Bluetooth connectivity
  • Compact and lightweight design for easy integration in embedded systems, robotics, and other applications
  • Six pins for easy integration with other components
  • Frequency of 2.4GHz ISM band, allowing for high-speed wireless communication
  • Modulation of GFSK (Gaussian Frequency Shift Keying) for reliable and efficient data transfer
  • Emission power of ≤4dBm, Class 2, for a range of up to 10 meters, depending on the environment
  • Sensitivity of ≤-84dBm at 0.1% BER, ensuring reliable communication in noisy environments
  • Speed of up to 2.1Mbps (Max) for asynchronous communication, and up to 1Mbps for synchronous communication
  • Authentication and encryption for secure communication
  • Profiles for Bluetooth serial port, allowing for easy integration with other devices
  • Operates on a supply voltage range of +3.3V to 6.0V, compatible with a wide range of microcontrollers and other electronic devices
  • Low supply current of 30mA for efficient power consumption
  • Working temperature range of -20 ~ +75 Centigrade for use in a variety of environments
  • Follows IEEE 802.15.1 standardized protocol, allowing for building wireless Personal Area Networks (PANs)
  • Uses frequency-hopping spread spectrum (FHSS) radio technology for reliable and efficient data transfer over the air.

 

Description:

The Bluetooth HC-05 Module is a wireless communication module that allows for easy and reliable Bluetooth connectivity in a wide range of applications. With its compact and lightweight design, the HC-05 module is ideal for use in embedded systems, robotics, and other applications where wireless communication is necessary. The HC-05 module features six pins for easy integration with other components, and supports Bluetooth 2.0+EDR (Enhanced Data Rate) communication, allowing for high-speed data transfer. It operates on a voltage range of 3.3V to 5V, making it compatible with a wide range of microcontrollers and other electronic devices. The HC-05 module supports both master and slave modes, allowing for flexible configuration options and making it ideal for use in a wide range of applications. It has a range of up to 10 meters, depending on the environment, and can support up to seven simultaneous connections.

Principle of Work:

The Bluetooth HC-05 Module operates on the principle of wireless communication using Bluetooth technology. When connected to a device, the module uses frequency-hopping spread spectrum (FHSS) radio technology to send and receive data over the air. The module communicates with other Bluetooth-enabled devices using a standardized protocol, IEEE 802.15.1 and employs a Gaussian Frequency Shift Keying (GFSK) modulation scheme to efficiently transfer data. The module supports both asynchronous and synchronous communication, with a maximum speed of up to 2.1Mbps for asynchronous communication, and up to 1Mbps for synchronous communication. To ensure secure communication, the HC-05 module provides authentication and encryption mechanisms. This makes it a reliable and secure option for wireless communication needs.

To connect the Bluetooth HC-05 module to a mobile device, you need to follow these steps:

  1. Power on the HC-05 module and make sure it is in discoverable mode. This can be done by setting the module to "AT mode" and then sending the "AT+ROLE=0" command to set it as a slave device.

  2. On your mobile device, enable Bluetooth and search for available devices.

  3. Once the HC-05 module appears in the list of available devices, select it to start the pairing process.

  4. If prompted, enter the default password for the HC-05 module, which is usually "1234" or "0000".

  5. After successful pairing, you should be able to establish a Bluetooth connection between the HC-05 module and your mobile device. You can then use the module to send and receive data wirelessly.

Pinout of the Module:

 

 

  • VCC: This is the power supply pin, which is typically connected to a 5V power source (there is a voltage regulator on the module).
  • GND: This is the ground pin, which is typically connected to the ground of the power supply.
  • TXD: This is the transmit pin, which is used to send data from the module to another device.
  • RXD: This is the receive pin, which is used to receive data from another device into the module.
  • KEY/PIN34: This is the pin that controls whether the module enters into AT command mode or data transmission mode. When this pin is high (i.e., set to VCC), the module enters into AT command mode. When this pin is low (i.e., set to GND), the module enters into data transmission mode.
  • STATE/PIN31: This is the pin that indicates the state of the module. When the module is in AT command mode, this pin is high. When the module is in data transmission mode, this pin is low.

It's important to note that the TXD and RXD pins of the HC-05 module are not 5V tolerant, so they should not be directly connected to a 5V microcontroller. To avoid damaging the module, a voltage divider or level shifter circuit can be used to bring the voltage down to the 3.3V range.

 

Applications:

  • Wireless data transfer: The HC-05 module can be used to wirelessly transmit data between devices, such as between a microcontroller and a computer or mobile device.
  • Wireless control: The module can be used to wirelessly control devices, such as robots, drones, or home automation systems.
  • IoT applications: The HC-05 module can be used in IoT (Internet of Things) applications to provide wireless connectivity between sensors, actuators, and other devices.
  • Wireless audio streaming: The module can be used to stream audio wirelessly between devices, such as between a smartphone and a speaker or headphones.
  • Wearable devices: The HC-05 module can be used in wearable devices, such as smartwatches or fitness trackers, to provide wireless connectivity with other devices.
  • Automotive applications: The module can be used in automotive applications, such as in-car entertainment systems or hands-free calling systems.

 

 

Circuit:

  • Connect the anode (+) of the LED to digital pin 8 of the Arduino board.
  • Connect the cathode (-) of the LED to a current-limiting resistor (e.g., 220 ohms).
  • Connect the other end of the resistor to the GND pin of the Arduino board.
  • Connect the VCC pin of the HC-05 module to the 5V pin of the Arduino board.
  • Connect the GND pin of the HC-05 module to the GND pin of the Arduino board.
  • Connect the TXD pin of the HC-05 module to a digital pin (2) of the Arduino board.
  • Connect the RXD pin of the HC-05 module to a voltage divider made up of two resistors, with one end of the voltage divider connected to the digital pin 3 used for TXD and the other end connected to the 3.3V pin of the Arduino board. Common resistor values for the voltage divider are 10kΩ and 20kΩ.
  • Connect the KEY pin of the HC-05 module to the 3.3V pin of the Arduino board.

 

 

 

 

Library: 

The SoftwareSerial library allows serial communication on other digital pins of an Arduino board, using software to replicate the functionality (hence the name "SoftwareSerial"). It is possible to have multiple software serial ports with speeds up to 115200 bps. A parameter enables inverted signaling for devices which require that protocol.

no library Installation is needed.

 

Code:

This is an example Arduino code for controlling the LED with the HC-05 module:

 

#include "SoftwareSerial.h"

// Define the LED pin
#define LED_PIN 8

// Define the HC-05 module's TX and RX pins
#define HC05_RX_PIN 2
#define HC05_TX_PIN 3
SoftwareSerial mySerial (HC05_TX_PIN, HC05_RX_PIN);
// Define the baud rate for serial communication with HC-05 module
#define BAUD_RATE 9600

void setup() {
  // Initialize the LED pin as an output
  pinMode(LED_PIN, OUTPUT);
  
  // Initialize the serial communication with HC-05 module
  Serial.begin(BAUD_RATE);
}

void loop() {
  // Check if there is any data available from HC-05 module
  if (Serial.available() > 0) {
    // Read the incoming data from HC-05 module
    char data = Serial.read();
    
    // If the incoming data is '1', turn on the LED
    if (data == '1') {
      digitalWrite(LED_PIN, HIGH);
    }
    // If the incoming data is '0', turn off the LED
    else if (data == '0') {
      digitalWrite(LED_PIN, LOW);
    }
  }
}




To connect the HC-05 module to an Android phone, you can use a Bluetooth terminal application such as "Serial Bluetooth Terminal" or "Bluetooth Terminal HC-05" which are available on Google Play Store.

Here are the steps to connect the HC-05 module to the Android phone:

Turn on Bluetooth on your Android phone.
Open the Bluetooth terminal application.
Search for available Bluetooth devices and select the HC-05 module from the list.
Pair the HC-05 module with your Android phone by entering the default pairing code "1234" or "0000".
Once the HC-05 module is paired, open the terminal in the Bluetooth terminal application and enter '1' to turn on the LED or '0' to turn off the LED.

Technical Details: 

  • Frequency: 2.4GHz ISM band
  • Modulation: GFSK (Gaussian Frequency Shift Keying)
  • Emission power: ≤4dBm, Class 2
  • Sensitivity: ≤-84dBm at 0.1% BER
  • Speed: Asynchronous communication: 2.1Mbps (Max) / 160 kbps, Synchronous communication: 1Mbps/1Mbps
  • Security: Authentication and encryption
  • Profiles: Bluetooth serial port
  • Supply Voltage: +3.3V to 6.0 V
  • Supply Current: 30mA
  • Working temperature: -20 ~ +75Centigrade
  • Dimension: 26.9mm x 13mm x 2.2 mm
  • HC-05 Bluetooth module follows the IEEE 802.15.1 standardized protocol, through which one can build a wireless Personal Area Network (PAN). It uses frequency-hopping spread spectrum (FHSS) radio technology to send data over the air.

 

Resources:

Comparisons:

HC-05 and HC-06 are both Bluetooth modules used for wireless communication. However, there are a few differences between them:

  1. Functionality: HC-05 is a master/slave module, which means it can act as a master or a slave device. HC-06, on the other hand, is a slave-only module, which means it can only act as a slave device.
  2. Pinout: The pinout of the HC-05 and HC-06 modules is different. HC-05 has six pins, whereas HC-06 has four pins.
  3. Default settings: HC-05 is usually set to operate in a transparent serial communication mode by default, whereas HC-06 is usually set to operate in a command/response mode by default.
  4. Price: HC-05 is generally more expensive than HC-06, as it offers more functionality and features.
  5. Range: Both modules operate on the 2.4GHz ISM band, but HC-05 has a longer range than HC-06, up to 100 meters compared to 10 meters for HC-06.

Finally, HC-05 offers more functionality and flexibility, but comes at a higher cost, while HC-06 is a simpler and more affordable module with a shorter range.