ماژول بلوتوث سریال HC-05 همراه با برد کمکی
معرفی
ماژول بلوتوث HC-05 به همراه برد کمکی با پشتیبانی از پروتکل SPP (Serial Port Protocol) برای ارتباط بیسیم سریال طراحی شده است. تقریباً در تمامی پروژههایی که در آنها نیاز هست که توسط میکروکنترلر اطلاعات بهصورت بلوتوث ارسال شوند از این ماژول استفاده میگردد. احتیاجی به لحیمکاری SMD نبوده و میتوان مستقیم ماژول را روی بردبرد استفاده کرد. به دلیل وجود رگولاتور داخلی احتیاجی به تأمین تغذیه ۳٫۳ ولت نبود و میتوان همزمان با دیگر قطعات و میکروکنترلرها مستقیماً به ولتاژ ۵ ولت متصل کرد. با پشتیبانی برد از پروتکل سریال تمامی دستورات و کامنت ها توسط این رابط بهسادگی انجامپذیر هستند.
کاربردها
- ولتاژ: ۳٫۶-۶ ولت
- حداکثر جریان: ۵۰ma
- فرکانس: ۲٫۴GHz
- کارکرد: در دو حالت master & slave
- نوع ارتباط با میکروکنترلر UART:
- بادریت های مورد پوشش: ۹۶۰۰,۱۹۲۰۰, ۳۸۴۰۰,۵۷۶۰۰,۱۱۵۲۰۰,۲۳۰۴۰۰,۴۶۰۸۰۰
- نوع ارتباط بلوتوث: SPP serial protocol
- ورژن بلوتوث: V2.0+EDR
نحوه استفاده
برای تغییر در تنظیمات و همچنین دریافت اطلاعات خود ماژول می بایست وارد حالت AT COMMAND شوید. برای این کار می توانید مراحل زیر را دنبال کنید.
۱- پایه KEY-1 (پایه ۳۴) را به ۳٫۳ ولت وصل کنید
۲- پایه های سریال RX و TX خود را بصورت ضربدری به برد متصل کنید. (RX به TX )
۳- تغذیه مدار را متصل کنید. توجه داشته باشید که در صورتی که این مراحل را به درتس انجام داده باشید، چشمک زن (پایه ۳۱) بصورت یک ثانیه ای چشمک خواهد زد، در حالت عادی بسیار تندتر این چشمک زدن انجام می شود.
۴- پایه KEY-1 را قطع کنید.
۵- در قسمت تنظیمات سریال ترمینال خود، بودریت بر روی ۳۸۴۰۰ تنظیم شود. نکته بسیار مهم فعال بودن دو گزینه CF و LR در تنظیمات سریال می باشد.
۶- در صورت درست بودن تمامی مراحل، با ارسال دستور AT پاسخ OK را دریافت خواهید کرد.
*** نکاتی مهم در زمینه ایرادیابی
- از مبدل مناسب استفاده کنید
- پایه EN را به مثبت ۵ ولت وصل کنید
- در بیشتر مواقع، اشکالات پورت سریال باعث می شود که دیتایی ارسال نشود، پایه هیا RX و TX را اتصال کوتاه کنید، در صورت درست بودن، هر کاراکتری که ارسال می کنید می بایست باز گردد
- برای راحتی یکبار با ارسال دستور AT+ORGL ماژول را به تنظیمات کارخانه بازگردانده، سپس با ارسال دستور AT+ROLE=0 در حالت SLAVE قرار دهید
- امکان دارد در صورتی که قبلا از این ماژول استفاد کرده باشید، با ذخیره شدن اطلاعات قبلی نتوانید مجدد به ماژول کانکت شوید، می توانید از طریق دستور AT+NAME=ELEC نام دلخواه خود را (جایگزین کلمه ELEC ) برای ماژول قرار دهید
-
introduction
۱, 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 ~ 1382400bpsApplication
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 portSpecification
۱, 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 ~ 1382400bpstips (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 logicWorkaround Use:
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 SecondNote: 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)Tips:
۱٫ 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 testPin Configuration
Pin Number Pin Name Description ۱ Enable / Key This pin is used to toggle between Data Mode (set low) and AT command mode (set high). By default it is in Data mode ۲ Vcc Powers the module. Connect to +5V Supply voltage ۳ Ground Ground pin of module, connect to system ground. ۴ TX – Transmitter Transmits Serial Data. Everything received via Bluetooth will be given out by this pin as serial data. ۵ RX – Receiver Receive Serial Data. Every serial data given to this pin will be broadcasted via Bluetooth ۶ State The state pin is connected to on board LED, it can be used as a feedback to check if Bluetooth is working properly. ۷ LED - Blink once in 2 sec: Module has entered Command Mode
- Repeated Blinking: Waiting for connection in Data Mode
- Blink twice in 1 sec: Connection successful in Data Mode
۸ Button Used to control the Key/Enable pin to toggle between Data and command Mode HC-05 Default Settings
Default Bluetooth Name: “HC-05”
Default Password: 1234 or 0000
Default Communication: Slave
Default Mode: Data Mode
Data Mode Baud Rate: 9600, 8, N, 1
Command Mode Baud Rate: 38400, 8, N, 1
Default firmware: LINVOR
نقد و بررسیها
هنوز بررسیای ثبت نشده است.