User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams User Manual for HC-02 Bluetooth Serial Port Module Contents 1. Introduction of Module 1.1 Features..3 1.2 Basic parameters..3 1.3 Products..3 2. Connection Description 2.1 Operating Principle4 2.2 Connection between the module and other equipment like MCU4 2.3 Connection between modules......6 2.4 Connection between module and mobile phone. ...6 2.5 Connection between module and PC....7 3. Rapid Testing 3.1 Connection between parameter frame and module....7 4. Development and Application 4.1 Definition of pins8 4.2 Embedding mode10 4.3 Surface mounting and Furnace Temperature10 4.4 Reference connection circuit11 5. AT Command 5.1 Method entering AT command mode..13 5.2 Defaulted factory parameters...............13 5.3 Introduction of AT command....13 6. About HC 6.1 Company profile......16 Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 1 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams Release Date: June 1, 2018 Version No.: V1.1b Rev 1 1.1b 2017/11/30~
www.hc01.comV1.1 DRAWN BY Ling Xin MODEL :
HC-02 Slave CHECKED BY Eric Huang APPD. BY SimonMok UART (Default) PIN (Default) MODE 9600 1234 Slave Description:
Bluetooth 2.0 serial port module Bluetooth module HC-02HC-05 HC-06 HC-08HC-42 Radio module HC-12 Parameter frame HC-USB-P Module with bottom plate USB converted to TTL HC-05-USB HC-06-USB HC-08-USB HC-12-USB Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 2 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams 1. Introduction of Module HC-02 1.1 Features HC-02 UART communication module which is developed based on Bluetooth standard SPP and compatible with BLE, high stability and low power consumption. Users do not need to care about complicated wireless communication configuration and transmission algorithm, only need to connect to the device through TTL UART. HC-02 slave module can be paired with mobile phones and connected for data transmission after being powered on. In addition, it can be connected to the HC-05 or HC-06 master module (PIN code is consistent, and default is 1234), which can replace a traditional serial port line, in this way, wiring work is omitted and flexible use realized. 1.2 Basic parameters Parameters Type Operating band Value HC-02 2.4G Parameters Module dimensions Data rate Value 27*13mm 2Mbps/SPP Communication interface UART 3.3V level Antenna interface Built-in PCB antenna Operating voltage 3.0~3.6V Communication current 30mA Baud rate 1200~115200bps Receiving sensitivity
-85dBm@2Mbps Communication level Transmission power Reference range 1.3 Products Type HC-06-USB Communi
-cation protocol Bluetooth 2.0 HC-05 Bluetooth 2.0 HC-06 Bluetooth 2.0 Bluetooth 4.0 BLE Bluetooth 5.0 BLE HC-08 HC-42 3.3V 6dBm (max.) 10m Operating humidity Storage temperature Operating temperature 10~90
-40~+85
-25~75 Operating band 2.4G 2.4G 2.4G Communi
-cation range 10m Date rate Product dimensions Embeddin g mode 2M bps 58*21*10 USB2.0 mm 10m 2M bps 27*13*2 10m 2M bps 27*13*2 mm 2.4G 80m 1M bps mm 27*13*2 mm 2.4G 40m 2M bps at most 27*13*2 mm Surface mounting Surface mounting Surface mounting
/Direct insertion Surface mounting Product features PC virtual serial port matched by HC-06 Abundant AT commands Easy use Support for connection to Android and iPhone phones Support for connection to Android and iPhone phones Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 3 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com 2. Connection Description 2.1 Operating Principle Gathering information and Carrying Dreams Note:
As shown in the figure above, the HC-02 module is used together with the HC-06 master module to replace the physical connection during full duplex communication. The equipment on the left sends UART data to the module. After receiving UART data, the RXD port of the module automatically sends the data to the air in the form of radio waves. The module on the right can automatically receive the data and restore the UART data originally sent by the left device from the TXD. The same is true from right to left. 2.2 Connection between the module and other equipment like MCU
: When the module is connected to the MCU with the power supply system of 3.3V, the serial ports can be cross -
connected. (The RX of the module is connected to the TX of the MCU, and the TX of the module is connected to the RX of the MCU) Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 4 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams
: When the module is connected to an MCU with a power supply system of 5V, a 220~1K resistor can be connected in series to the RX pin end of the module and then to the TX pin of the MCU. The TX pin of the module is directly connected to the RX pin of the MCU, without connection to the resistor in series. (Note: Users are required to confirm that the MCU used recognizes the voltage of about 3.0V as high level, otherwise, a 3.3V/5V level conversion circuit is required.) Note:
It must be noted that the module can be connected to 3.3V (3.0~3.6V) power supply only, instead of 5V. Direct connecting to 5V will result in damage to module. 5V power supply must be reduced to 3.3V through LDO before powering on the module. Note:
If the power supply of the HC-02 module is controllable (that is, when the MCU works, power supply of HC-02 module is turned off, the serial port of the MCU will be connected to the serial port of the module, resulting in the abnormal operation of the HC-02 module when it is powered on.), the following hardware isolation circuit shall be added to the serial port connection of the MCU and the module (the part enclosed by the red dotted line):
Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 5 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com 2.3 Connection between modules Gathering information and Carrying Dreams HC-06 is the master and HC-02 is the slave. They have the same PIN code (1234 by default ) and can be automatically connected once power-on. After the first connection, the HC-06 master will automatically remember the matching object. If it is required to connect other modules, the pairing memory of the HC-06 master must be erased firstly. Slaves have no matching memory. 2.4 Connection between module and mobile phone HC-02 can be connected with Bluetooth of Android phones, and Android Bluetooth assistant software can be used for communication test. HC-02 can be connected to iPhone 4S and above, and downloading and installing Bluetooth BLE software is required for the communication test. Note:
Proprietary Service UUID: 49535343-FE7D-4AE5-8FA9-9FAFD205E455 Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 6 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com TX UUID: 49535343-1E4D-4BD9-BA61-23C647249616 RX UUID: 49535343-8841-43F4-A8D4-ECBE34729BB3 Gathering information and Carrying Dreams 2.5 Connection between module and PC To connect to the computer, HC-06-USB Bluetooth virtual serial port is required for HC-02. HC-02 may be connected to the computer's built-in Bluetooth device for communication. 3. Rapid Testing 3.1 Connection between parameter frame and module Put the HC-02 Bluetooth module into the HC-USB-P parameter frame, as shown in the figure. The module can be tested by plugging directly into the USB interface of the PC. Note:
If the connection is not firm, an auxiliary tool clip can be used to clamp the module and the parameter frame. Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 7 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com 4. Development and Application 4.1 Definition of pins Gathering information and Carrying Dreams Pins Definition 1 2 3 4 5 6 7 8 9 10 11 12 13 TXD RXD NC NC NC NC NC NC NC NC RST VCC GND I/O O I Floating Floating Floating Floating Floating Floating Floating Floating Remarks URAT output port3.3V TTL level URAT input port3.3V TTL level NC NC NC NC NC NC NC NC I, weak pull-up I I Module reset pin, a low level of not less than 100ms required for reset Power supply pin, DC 3.3V power supply required, power supply current not less than 100mA Module commons Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 8 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams 14 15 16 17 18 19 20 21 22 23 24 25 26 LEDCON I On - board LED lamp control pin, ground off LED lamp KEY-
LED STATUS KEY+
NC NC NC NC LED STATUS NC KEY+
I, weak pull-up AT Command Setting Foot ( Note ) O O I, weak pull-down Floating Floating Floating Floating O O Floating I, weak pull-down Module operating status indicator output pin ( Note ) Module connection status indication output pin ( Note ) AT command setting pin ( Note ) NC NC NC NC Module working status indicator output pin ( note ) Module connection status indication output pin ( note ) NC AT command setting pin ( note ) Note : Module working status indicator output pin, high level output, you shall connect resistors in series when the module is connected to LED. Before connecting, it lights for 100ms every 200ms seconds. After connecting, the LED lights always. Note : In order to assist the user in determining whether the module is connected, this pin can output a level signal to indicate. This pin outputs a low level before the module is not connected. After the module is connected, the pin outputs a high level. Note : Input pin, pull up inside. In the connected state, this pin is set to a low level and can enter the AT command setting mode. This pin is set high and returns to serial transmission mode. Note : Input pin, pull down inside. In the connected state, this pin is set to a high level and can enter the AT command setting mode. This pin is set low and returns to serial transmission mode. Note : Pins 23 / 24 and 26 are pins added to the new hardware and can be compatible with pins of HC-05.
( The new version of hardware has a dot on the back of the module at the foot of 14. The old version of hardware does not have this dot.) Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 9 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com 4.2 Embedding mode Gathering information and Carrying Dreams No copper can be applied and no wires can be routed under the antenna part of the module, otherwise the signal will be affected adversely. It is recommended that the bottom plate of the antenna may be hollowed out and the antenna be as close to the board as possible. Stamp hole packaging mode is used, and the pin is defined as in Section 4.1. 4.3 Surface mounting and Furnace Temperature The manufacturer who firstly produces a large number of patches should check 20 - 30 pieces of modules, in order to check whether the furnace temperature is appropriate. The furnace temperature of the patch boiler shall not exceed the reference figure temperature, the secondary patch shall be reduced by about 5 degrees, and the temperature may be reduced appropriately in summer. Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 10 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com 4.4 Reference connection circuit Gathering information and Carrying Dreams 4.4.1 The module is connected to the 5V single-chip microcomputer system and requires level conversion ( if the MCU works at 5V and the UART RXD inputs a voltage above 3.0V to recognize a high level, a level conversion circuit needs to be added; If the voltage above 2.0V is input to the UART RXD, it will be recognized as high level, and no level conversion circuit is required ), please refer to the following wiring method:
4.4.2 When the module is connected to 3.3V single-chip computer system, serial port shall be cross-connected ( when the module is connected to 5V MCU system and level conversion is not required, please connect 1K resistors in series before cross - connecting ):
Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 11 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams 4.4.3 When the power supply of the module is controlled, a hardware isolation circuit should be added for the connection with the serial port of the single chip microcomputer (the part enclosed by the red dotted line below ) , so as to prevent the serial port of the single chip microcomputer from being connected to the module before the module is powered on, resulting in abnormal power-on operation of the module:
Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 12 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams 5. AT Command 5.1 Method entering AT command mode When the module is powered on and disconnected, it is in AT command mode. In addition, by setting the module pin18 pin KEY+ ( pin18 and pin26 of the new hardware version ) high in the connected state, it is also in AT command mode. 5.2 Defaulted factory parameters Baud rate: 9600N81, Bluetooth name: HC-02, PIN code: 1234. 5.3 Introduction of AT command 5.3.1 Test communication Command AT Response OK Remark Test 5.3.2 Modify UART communication baud rate Command Response Remark The module supports the highest serial baud rate of 115200bps. AT+BAUD1 After setting the baud rate with AT command, the baud rate can be saved by power down, and no setting is OK1200 required for the next power up. The module does not support verification settings!
Note:
When HC-02 module communicates with other Bluetooth master devices in two directions, the maximum transmission rate is about 2K Byte per second, beyond which codes may be missed. The maximum unidirectional transmission rate is around 5K Byte per second, beyond which codes may be missed. In addition, continuous data
( e.g. files ) can only be transmitted in one direction, and it is recommended to transmit with a maximum baud rate of 115200bps. At the same time, two-way transmission of continuous data will leak codes. Example:
Transmit: AT+BAUD2 Return: OK2400 Baud rate code as follows:
1--------- 1200 2--------- 2400 3--------- 4800 4--------- 9600 (Default value) 5--------- 19200 6--------- 38400 7--------- 57600 8--------- 115200 Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 13 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com 5.3.3 Modify Bluetooth name Response Command Gathering information and Carrying Dreams Remark AT+NAMEname OKsetname Parameter name: The current name to be set is the one searched by Bluetooth, not more than 16 characters. Example:
Transmit: AT+NAMEbill_gates Return: OKsetname The Bluetooth name is modified as bill_gates The parameters can be saved by power-down and only need to be modified once, and the name cannot exceed 16 digits or visible characters. 5.3.4 Modify Bluetooth PIN code Command Response AT+PINxxxx OKsetPIN The default pairing password of the module is 1234. Parameters can be saved by power-down and only need to be modified once. Remark Parameter xxxx: It is PIN code to be set, 4 digits. When the adapter or mobile phone is connected to the Bluetooth slave and the window asking for a pairing password pops up, you can manually enter this parameter to connect to the slave. If the PIN code is correct after the Bluetooth module master searches for the slave, it will automatically pair. Example:
Transmit: AT+PIN8888 Return: OKsetPIN The default PIN code of the module is 1234. Parameters can be saved by power-down and only need to be modified once. 5.3.5 Acquire AT command version command Command AT+VERSION 5.3.6 LED on/off command Command AT+LED0 AT+LED1 Note:
Response LED OFF LED ON Response www.hc01.comV1.1 20171130 Remark AT+LED0 OFF AT+LED1 ON The LED on/off command is only valid for the LED inside the module and will not affect the LED outside the module pin16 or pin23 (new hardware) !
5.3.7 Modify Bluetooth address command Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 14 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams Command AT+ADDRxxxxxxxxxxxx Response OK+ADDR=xxxxxxxxxxxx Parameter xxxxxxxxxxxx: 12-digit Bluetooth address (0~H hexadecimal number) Example:
To change the Bluetooth address of the module to 201710101234, you can in the command state:
Transmit: AT+ADDR201710101234 Return: OK+ADDR=201710101234 The Bluetooth address of the module is modified successfully. 5.3.8 Query module parameter command Command AT+RX Response OK+NAME=HC-02 OK+PIN=1234 OK+ADDR=xxxxxxxxxxxx OK+BAUD=9600 After querying the module parameters, the Bluetooth name, pairing password, Bluetooth address and UART baud rate will be returned in turn. 5.3.9 Parameter recovery default command Command AT+DEFAULT Response OK Restore Bluetooth name, PIN code, Bluetooth address and UART baud rate to default value. 5.3.10 Module reset command Command AT+RESET The module executes the reset action. Response OK Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 15 Sales hot line: 020-8408-3341 Technical customer service: 445253184 User Manual of HC-02 V1.1 Bluetooth Serial Port Communication Module Website: http://www.hc01.com Gathering information and Carrying Dreams 6. About HC Guangzhou HC Information Technology Co., Ltd was established in September 2008 and is a pioneer in the field of wireless data transmission. For more than ten years, HC has always adhered to independent research and development and provided wireless data transmission solutions for the majority of technology companies. HC series modules are exported to various countries across the world, and the cumulative sales have reached tens of millions of pieces. With the advantages of stable performance, easy embedding and low packet loss rate, it has been well received by technical experts from all over the world. Among them, the HC-05 and HC-06 Bluetooth serial port modules are the classic works called wireless data transmission products, which have been far ahead in sales for more than ten years, witnessing a market share of more than 40 %. The self-made stamp packaging method has now been widely used by the industry. In recent years, through continuous innovation, HC has successively developed wireless serial port modules of various working systems, forming four series of serial port products mainly including Bluetooth 2.0, Bluetooth 4.0 BLE, Wireless 433MHz and WIFI, as well as supporting products. We will not forget our initiative mind, so as to achieve our ultimate goal. HC always sticks to the philosophy of " gathering information and carrying dreams" and do its best to contribute to the wireless data transmission field and society.
[Official Website]: www.hc01.com
[Telephone]:
[Sales customer service]: QQ: 1870976902 QQ: 2716533457 020-8408-3341 QQ1614485461 QQ1004658237 Official Wechat: hc4008881803
[Technical customer service]: QQ: 445253184
[Address]: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province This Specification remains the property of Guangzhou HC Information Technology Co., Ltd. HC reserves the right to interpret and modify this Specification without notice. Guangzhou Huicheng Information Technology Co., Ltd. Address: Room 608, No.19, Jiangong Road, Tianhe Software Park, Tianhe District, Guangzhou City, Guangdong Province 16 Sales hot line: 020-8408-3341 Technical customer service: 445253184 FCC Statement This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Changes or modifications to this unit not expressly approved by the party responsible for compliance could void the users authority to operate the equipment. NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
-- Reorient or relocate the receiving antenna. FCC Statement
-- Increase the separation between the equipment and receiver.
-- Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
-- Consult the dealer or an experienced radio/TV technician for help. This device and its antenna(s) must not be co-located or operation in conjunction with any other antenna or transmitter. Radiation Exposure Statement The device has been evaluated to meet general RF exposure requirement in portable exposure condition without restriction. FCC Statement Important Note:
CFR 47 FCC PART 15 SUBPART C has been investigated. It is applicable to the modular transmitter The device must be professionally installed. The intended use is generally not for the general public. It is generally for industry/commercial use. The connector is within the transmitter enclosure and can only be accessed by disassembly of the transmitter that is not normally required. the user has no access to the connector. Installation must be controlled. Installation requires special training. This module is Limited single modular without shielding, host manufacturer have to consult with module manufacturer for the module limiting conditions when integrate the module in the host. module manufacturer should reviews detailed test data or host designs prior to giving the host manufacturer approval. This module is stand-alone modular. If the end product will involve the Multiple simultaneously transmitting condition or different operational conditions for a stand-alone modular transmitter in a host, host manufacturer have to consult with module manufacturer for the installation method in end system. Antenna Information:
This radio transmitter 2AEJQHC-02 has been approved by Federal Communications Commission to operate with the antenna types listed below, with the maximum permissible gain indicated. Antenna types not included in this list that have a gain greater than the maximum gain indicated for any type listed are strictly prohibited for use with this device. Antenna No. Operate frequency band Antenna Type Antenna 1 2.4GHz 2.5 GHz PCB Antenna Maximum antenna gain 0 dBi FCC Statement End Product Labeling The final end product must be labeled in a visible area with the following" Contains FCC ID: 2AEJQHC-02". Host manufacturer is strongly recommended to confirm compliance with FCC requirements for the transmitter when the module is installed in the host. Host manufacturer is responsible for compliance of the host system with module installed with all other applicable requirements for the system such as Part 15 B.