The HC-05 Bluetooth module (and related modules) is a very popular module for wireless communication due to its price and capabilities. In this article, we’ll talk about how to wire and setup the module for operation with an Arduino board. Most HC-05 modules require a 5V operating voltage.
Before we start with the first example, controlling an Arduino using a smartphone, let’s take a closer look at the HC-05 Bluetooth module. Comparing it to the HC-06 module, which can only be set as a Slave, the HC-05 can be set as Master as well which enables making a communication between two separate Arduino Boards. There are several different versions of this this module but I recommend the one that comes on a breakout board because in that way it’s much easier to be connected. The HC-05 module is a Bluetooth SPP (Serial Port Protocol) module, which means it communicates with the Arduino via the Serial Communication.You can get the components needed for this Arduino tutorial from any of the sites below:.
HC-05 Bluetooth Module. /. Arduino Board /. Breadboard and Jump Wires /.Please note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!
Circuit SchematicsHere’s how we need to connect the module to the Arduino Board.The particular module that I have can be powered from 3.6 to 6 volts, because it comes on breakout board which contains a voltage regulator. However, the logic voltage level of the data pins is 3.3V. So, the line between the Arduino TX (Transmit Pin, which has 5V output) and the Bluetooth module RX (Receive Pin, which supports only 3.3V) needs to be connected through a voltage divider in order not to burn the module. On the other hand, the line between the Bluetooth module TX pin and the Arduino RX pin can be connected directly because the 3.3V signal from the Bluetooth module is enough to be accepted as a high logic at the Arduino Board. Controlling Arduino Using a Laptop or PC via Bluetooth CommunicationLet’s see how we can control the Arduino via Bluetooth using a Laptop or a PC. So, first we need to pair our laptop to the HC-05 Bluetooth module and we can do that from the Laptop Bluetooth Settings.
The laptop will discover the HC-05 module and using the ‘1234’ password we will pair the devices.Once we will pair the devices in the Laptop Device Manager, under Ports (COM & LPT), two new entities will appear named “Standard Serial over Bluetooth link”. From here we can see the COM Port number of the serial port through which the devices will communicate.We will stick with the same example as previously, turning on and off a LED and sending back a string to the laptop, so we will use the same Arduino code as previously described. Hi, Very nice intro. I’m trying to recreate it now, but I noticed the labels for the 2 resistors in the Arduino diagram seem to be reversed from what the bands on the resistors in the diagram show. I’m not an EE, but does this matter? If it does matter, which resistor goes where? I’m guessing it doesn’t matter much(?), since I’m the first to notice it.I just happened to notice this as I was looking for the resistors to use and was trying to match the colors on the bands in the diagramand happened to have a resistor pack with the band descriptions on the back of it.ThanksPete.