bluetooth hc 05

Bluetooth Module HC-05

Bluetooth Module HC-05 module is a simple to use Bluetooth SPP (Serial Port Protocol) module, designed for transparent wireless serial connection setup.

HC-05 can be used in a Master or Slave configuration, making it a great solution for wireless communication.

This device is used to send data to Arduino and different types of devices for controlling things or communicate.

For example, Bluetooth Module is used in Home Automation using Arduino to control appliance using Bluetooth.

HC-05 has 6 pins are STATE, RXD, TXD, GND, VCC, and EN.

This Bluetooth module is based on Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with a complete 2.4GHz radio transceiver and baseband.

The Bluetooth module HC-05 is a MASTER/SLAVE module. By default the factory setting is SLAVE. To change the role of the module (Master or Slave) can be configured only by AT COMMANDS.

Bluetooth Module HC-05

Bluetooth Module HC-05 Pinout

Bluetooth Module HC-05 Pinout

Pin Description

This Bluetooth Module has 6 pins whose description is are as follow:-

1.  Key/EN: This pin is used to bring Bluetooth module in AT commands mode. For command mode, Key/EN pin will be set to HIGH. Otherwise, by default, it is in data mode. The default baud rate of HC-05 in command mode is 38400 bps and 9600 bps in data mode.

HC-05 module has two modes,

→ Data mode: To exchange of data between devices.

→ Command mode: It uses AT commands which are used to change the setting of HC-05. To send these commands to the module serial port is used.

2.  VCC: To give power or current to the module, this pin will be connected to a 5V or 3.3V pin.

3.  GND: Ground Pin of the module.

4.  TXD: Transmit Serial data. It is used to wirelessly received data by Bluetooth module transmitted out serially on the TXD pin.

5.  RXD: Receive data serially. It is used to receive data that will be transmitted wirelessly by Bluetooth module.

6.  State: It tells whether the module is connected or not.

HC-05 Module Information

  • HC-05 has red LED which indicates connection status, whether the Bluetooth is connected or not. Before connecting to HC-05 module this red LED blinks continuously in a periodic manner. When it gets connected to any other Bluetooth device, its blinking slows down to two seconds.
  • This module works on 3.3 V. We can connect 5V supply voltage as well since the module has on board 5 to 3.3 V regulator.
  • As HC-05 Bluetooth module has 3.3 V level for RX/TX and microcontroller can detect 3.3 V level, so no need to shift transmit level of HC-05 module. But we need to shift the transmit voltage level from microcontroller to RX of HC-05 module.

Hardware Features

Typical ‐80dBm sensitivity.
Up to +4dBm RF transmit power.
3.3 to 5 V I/O.
PIO (Programmable Input/Output) control.
UART interface with programmable baud rate.
With integrated antenna.
With edge connector.

Software Features

The default baud rate for Slave Mode is 9600, data bits are 8, Stop bit is 1 and no parity.
By default, it auto-connect to the last paired device.
Permit the pairing device to connect as default.
Auto‐pairing PIN CODE:”1234” as default.

Command Mode for Bluetooth Module

To change the setting of the HC-05 Bluetooth module like change password for connection, baud rate, Bluetooth device’s name, etc we use command mode.
To do this, HC-05 has AT commands.
To use the HC-05 Bluetooth module in AT command mode, connect “Key/EN” pin to High (VCC).
In command mode the default baud rate of HC-05 is 38400bps.
The following are the AT commands generally used to change the setting of the Bluetooth module.
To send the commands, connect HC-05 Bluetooth module to the PC via USB and transmit (write) these command through the serial terminal (monitor) of PC.

Command Description Response
AT Checking communication OK
AT+PSWD=XXXX Set Password e.g. AT+PSWD=4567 OK
AT+NAME=XXXX Set Bluetooth Device Name e.g. AT+NAME=MyHC-05 OK
AT+UART=Baud rate, stop bit, parity bit Change Baud rate e.g. AT+UART=9600,1,0 OK
AT+VERSION? Respond version no. of Bluetooth module +Version: XX OK e.g. +Version: 2.0 20130107 OK
AT+ORGL Send detail of setting done by manufacturer Parameters: device type, module mode, serial parameter, passkey,etc.

Our Youtube Channel