Difference between revisions of "Bluetooth Transceiver Module HC-06"
(→Resource) |
(→Resource) |
||
Line 96: | Line 96: | ||
For more information about HC-06 AT Commands, please refer to [http://192.168.0.121/mediawiki/index.php/File:HC-06_AT_Commands_Reference.pdf HC-06_AT_Commands_Reference.pdf].<br> | For more information about HC-06 AT Commands, please refer to [http://192.168.0.121/mediawiki/index.php/File:HC-06_AT_Commands_Reference.pdf HC-06_AT_Commands_Reference.pdf].<br> | ||
=='''Resource'''== | =='''Resource'''== | ||
− | [http:// | + | [http://wiki.sunfounder.cc/index.php/File:Android.BlueSPP.zip Android.BlueSPP][[File:ZIP.jpg]]<br> |
− | [http:// | + | [http://wiki.sunfounder.cc/wiki/index.php/File:Sscom32E.zip Sscom32E][[File:ZIP.jpg]]<br> |
− | [http:// | + | [http://wiki.sunfounder.cc/wiki/index.php/File:HC-06_AT_Commands_Reference.pdf HC-06_AT_Commands_Reference.pdf][[File:PDF.jpg]]<br> |
Revision as of 06:44, 20 March 2017
Contents
Introduction
This Bluetooth module can easily achieve serial wireless data transmission. Its operating frequency is among the most popular 2.4GHz ISM frequency band (i.e. Industrial, scientific and medical). It adopts Bluetooth 2.0+EDR standard. In Bluetooth 2.0, signal transmit time of different devices stands at a 0.5 seconds interval so that the workload of bluetooth chip can be reduced substantially and more sleeping time can be saved for bluetooth. This module is set with serial interface, which is easy to use and simplifies the overall design/development cycle.
Specification
Bluetooth protocol: Bluetooth 2.0+ EDR standard
USB protocol: USB v1.1/2.0
Operating frequency: 2.4GHz ISM frequency band
Modulation mode: Gauss frequency Shift Keying
Transmit power: ≤ 4dBm, second stage
Sensitivity: ≤-84dBm at 0.1% Bit Error Rate
Transmission speed: 2.1Mbps(Max)/160 kbps(Asynchronous); 1Mbps/1Mbps(Synchronous)
Safety feature: Authentication and encryption
Supported configuration: Bluetooth serial port (major and minor)
Supply Voltage: +3.3 VDC 50mA
Operating temperature: -20 to 55℃
Size: 36.5*16mm
Weight: 4g
Pin Description
'VCC: positive pole of the power source.
GND: Ground.
TXD: serial interface, transmitting terminal.
RXD: serial interface, receiving terminal.
Test method
Using SunFounder Uno
Step 1: You should compile and upload the code before building the circuit
/****************************************/ #define ledPin 13 // //pin 13 built-in LED light int val; void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); } void loop() { if(Serial.available()) // { val = Serial.read(); if(val =='A') //if comes a 'A',LED on control board will blink { digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(500); Serial.println("Rebecca"); //print on Serial debugging assistant on computer } } } /****************************************/
Step 2: Build the circuit
HC-06 | SunFounder Uno Board |
---|---|
VCC | 5V |
GND | GND |
TXD | RX0 (pin0) |
RXD | TX0 (pin1) |
Step 3: You need to download a bluetooth debugging assistant for mobile phone to connect your phone with the Bluetooth HC-06 module. We've provided the tool in Android(SPP). Just download the package on your smart phone and decompress. Then you can see a file BlueSpp. Enable Bluetooth on your phone and install the BlueSpp.
Open the installed app, as shown in Fig 1. Click CONNECT at the top right corner. Then click the search button (Fig 2). Find HC-06 and click. A window will pop up asking for a PIN (Fig 3). The password is: 1234. Click OK to connect.
After connecting mobile phone or other Bluetooth device and Bluetooth HC-06 module successfully (Fig 4), the LED indicator on the Bluetooth module will be steady on (stop blinking). Otherwise, the LED indicator will keep blinking.
Now you can send commands. Send a character A to the Bluetooth HC-06 module. If the communication works normally, on the surface you can see A sent out and Rebecca returned (Fig 5). Then the LED on the SunFounder UNO board will blink once.
Using AT Commands
Step 1: Wiring.
Connect TXD of HC-06 Module to RXD of PL2303, RXD to TXD, GND to GND, and VCC to VCC. PL2303 is a USB to Serial Bridge Controller. You can also use other components, such as FTDI.
Step 2: Set parameters
After wiring, open the serial port debug tool sscom32. Set parameters at first.
1) Open the serial port, click Open Com. Select the correct port, as shown below.
2) Select the correct baud rate. Here select 9600 bps. Click SendNew, as shown below.
Step 3: Now, you can start to send commands. Enter AT in the text box. If HC-06 Module goes well, OK will be returned, as shown below:
Also you can send AT+NAMEBOLUTEK. OKsetname will be returned and then the Bluetooth name will be changed to bolutek.
For more information about HC-06 AT Commands, please refer to HC-06_AT_Commands_Reference.pdf.