Comparison of the functionality HC-05 and HM-10 wireless Bluetooth Modules
When it comes to controlling your microcontroller project wirelessly, then Bluetooth is nowadays an easy to implement option. It is so easy to do that I even created a Bluetooth firework igniter project and a standalone video about the HC-05 Bluetooth (version 2.0) module in the past. If you don’t remember this board, then let me say that it can be bought for just two dollars, can be connected to your favorite microcontroller through a simple serial RX and TX connection, and basically sends over all the text you send to it from your phone to the Arduino and also the other way around.
Figure 1: HC-05 6 Pin Wireless Bluetooth RF Transceiver Module Serial BT Module for Arduino
This way you can edit your Arduino code in a way that it reacts to certain code words and just like that in around 3 minutes you’ve successfully created a Bluetooth control project. Pretty awesome I would say.
Figure 2: controlling Arduino Nano using an HC-05 board
But as time passed other versions of this Bluetooth board got created which leads me to this HM-10 Bluetooth (version 4.0) board which is super cheap as well but unlike its predecessor is not built Bluetooth 2.0 IC but around the CC2541 IC which features Bluetooth 4.0 and BLE aka Bluetooth Low Energy.
Figure 3: displays the HM-10 BLE Bluetooth 4.0 CC2541 Serial Wireless Module
But what are the practical differences between those two Bluetooth boards and is an upgrade to Bluetooth 4.0 really worth it? Let’s find out.
Now for a proper comparison let’s start over with the HC-05 board. To use it we have to connect its 5-volt pin to 5 volts, it’s ground pin to ground its TX pin to pin 8 and its RX pin to a 1 kilo ohm/2 kilo ohm voltage divider which connects to pin 9 of the Arduino.
This way we convert 4.5 volts voltage levels of the Arduino to 3 volts voltage levels which are compatible with the HC-05 boards. For the software, we only need a simple sketch that uses pin 8 and 9 as serial communication pins In order to forward all data we enter through the serial monitor while also outputting sent data from the module through the serial monitor.
Figure 4: displays Voltage level of HC-05 board
Figure 5: displays wiring diagram of the Hc-05 board to the Arduino Nano board
So after uploading the codes, it was time for the smartphone part there I installed the application Serial Bluetooth Terminal because its interface is very well and intuitively designed and best of all its functions with Bluetooth Classic and Bluetooth Low Energy devices.
That means after pairing with the HC-05 board with the pairing code 1234 and connecting to it through the app I can send over ASCII text which gets presented through the serial monitor which obviously also works the other way around and just like I described it before, this way I can let the microcontroller react to different code words and thus create all sorts of different projects.
And if we want to upgrade the HC-05 board to the HM-board, then all we must do is to simply replace it. Since the pinout of the two breakout boards is exactly the same. Now, of course, you will need to pair with the new BLE device called MLT-BT05 with the pairing code 123456 but afterward, it works exactly the same way as the old Bluetooth board.
So at this point, you might be asking yourself what’s the point then? But as soon as I connect a multimeter in series to the 5-volt power connection of the board we can see why this technology is called low energy. When the Bluetooth board is not paired with the device it draws around 9 milliamps and during sending or receiving data it draws around 9.1 milliamps.
That is not really low power yet if we consider that the old HC-05 board draws around 20 milliamps unpaired around 19 milliamps while sending or receiving and drops down to only 2 milliamps after entering its low power modes after five seconds of doing nothing.
But what we have not considered yet are all the available AT commands the HM-10 offers. There we can find the AT sleep command which like the name implies puts the board into a sleep mode where it only draws around 120 micro amps which is pretty low power and should be able to run off a coin cell for quite a while.
Those AT commands might only work when the board is not paired with your phone but it is still a low power solution for projects that only need to send data occasionally.
Such AT commands do also exist for the older HC-05 board which can be used to for example turn one Bluetooth board into a master device and the other into a slave device so that they can communicate with one another which also does work with the HM-10 boards but you cannot mix between the two Bluetooth versions.
Also keep in mind that you must hold the push button while powering up the HC-05 board to enter this AT mode but I’m getting off topic here right now we know that the BLE board can manually enter sleep mode and get woken up by either connecting to it or sending a long text to it through the serial monitor.
What also seems possible is to activate an auto sleep mode through the AT command set but after recalling all available ones through AT help, it seems like this command is missing from my board. The reasons are probably my board version which after doing a bit of research seems to be a copy of a copy and thus misses this function so always be careful what you buy.
For the last test, I edited the basic communication sketch so that it sends a response to the phone to measure the time difference between sending and receiving. Afterward, I sent data from all around my apartment with different distances and measured the ping for both Bluetooth 2.0 and 4.0 and concluded that both versions work flawlessly no matter the distance and offered a similar ping.
The last mentionable difference for me was that Bluetooth 4.0 does pair a bit faster with a phone than Bluetooth 2.0 but overall when it comes to simple microcontroller data transfer projects, I have to say that when you do not care about power then the upgrade is really not worth it at first sight. Of course when we dig deeper, then Bluetooth 4.0 offers more security, better error correction and communicates faster but when it comes to simple Arduino Bluetooth projects then the difference is pretty insignificant.