10
DF-Bluetooth V3 Module (TEL0026) D-Robotics UK (www.droboticsonline.com) This DF-Bluetooth version 3 module offers an affordable way to let your microcontroller talk to your Bluetooth devices. D-Robotics 6/25/2010

BluetoothV3 Manual

Embed Size (px)

Citation preview

Page 1: BluetoothV3 Manual

DF-Bluetooth V3 Module (TEL0026) D-Robotics UK (www.droboticsonline.com) This DF-Bluetooth version 3 module offers an affordable way to let your microcontroller talk to your Bluetooth devices. D-Robotics 6/25/2010

Page 2: BluetoothV3 Manual

Page | 2

DF-Bluetooth V3 Module

Cautions: A. Please carefully read this guide before powering the module. Wrong connection may

permanently damage or burn microcontroller!

B. Please carefully check the pin definition and ensure the right connection. Wrong power

connection will permanently damage the module!

C. The power supply range is DC 3.5-8V and please do not exceed this limit! Please ensure

the power stability as high voltage pulse may permanently damage the module.

D. Please be aware that the product is not waterproof or moisture-free and please use it in

a dry environment.

1. Introduction DF-Bluetooth V3 uses a unique double-board design, aiming to prevent electrostatic damage to

the module. It is designed to have 2 DC power input, wide voltage supply (3.5V ~ 8V) and 3.3V

Page 3: BluetoothV3 Manual

Page | 3

power supply and is suitable for various applications. STATE LINK is indicated by a clear and

bright LED to display module status and connection status. It has a build-in on-board antenna

which provides high quality signals.

DIP switch is designed to set the module status, LED Off to turn off the LINK light to enter power

saving mode; AT Mode allows the module to enter AT command mode and AT commands can

modify the baud rate and the master and slave mode.

This module can also be used as a pair which provides a transparent serial data communication.

It has been tested and compatible with most Bluetooth adapter in the market (Bluetooth dongle,

including laptops and mobile phones). It also provides TTL level UART interface which is

supported by almost every microcontroller in the market.

It is designed to be compatible with most popular Arduino controller. Simply plug into Arduino

IO Expansion Shield, a Bluetooth Arduino is ready to use.

2. Specifications

1. Chips: CSR BC417143 2. Bluetooth Protocol: Bluetooth Specification v2.0 +EDR 3. Working Frequency: 2.4-2.48GHz unlicensed ISM Band 4. Modulation Mode: GFSK (Gaussian Frequency Shift Keying) 5. Power: ≤4dBm, Class 2 6. Transmission Distance: 20-30 in free space 7. Sensitivity: ≤-84 dBm at 0.1% BER 8. Transmission rate: Asynchronous: 2.1 Mbps (Max)/160 kbps; Synchronous:

1Mbps/1Mbps 9. Security: Authentication and encryption 10. Support profiles: Bluetooth serial port 11. LED indicator: LINK 12. Power Supply: +3.5V-+8V DC/50 mA 13. Working Temperature: -20°C-+55°C 14. Dimension: 43x19.3x11mm 15. Default serial setting: 9600/N/8/1 16. Default Pairing Code: 1234

Page 4: BluetoothV3 Manual

Page | 4

3. Set UP Guide

3.1 Module Set up The DF-Bluetooth V3 supports AT commands to set baud rate and the master and slave mode. As shown in Figure 1 below, the Bluetooth module has a 2-numbered switch. No. 1 switch is for LED Off and when on the “ON” end it switches on the LINK Led; when on the “1” end it turns off LED and thus saves power. No. 2 switch is for controlling AT command mode and when on the “ON” end it switches on the AT command mode; when on the “2” end it exits the AT command mode. Figure 1 2-Numbered Switch

Pin Definition

GND GND

VCC 3.5 – 8V DC Input (when there is VCC input, the 3V3 pin can be used as 3.3V output)

NC Not in use

RXD RX (TTL Level)

TXD TX (TTL Level)

GND GND

3V3 3.3V DC (when there is 3.3V input on this pin, the VCC pin cannot take input power)

Page 5: BluetoothV3 Manual

Page | 5

To set up the model, you will need a USB-Serial module. As shown in Figure 2 below, plug the DF-Bluetooth V3 into a USB-Serial Module; then switch on the AT command mode (turn No. 2 switch to the “ON” end); connect the USB-Serial Module to a computer. A driver is needed for the USB-to-Serial Module, which can be downloaded at http://www.willar.com/upload/shop/CP210x_Drivers.rar. Figure 2 USB-Serial Module for Bluetooth V3

Once connected with the PC, open a port/serial debugging tool such as SSCOM3.2 to adjust and test if the AT command communication works. Once AT command mode is tested working, turn off the AT mode (turn the switch back to the “2” end) and exit the AT mode. Then re-power the module to effect the settings.

AT Commands 1 Testing Command

Command Response Parameter

AT OK None

2 Module Reset Command

Command Response Parameter

AT+RESET OK None

3 Module Mode Set-up and Check Command

Command Response Parameter

AT+ROLE=< Param > OK Param: 0 – Slave 1 – Master 2 – Slave-Loop Default: 0

AT+ROLE? +ROLE: < Param > OK

Page 6: BluetoothV3 Manual

Page | 6

Module Mode Explanation: Slave – passive connection; can be paired with any Bluetooth adapter/devices; Master – searching for any slave device and connect to it if find such a device so that establish a transparent serial communication between the master and salve devices; Slave-Loop – passive connection; receiving data from master or main Bluetooth devices and then returning the same data to those devices. 4 Set Up and Check Pairing Code(s)

Command Response Parameter

AT+PSWD= < Param > OK Param: Pairing Code Default: “1234”

AT+PSWD? + PSWD: < Param > OK

5 Set Up and Check Port Parameter(s)

Command Response Parameter

AT+ UART=< Param1 >, < Param2 >, < Param3 >

OK Param1: Baud rate (bits/s) 4800 9600 19200 28400 57600 115200 230400 460800 921600 1382400 Param2: 1 or 2 digit parameter 0 – 1 1 – 2 Param3: Check 0 – None 1 – Odd 2 – Even Default: 9600, 0, 0

AT+ UART? + UART : < Param1 >, < Param2>, < Param3 > OK

Example: to set port parameters to: 115200, 2 digit, Even Check AT+ UART= 115200, 1, 2\r\n OK AT+ UART? +UART: 115200, 1, 2 OK

Page 7: BluetoothV3 Manual

Page | 7

3.2 Paring with other Bluetooth devices The DF-Bluetooth V3 module is based on the specification of Bluetooth V2.0, compatible with V1.1. A Bluetooth adaptor is required to communicate with the DF-Bluetooth module. When it is paired with other Bluetooth devices, the DF-Bluetooth is always set to slave mode.

The IVT BlueSoleil is recommended to manage all your Bluetooth devices. It can be downloaded from http://www.bluesoleil.com/. The following guide is based on IVT BlueSoleil. Step 1: Open BlueSoleil software (Figure 3) and right click the yellow ball in the centre screen, click “Search Devices”, an icon named EPBMX-COM will appear after few seconds. The EPBMX-COM is the DF-Bluetooth module. Figure 3 IVT BlueSoleil

Page 8: BluetoothV3 Manual

Page | 8

Step 2: Right click EPBMX-COM icon, click “Pair”. A window will popup ask for PassKey which is “0000” by default (Figure 4). Figure 4 Bluetooth Passkey

Step 3: Double click EPBMX-COM to connect to DF-Bluetooth. Figure 5 Connecting DF-Bluetooth

Page 9: BluetoothV3 Manual

Page | 9

Step 4: Upload test code to Arduino.

void setup()

{

Serial.begin(9600); //Set serial baud rate to 9600

}

void loop()

{

Serial.print("Hello!"); //print out hello string

delay(1000); //1 second delay

}

Tips

Check the serial setting! Make sure the baud rate is set to 9600 on both master and slave.

When the DF-Bluetooth is used on Arduino, please make sure you disconnect the DF-Bluetooth module before uploading any code to your Arduino. It won’t burn your Arduino, but the uploading will fail as the DF-Bluetooth module occupying the TX/RX pins.

3.3 Master and Slave Two DF-Bluetooth V3 modules can

communicate with each other but one has

to be set to as Master while the other has to

be set as Slave (refer to the AT command

section under 3.1 for setting up the

modules). When using under the master and

slave mode, no driver is needed; once

powered, they can start to transfer data.

The flashing STATE LED indicates the

modules are pairing; when the LINK LED

comes on, it indicates the modules are

paired and ports are ready.

Usually, the LED will not turn off when the

master and slave are in use; if the distance is

Figure 6 Master and Slave Work with Arduino

Page 10: BluetoothV3 Manual

Page | 10

too far and the link is interrupted, the LEDs on both the master and slave modules keep flashing

until the two modules get closer and the connection is automatically established again. The

master remembers its slave once being set up.

As shown in Figure 6 above, the master and slave can work with Arduino controllers. Below are

the codes for the Master and slave

Arduino Master Test Code: void setup() { Serial.begin(9600); //set baud rate to 9600 } void loop() { Serial.print("Hello!"); Serial.println("DFRobot"); delay(500); }

Arduino Slave Test Code: void setup() { Serial.begin(9600); //set baud rate to 9600 } void loop() { char val; val = Serial.read(); //read port if(val!=-1) { Serial.print(val); } }

Declaim:

This manual is a translated version of the manufacturer’s manual. Although the due care has

been taken during the translation, D-Robotics is not responsible for the accuracy of the

information contained in this document. Copyright © D-Robotics.

D-Robotics: www.droboticsonline.com

Email contact: [email protected]