HC Serial Bluetooth Products User Instructional Manual
HC Serial Bluetooth Products User Instructional Manual
HC Serial Bluetooth Products User Instructional Manual
1 Introduction
HC serial Bluetooth products consist of Bluetooth serial interface module and Bluetooth adapter, such as:
When HC-03 and HC-05 are out of factory, one part of parameters are set for activating the device.
The work mode is not set, since user can set the mode of HC-03, HC-05 as they want.
The main function of Bluetooth serial module is replacing the serial port line, such as:
1. There are two MCUs want to communicate with each other. One connects to Bluetooth master
device while the other one connects to slave device. Their connection can be built once the pair is made.
This Bluetooth connection is equivalently liked to a serial port line connection including RXD, TXD
signals. And they can use the Bluetooth serial module to communicate with each other.
2. When MCU has Bluetooth salve module, it can communicate with Bluetooth adapter of computers
and smart phones. Then there is a virtual communicable serial port line between MCU and computer or
smart phone.
3. The Bluetooth devices in the market mostly are salve devices, such as Bluetooth printer, Bluetooth
GPS. So, we can use master module to make pair and communicate with them.
Bluetooth Serial module’s operation doesn’t need drive, and can communicate with the other
Bluetooth device who has the serial. But communication between two Bluetooth modules requires at least
two conditions:
In the following chapters, we will repeatedly refer to Linvor’s (Formerly known as Guangzhou HC
Information Technology Co., Ltd.) material and photos.
Here are the main factory parameters of HC-05 and HC-06. Pay attention to the differences:
HC-05 HC-06
Master and slave mode can be switched Master and slave mode can’t be switched
Multi-device communication: There is only point to Multi-device communication: There is only point to
point communication for modules, but the adapter point communication for modules, but the adapter
can communicate with multi-modules. can communicate with multi-modules.
fluctuant in the range of 30-40mA. The mean current fluctuant in the range of 30-40 m. The mean current
is about 25mA. After paring, no matter processing is about 25mA. After paring, no matter processing
communication or not, the current is 8mA. There is communication or not, the current is 8mA. There is
no sleep mode. This parameter is same for all the no sleep mode. This parameter is same for all the
Bluetooth modules. Bluetooth modules.
Reset: PIN11, active if it’s input low level. It can be Reset: PIN11, active if it’s input low level. It can be
suspended in using. suspended in using.
3. Information of Package
The PIN definitions of HC-03, HC-04, HC-05 and HC-06 are kind of different, but the package size is
the same: 28mm * 15mm * 2.35mm.
The following figure 1 is a picture of HC-06 and its main PINs. Figure 2 is a picture of HC-05 and its
main PINs. Figure 3 is a comparative picture with one coin. Figure 4 is their package size information.
Figure 1 HC-06 Figure 2 HC-05
PINs description:
PIN1 UART_TXD , TTL/CMOS level, UART Data output
RESET, the reset PIN of module, inputting low level can reset the module,
PIN11
when the module is in using, this PIN can connect to air.
VCC, voltage supply for logic, the standard voltage is 3.3V, and can work
PIN12
at 3.0-4.2V
PIN13 GND
PIN22 GND
For master device, this PIN is used for emptying information about pairing.
After emptying, master device will search slaver randomly, then remember
PIN26
the address of the new got slave device. In the next power on, master device
will only search this address.
(1) The circuit 1 (connect the module to 3.3V serial port of MCU) is showed by figure 5.
Figure 5 The circuit 1
In principle, HC-06 can work when UART_TXD, UART_RXD, VCC and GND are connected.
However, for better testing results, connecting LED and KEY are recommended (when testing the master).
Where, the 3.3V TXD of MCU connects to HC-06’s UART_RXD, the 3.3V RXD of MCU connects to
HC-06’s UART_TXD, and 3.3V power and GND should be connected. Then the minimum system is
finished.
Note that, the PIN2:UART_RXD of Bluetooth module has no pull-up resistor. If the MCU TXD doesn’t
have pull-up function, then user should add a pull-up resistor to the UART_RXD. It may be easy to be
ignored.
If there are two MCU which connect to master and slave device respectively, then before paired(LED
will flicker) user can send AT commands by serial port when the system is power on. Please refer to HC-
04 and HC-06’s data sheet for detailed commands. In the last chapter, the command set will be introduced.
Please pay attention to that the command of HC-04/HC-06 doesn’t have terminator. For example, consider
the call command, sending out AT is already enough, need not add the CRLF (carriage return line feed).
If the LED is constant lighting, it indicates the pairing is finished. The two MCUs can communicate
with each other by serial port. User can think there is a serial port line between two MCUs.
(2) The circuit 2 (connect the module to 5V serial port of MCU) is showed by figure 6.
Figure 6 is the block diagram of Bluetooth baseboard. This kind of circuit can amplify Bluetooth
module’s operating voltage to 3.1-6.5V. In this diagram, the J1 port can not only be connected with MCU
system of 3.3V and 5V, but also can be connected with computer serial port.
The command set of Version V1.4 doesn’t include parity. The version V1.5 and its later version have
parity function. Moreover, there are three more commands of V1.5 than V1.4. They are:
UART_RXD, Bluetooth serial signal receiving PIN, can connect with the MCU’s TXD PIN,
PIN2
there is no pull-up resistor in this PIN. But It needs to be added an eternal pull-up resistor.
RESET, the reset PIN of module, inputting low level can reset the module, when the module is
PIN11
in using, this PIN can connect to air.
PIN12 VCC, voltage supply for logic, the standard voltage is 3.3V, and can work at 3.0-4.2V
PIN13 GND
When the module is supplied power and PIN34 is input low level, PIN31 output 2Hz square
PIN31 wave to make the LED flicker quickly. It indicates the module is at the pairable mode. If PIN34
is input high level, then the module will enter to AT mode, but the output of PIN31 is still 2Hz
square wave.
PIN32 Output terminal. Before paired, it output low level. Once the pair is finished, it output high level.
Mode switch input. If it is input low level, the module is at paired or communication mode. If
it’s input high level, the module will enter to AT mode. Even though the module is at
PIN34
communication, the module can enter to the AT mode if PIN34 is input high level. Then it will
go back to the communication mode if PIN34 is input low level again.
Figure 7 Application 1
(3) Application circuit 2 (connect to 5V serial system or PC serial)
Figure 8 Application circuit 2
Enter to AT mode:
Way1: Supply power to module and input high level to PIN34 at the same time, the module will enter to
AT mode with the baud rate-38400.
Way2: In the first step, supply power to module; In the second step, input high level to PIN34. Then the
module will enter to AT mode with the baud rate-9600. Way1 is recommended.
Command structure: all command should end up with “\r\n” (Hex: 0X0D X0A) as the terminator. If
the serial helper is installed, user just need enter “ENTER” key at the end of command.
Reset the master-slave role command:
AT+ROLE=0 ----Set the module to be salve mode. The default mode is salve.
AT+ROLE=1 ----Set the module to be master mode.
AT+CMODE=1
Set the module to make pair with the other Bluetooth module (specified address). If set the module to
make pair with random one first, then set the module to make pair with the Bluetooth module has specified
address. Then the module will search the last paired module until the module is found.
Summary:
HC-05 has many functions and covers all functions of HC-06. The above commands are the most
common ones. Besides this, HC-05 leaves lots of space for user. So HC-05 is better than HC-06 and
recommended. HC-03 is similar with HC-05. The above introduction also suits HC-03