The HC-05 can be interfaced using the Serial protocol.
Note:
- There are other modules which are very similar like HC-08 and they might require slightly different interfacing.
- By just giving it power and ground it becomes Discover-able (fast blinking RED LED)
- From mobile or PC you can pair the device (shows up as HC-05) and then the blinking slows down indicating paired
- The PIN is 1234 (Default)
Serial Interfacing
In this experiment the aim is to interface the HC-05 from an Android mobile (using bluetooth) and see the responses in PC (over serial). We use the prologic USB to Serial converter for interfacing the PC (USB) to HC-05 (via serial). Refer picture below.
Note that the Arduino is just used to supply power and ground to both prolific and bluetooth.
Arduino | HC-05 | Prolific USB-Serial |
GND | GND | GND |
5V | +5V | |
3.3V | 3V3 | |
TX | RX | |
RX | TX |
Android and PC Software
From play store install any bluetooth Serial communication app. Connect to HC-05 (pair and connect. Default PIN is 1234).
Then on PC side connect the Prolific USB. Go to device manager and find that the prolific drivers are installed properly (See under Ports). If not use the attached drivers. Restart after install : LINK.
Note down the serial port number and use it to connect in TeraTerm Pro. In Tera Term pro set the Terminal settings to do “Local Echo” and also send CR+LF.
Communication
Now if you send anything from Android it will be displayed in Terminal and if anything is sent from Terminal it will be seen in Android