این ماژول یکی از پرکاربردترین ماژول های بلوتوث بوده که تقریباً در تمامی پروژه هایی که در آنها نیاز می باشد که توسط میکروکنترلر اطلاعات بصورت بلوتوث ارسال شوند از این ماژول استفاده می گردد. نحوه راه اندازی ماژول بسیار ساده بوده و از طریق پروتکل سریال به میکروکنترلر متصل می گردد.
اطلاعات مختلف در این ماژول مانند تغییر نام، تغییر بادریت، تغییر پسورد pair و… از طریق ارسالATcommand قابل تغییر است. برای تبادل اطلاعات بی سیم در فواصل کوتاه مناسب است. می توان با آن به کامپیوتر یا تبلت ، تلفن همراه و یا بین دو ماژول ارتباط برقرار کرد.
در انبار موجود نمی باشد
۱٫۱ tips (very important):
TXD: Send side, generally expressed as their own sender, normal communication RXD must be connected to another device.
RXD: the receiving end, generally expressed as himself on the receiving end, normal communication TXD must be connected to another device.
When normal communication itself TXD RXD forever connected device!
Since the resumption of spontaneous: RXD when normal communication access other devices TXD, so if you want to receive data sent by itself as the name suggests, it is their own to receive data transmitted, namely own TXD directly connected to RXD, used to transmit and receive test itself It is normal, is the quickest and easiest way to test when a problem occurs first do this test to determine whether a product failure . Also known as the loopback test.
۱٫۲ Level Logic:
TTL level: usually represent binary data, the provisions of + 5V is equivalent to a logical “1”, 0V is equivalent to a logical “0”, known as TTL signal system, is positive logic
RS232 level: using -12V to -3V, equivalent to a logical “0”, + 3V to + 12V logic level, equivalent to a logical “1” is a negative logic
۱٫۳ Product Features:
۱, the core module HC-05 from the module, leads to the interface includes VCC, GND, TXD, RXD, KEY pin, Bluetooth connection status pinout (STATE), not connected to the output low, output high after the connection
۲, led indication Bluetooth connection status, flash means no Bluetooth connectivity, slow flash that enter the AT mode, double flash indicates Bluetooth is connected and turned on port
۳, the floor set up anti-reverse diode with 3.3V LDO, input voltage 3.6 ~ 6V, When unpaired current of about 30mA, paired about 10mA, the input voltage must not exceed 7V!
۴, the interface level 3.3V, can be directly connected to various SCM (51, AVR, PIC, ARM, MSP430, etc.), 5V microcontroller can also be connected directly, without MAX232 MAX232 can not go through!
۵, clearing the effective distance of 10 meters ( power rating of CLASS 2), more than 10 meters are possible, but do not do this to ensure the quality of the connection distance of
۶, after the pair when full-duplex serial port to use, without having to know any Bluetooth protocol, supports 8 data bits, 1 stop bit , you can set the parity communication format, which is the most commonly used communication format does not support other formats.
۷, can be pulled 34 feet into the AT command mode to set parameters and query information
۸, compact (3.57cm * 1.52cm), factory chip production to ensure the placement quality. And sets of transparent heat shrink tubing, dust and beautiful, and there is a certain degree of anti-static capabilities.
۹, can be switched via AT commands as master or slave mode, can be connected via AT command specifies the device
۱۰, supported from the standard baud rates between 4800bps ~ 1382400bps
After pairing only as a fixed baud rate of the serial port can be used in the same, so long as it is “fixed baud, 8 data bits, no parity” communication format serial devices can be directly replace the original wired serial port without the need to modify the program. Such as data acquisition, intelligent car, serial printers, and other outdoor dot matrix screen control. Paired with a computer: fit between computers via Bluetooth serial communication with the device, use the same serial port paired with your phone: for between your phone via Bluetooth serial communication with the device, use the same serial port paired with a Bluetooth host: for two devices directly via Bluetooth serial communication, such as between the microcontroller and microcontroller serial cable with microchips, etc., use the same serial port
baud rate conversion, because the receiver and the sender can choose their own baud rate, in a small amount of data when you can use as a device baud rate conversion.
۲٫۱ Bluetooth module connected to a computer how (from mode)
with the following in order to use a computer with a Bluetooth pairing an example:
First, to pass through the Bluetooth module power, this time led blinking, open “My bluetooth location”, click “Search for equipment “within the effective range,
The system will search for Bluetooth devices, the default device name “linvor” (as modified name was modified name, such as “jiayuanelectron”), double-click or right click and select “Add a Bluetooth device”
Enter a passcode (the default is “1234”),
Click “Next”, if the password is correct, the computer and transparent transmission module will establish a connection, if not previously had a Bluetooth serial devices installed, the system will automatically install the driver and generate a virtual serial port
Click Configuration, select the appropriate COM port,
I am here only choose com5, the serial port is connected to the computer after the end of the operation, such as I have here is com5, open the port when the Bluetooth module by the LED will flash into a double flash , then just take the Bluetooth module as is the computer’s serial port to fixed baud rate used in the same, except that it is wireless.
HC-05 Bluetooth module AT command test guidance
First, the required equipment ready:
①HC05 a Bluetooth module
②USB a turn TTL module
③ DuPont line 4
Second, the wiring:
Note: The Bluetooth module can only be connected VCC 5V, can not pick 3.3V!
Third, the test
Hold down the button above HC05 Bluetooth module, to give the Bluetooth module is powered. Bluetooth module into the slow flash LED above mode (about 1 second blinks once), AT commands can be carried out to test
AT command format is: Baud 38400,8 data bits, 1 stop bit, no parity. After each command input is complete, you must press the Enter key again sent!
For example: Enter the AT, press the Enter key to send, the Bluetooth module will return OK
① how to modify the Bluetooth module for the host mode:
Enter AT + ROLE = 1 Press the Enter key after sending, Bluetooth return OK, said the amendments success! Then power after a power outage, a Bluetooth module for the host mode, the automatic search around from machine
Enter AT + ROLE = 0, then changed to slave mode. (Note: The default is slave mode, without modification)
② how to modify the Bluetooth module name:
After input AT + NAME = Beijin press the Enter key to send, Bluetooth return OK, indicates that Bluetooth name changed to Beijin
③ how to modify the Bluetooth module pairing password:
After entering AT + PSWD = 2222 Press the Enter key to send, Bluetooth return OK, indicates Bluetooth pairing password changes to 2222
④ how to modify the communication baud rate (NOTE: AT mode baud rate of 38400, when normal communication 9600):
Enter AT + UART = after 115200,1,2 press the Enter key to send, Bluetooth return OK, indicates that Bluetooth communication baud rate is changed to 115200,2 stop bit, Even parity (Note: The default communication parameters are 9600,0 , 0)
۱٫ The supply voltage must be 5V, 3.3V can not
۲٫ Do not pin power cable to the data line, carefully confirm the good before wiring
AT commands can be carried out after the test must go slow flash mode 3.LED
۴٫ After each AT command input is completed, must be sent before press the Enter key
۵٫ If you can not return OK, please swap RXD and TXD
۶٫ Do not tear or self-welding heat shrinkable tube, otherwise deemed a waiver of the warranty and return service
۷٫ unavailable UNO above RXD and TXD connected Bluetooth module AT command test