Bluetooth Module HC-05
HC-05 is a Bluetooth module that is very easy to use and it is based on SPP (Serial Port Protocol) made for transparent wireless serial connection setup. HC-05 Bluetooth Module can be used in master or slave configuration, making a good choice for wireless communication. It has an EDR (Enhanced Data Rate) 3MBPS Modulation with Bluetooth V2.0 with complete 2.4GHz radio transceiver and baseband. It uses CSR Blue core 04‐External single chip Bluetooth system with CMOS technology and with AFH (Adaptive Frequency Hopping Feature).
Hardware Features
- Typical ‐80dBm sensitivity
- With edge connector
- 3 to 5 V I/O
- UART interface with programmable baud rate
- Up to +4dBm RF transmit power
- With integrated antenna
- PIO (Programmable Input/Output) control
Software Features
- Slave default Baud rate: 9600, Data bits: 8, Stop bit: 1, Parity: No parity.
- Auto‐connect to the last device on power as default.
- Permit pairing device to connect as default.
- Auto‐pairing Pin code: “1234”or “0000” as default.
Project Description:
In this tutorial we are using HC-05 Bluetooth module along with Arduino UNO microcontroller for sending data over Bluetooth for printing serial output on monitor wirelessly with android.
Note: The serial monitor is the 'tether' between the computer and your Arduino.
Input will be given via an android app which is connected to HC-05 Bluetooth module wirelessly which will receive data from android and send it to Arduino Uno via TX pin which will process the input accordingly.
Let's start, we will need:
- An Arduino, we will be using Arduino UNOs.
- Commonly available Bluetooth module i.e.- HC-05
- Jumper wires
- Mobile phone
- Android app (Arduino Bluetooth voice controller)
Step 1: Connecting Bluetooth module HC-05 with Arduino
HC-05 is a serial port Bluetooth module easy to use module .If you see the pin configuration of HC-05, there are total six pins but we only need 4 middle one.
- Connect VCC with 5V of Arduino
- Connect GND with any GND pin of Arduino
- Connect TX pin with RX pin of Arduino
- Connect RX pin with TX pin of Arduino
- Now you can see the red Led blinking on the HC-05 module which indicate that the module is working and we are ready to go for next step.
Step 2: Write code for it
Open Arduino IDE and copy paste this code
String value;
void setup() // run once, when the sketch starts
{
Serial.begin(9600); // set the baud rate to 9600, same should be of your Serial Monitor
}
void loop()
{
if (Serial.available()) {
value = Serial.readString(); //read the input
Serial.println(value);
Serial.println("\n");
}
}
Step 3: Connecting HC-05 with Android app
- Download and install app from this link
- Open the app
- Tap on connected
- Pair with HC-05 Bluetooth (password _0000 or 1234)
- Select HC-05 from the list
Step 4: Receiving transmitted data via Serial Monitor
- Open Serial Monitor in Arduino IDE
- Tap on “On” In App
- You will see the receiving data on Serial Monitor