This blog is all about interfacing the Bluetooth module HC-05 with ARIES v3 Board. HC‐05 module is an easy-to-use Bluetooth SPP (Serial Port Protocol) module, designed for a transparent wireless serial connection setup. The HC-05 Bluetooth Module can be used in a Master or Slave configuration, making it a great solution for wireless communication. This serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps modulation with a complete 2.4GHz radio transceiver and baseband. It uses the CSR Bluecore 04‐External single-chip Bluetooth system with CMOS technology and AFH (Adaptive Frequency Hopping Feature).
HC-05 module
HC-05 has a red LED that 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 a power supply range of 3.6V-6V. We can connect 5V supply voltage to the module which has an onboard 5 to 3.3 V regulator.
The HC-05 Bluetooth module has a 3.3 V level for RX/TX and ARIES v3 Board also has the same voltage levels.
Pair HC-05 and smartphone:
- Search for a new Bluetooth device from your phone. You will find a Bluetooth device with the “HC-05” name.
- Click on connect/pair device option; the default pin for HC-05 is 1234 or 0000.
Prerequisites
- Windows 10 or above/Linux (64 bit)
- Arduino IDE
- VEGA ARIES Board support package
Components Required
- ARIES v3.0 Board
- USB type C to USB type A cable
- HC-05 Bluetooth Module
- Jumper Wires
- VEGA Bluetooth App
Connection Diagram
Bluetooth Module | ARIES v3 Board |
VCC | +5V |
GND | GND |
RXD | TX1 |
TXD | RX1 |
Procedure
Open and set up the Arduino IDE as described in Getting Started with ARIES v3.0.
- Make sure you have selected ARIES v3 Board from Tools -> Board -> VEGA Processor: ARIES Boards -> ARIES v3
- Select Tools -> Flash Mode -> Enabled
- Select Programmer as VEGA FLASHER from Tools -> Programmer -> VEGA FLASHER
- Also select appropriate port from Tools -> Port -> COM* (ARIES Board)
NOTE: If the module is not working properly, then connect the HC-05 Bluetooth module’s GND pin first to ARIES board and then connect VCC of Bluetooth module to 5V of ARIES v3 and check whether the red and blue led light is constantly blinking.
The constant blinking of red and blue light indicates the Bluetooth module is powered ON. Now connect the TXD pin of Bluetooth to RX-1 pin of ARIES and RXD pin of Bluetooth to TX-1 pin of ARIES board.
After doing the connections, Download VEGA Bluetooth App from your Android phone using the link below!
https://drive.google.com/file/d/1I8Gzlu3QLy9f35Pzw_uch31uhC18UtSt/view?usp=sharing
Now, Open Files -> Examples -> Under Examples for ARIES v3 -> UART -> Bluetooth_HC05 -> led Control
Finally Upload the code to ARIES v3.0 board
Once the code is uploaded, open the Bluetooth of your Android phone and pair the Bluetooth device with your Android phone. The Bluetooth name will be HC-05 and password for pairing should be given as “1234“. Once the device is paired, you can see the HC-05 device name in your phone’s paired Bluetooth connections
Tap on HC-05 name to pair the module with phone
Give the password as “1234”
After pairing, you can see the device name in Paired devices list of Bluetooth
Now try to scan and connect to the Bluetooth device ‘HC-05’, on your VEGA Bluetooth App in your Android phone
Click on the Scan option in VEGA Bluetooth App
Tap on HC-05 to pair with VEGA Bluetooth App
You can see Device Connected message on the App once the device got paired
Once the device is connected, Then try to toggle LED by pressing “LED ON ” button. You can see internal GREEN LED of the ARIES v3 board turning on and off based on the LED ON button press from VEGA Bluetooth App.
Output
Try to toggle LED by pressing “LED ON/OFF ” button. You can see internal GREEN LED of the ARIES v3 board turning on and off. Also open the serial Monitor at 115200 baud rate to see the Internal LED status on the serial monitor.
Tap LED ON button to turn on Internal GREEN LED
Tap LED OFF button to turn off Internal GREEN LED