Bluetooth Module HC-05
Bluetooth Module HC-05 is used to communicate between Arduino and other devices. HC-05 is used for a transparent wireless serial connection setup. It is simple to use Bluetooth SPP (Serial Port Protocol) module.
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 Pinout
This Bluetooth Module has 6 pins whose description is are as follow:-
1. Key/EN: If we want to bring Bluetooth module in command mode then we have to HIGH the enable pin. Otherwise, the Bluetooth module is in data mode by default. The HC-05 has a default baud rate in data mode is 9600bps and baud rate in command mode is 38400bps.
Following are the two modes of HC-05 module,
→ Data mode: For exchanging the data between two devices Data mode is used.
→ Command mode: To change the settings like password, name etc of HC-05 modules we use command mode. In this mode, we send AT commands to HC-05 by serial monitor.
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.
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. When the bluetooth module transmit data, RXD pin is used to receive that data.
6. State: It tells whether the module is connected or not.
HC-05 Module Information
- HC-05 has a red LED which indicates connection status, whether the Bluetooth is connected or not. Before connecting to the 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 the 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 the 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 the microcontroller to RX of HC-05 module.
- 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 an integrated antenna.
- With edge connector.
- 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.