Bluetooth module description
The Bluetooth module is a high-performance master-slave integrated Bluetooth serial port module. It adopts the Bluetooth 2.0 protocol and can be paired with various smart terminals such as computers, Bluetooth hosts, mobile phones, PDAs, and PSPs with Bluetooth function to realize the serial port transparent transmission function.
When driving the Bluetooth module kit, you only need to use the TTL level standard serial port (5V/3.3V voltage can be used), the supported baud rate range is 4800~1382400, it can be easily connected with the product, and the use is very flexible and convenient.
Bluetooth module specifications
Bluetooth module pindescription
The Bluetooth module is very small (20.37mm*38.84mm),The appearance of the Bluetooth module kit is shown in the figure:
As can be seen from the figure, there are 6 available Bluetooth module pin, and the detailed description of each Bluetooth module pin is shown in the table:
Bluetooth module testing
The high quality Bluetooth modulesupports two test methods:
Method 1: Use 1 development board to connect 1 Bluetooth module. Use the Android phone to communicate with the Bluetooth module.
Method 2: Use 2 development boards and connect 1 Bluetooth module kit to each. The Bluetooth serial port transparent transmission communication is carried out between the two development boards.
Users can choose the Bluetooth module testing method according to their own hardware environment. The steps for the two Bluetooth module testing methods are described below.
1.Prepare the Bluetooth module testing environment
Install the “BTClient” APP on your Android phone.
The directory where the BTClient APP is located: “Supporting Software\HC-PDA-ANDROID.apk”.
Find the Bluetooth module tutorial “1. Bluetooth test program (with LCD) and 2. Bluetooth test program (without LCD)” in the supporting materials. Both programs can be selected according to your own experimental platform. The programs with liquid crystals need to be connected to the development board with matching liquid crystals., and the program without liquid crystal outputs the running status information through the serial port. Use MDK to compile and download the program to the development board, reset the development board to let the program run.
2. The experimental phenomenon of the normal operation of the Bluetooth module
The LCD screen of the development board will display three lines of text “BlueTooth demo, Bluetooth module detected! Device name: Bluetooth_SLAVE”, long press the KEY2 button of the development board (be careful not to press KEY1), a new Bluetooth module name will be randomly generated;
Open the BTClient APP of the mobile phone, open the Bluetooth device of the mobile phone, click the “Connect” button in the lower left corner of the interface, and the “Find Device…” window will pop up. After a while, a Bluetooth device named “Bluetooth_SLAVE” will appear. , this is our Bluetooth module name, click on the device, the APP will try to connect with Bluetooth, enter the pairing code “1234” to connect successfully. The operation of the APP is shown in the figure,
After the APP is connected to the Bluetooth module kit, the Bluetooth module kit will actively send words like “<Device Name>send data test, test data=<x>” to the APP, where <Device Name> is the Bluetooth module name, and <x> is A self-incrementing string number.
After the APP is connected to the Bluetooth module kit, you can use the APP to send data to the development board through Bluetooth. Click the input box in the interface, enter a string, and then click “send” to send the data. After the development board receives the data, it will be displayed on the LCD as it is. (You can enter a carriage return, but the liquid crystal processing in the program only displays the first line of data.)In addition to sending ordinary strings, you can also send commands to the development board to control the LED lights on the development board. The program supporting the development board supports two commands: “AT+LED1=ON” and “AT+LED1=OFF”, which are used to light up LED1 on the development board and turn off LED1 respectively. After the development board receives the command, it will display the received command on the LCD and control the LED light. If other commands are required, the user can modify the supporting STM32 program to achieve custom functions. The LCD display of the development board is shown in the figure:
3. During Bluetooth module not working normal, the LCD screen displays “No HC05 detected!” for troubleshooting, as shown in the figure.
At this time, it means that the development board cannot detect the Bluetooth module. Please refer to the Bluetooth module pin connection table to re-check the connection between the Bluetooth module kit and the development board, and power on the development board to re-test.
1.Prepare the Bluetooth module testing environment.
Connect the two development boards and Bluetooth modules respectively, and find the Bluetooth module tutorial “1. Bluetooth test program (with LCD) and 2. Bluetooth test program (without LCD)” in the supporting materials. For the selection of the experimental platform, the Bluetooth module arduino program with liquid crystal needs to be connected to the matching liquid crystal to the development board, and the program without liquid crystal outputs the running status information through the serial port. Use MDK to compile and download the Bluetooth module arduino program to two development boards, reset the development board to let the program run.
2. The experimental phenomenon of the normal operation of the Bluetooth module.
The LCD screen of the development board will display three lines of text “Bluetooth BlueTooth demo, Bluetooth module detected! Device name: Bluetooth_SLAVE”, confirm that the LCDs of the two development boards show this state. As shown in the figure:
Now the Bluetooth modules of the two development boards are in SLAVE mode, and the Bluetooth connection cannot be initiated when the modules are in SLAVE mode.
Select one of the development boards, long press its KEY1 button, and then it will automatically perform the subsequent scanning, pairing, and connection processes. The development board will set its Bluetooth module to MASTER mode, and scan the surrounding Bluetooth devices. If it scans a device whose device name contains the string “Bluetooth”, it will initiate a Bluetooth connection. After the connection is successful, the two Bluetooth modules send each other. data, and display the latest data received on the LCD screen. The LCD display of the development board is shown in the figure.
During actual operation, the content of “receive data” displayed on the LCD interface may be slightly different, and it does not affect the program status.
3. Troubleshoot the LCD screen to display “No Bluetooth detected!” when it is not running normally, as shown in the figure.
At this time, it means that the development board cannot detect the Bluetooth module. Please refer to the Bluetooth module pin connection table to re-check the connection between the Bluetooth module and the development board, and power on the development board to re-test.
Bluetooth Module Operation Precautions and Frequently Asked Questions
Bluetooth module schematic
Bluetooth module Shipping List
We are Bluetooth module manufacturers, please click on WHATSAPP to contact us to inquiry more about the Bluetooth module types, the Bluetooth module price, etc.