Cytron Technologies has brought you the latest version of Bluetooth wireless module, BlueBee 4.0! Unlike the previous version of BlueBee, this module supports dual mode, BLE (Bluetooth Low Energy) mode and EDR mode which is commonly used. But what makes this module special is its BLE mode, which provides lower power consumption than previous Bluetooth module BlueBee.
Like BlueBee, BlueBee 4.0 is designed to adapt the form factor of XBee module. The pinout of BlueBee 4.0 is compatible with Xbee which is suitable for all kinds of microcontroller systems that have 3.3V power out. BlueBee is compatible with Xbee starter kit, so SKXBEE-BOARD or Arduino-XBee shield can be used for BlueBee communication. BlueBee 4.0 also contains onboard 3.3V voltage regulator and logic level shifter, which makes it compatible to 5V systems as well.
Generally, BlueBee 4.0 has 2 operation modes: transparent mode and AT mode. This module doesn’t require manual switching between these 2 modes. When the module is not connected to any other Bluetooth devices, it is in AT mode, when it is connected, it will enter transparent mode automatically. BlueBee 4.0 can be configured as both master and slave module, thus communication between two BlueBee 4.0 modules or between the module and other Bluetooth device is possible. It acts like a transparent serial port, which works with a variety of Bluetooth adapter and Bluetooth devices.
Covered in this Tutorial
This tutorial will serve to familiarize you with this new version of Bluetooth module BlueBee 4.0 and how to utilise the features within it.
The tutorial is split into the following sections:
- BlueBee 4.0 Module Overview – An overview of the features of the BlueBee 4.0 module.
- Hardware Assembly – Various methods to get the module ready to use.
- AT Test – A simple test to check if the module is working
- Communication between computers – Demonstration on how BlueBee 4.0 module can replace USB Bluetooth Dongle or built in bluetooth modules in computer to computer communication.
- Communication between computer and microcontroller – Demonstation on how BlueBee 4.0 creates wireless communication link between computer and Arduino board.
Before delving into this tutorial, there are a few concepts you should be somewhat familiar with. Check out these related tutorials:
- Bluetooth Basics – Learn all about Bluetooth basics and know the difference between EDR and BLE!
- Logic Levels – Learn all about logic levels in 5V and 3V3 systems and understand how BlueBee 4.0 compatible with 5V system despite its 3V3 compatible only Bluetooth module.
- Interfacing 3V3 and 5V systems – Learn lots of tips and tricks for interfacing between 3V3 and 5V systems.
BlueBee 4.0 Module Overview
Power LED (Green)
When the module is power on, power LED will light up.
Status LED (Red)
When the module is power on, LED will start blinking by default when it is not connected to any devices. If it is connected to other Bluetooth device, LED will stay lit.
Pinouts on BlueBee 4.0 include XBee form factor pinout (3.3V tolerant only) and 5V I/O pinout which is 5V tolerant.
Xbee form factor pinout
|1||3V3||3.3V (+) supply for module|
|2||Dout (TXD)||UART Data output|
|3||Din (RXD)||UART Data input|
|4||P11||I/O pin 11|
|5||RST||Reset for BlueBee module|
|6||P9||I/O pin 9|
|7||P10||I/O pin 10|
|8||P8||I/O pin 8|
|9||P2||I/O pin 2|
|11||P0||KEY (refer to provided module datasheet for more info)|
|12||CTS||UART clear to send, active low|
|13||P1||Status LED, blinking when not connected, stay lit otherwise|
|15||P3||I/O pin 3|
|16||RTS||UART request to send, active low|
|17||P4||I/O pin 4|
|18||P5||I/O pin 5|
|19||P6**||I/O pin 6|
|20||P7**||I/O pin 7|
*Please do not make any connection to NA pin.
*Xbee form factor pinouts are 3.3V tolerant only, please do not connect them directly to system powered with more than 3.3V.
** P6 and P7 are not functional due to the current firmware of the module.
5V I/O Pinout
|TX||UART Data output|
|RX||UART Data input|
|VCC||5V (+) supply|
*5V I/O pinouts are 5V tolerant.
BlueBee 4.0 Working Modes
There are 2 working modes for BlueBee 4.0 module by default: AT mode and Trans mode. When the module is not connected to any devices, it will enter AT mode automatically. Once it is connected, it will enter Trans mode.
- AT mode – Set or inquire control parameter in this mode. Default baud rate for AT mode is 115200 bps. User can set the baudrate to other values using AT command.
- Trans mode – Transmit or receive data from other Bluetooth device.
This board is basically a USB to UART breakout board for XBee module. The 2mm female header soldered on board allows user to plug in the Xbee module without soldering. BlueBee 4.0 is compatible with Xbee, therefore user can use this board for Bluetooth wireless communication.
- Connect USB cable to SKXBEE-BOARD and the other end to USB port of computer or laptop. Computer/laptop will detect COM port for the SKXBEE-BOARD. You may check the COM port at Device Manager. .If you are using SKXBEE-BOARD for the first time, you might need to wait until the driver installation is complete. After COM Port has been identified, you can start communicate with BlueBee 4.0 module.
- Solder header pins on BlueBee 4.0 module. (Note: BlueBee 4.0 modules are not presoldered with the header pins shown in this picture)
- Connect USB cable to UC00A and the other end to USB port of computer or laptop.
- Make sure the pins are connected correctly, such as VCC to VCC and GND to GND. As for TX and RX pins, both pins should be cross connected between them. In other words, TX pin of BlueBee should be connected to RX pin of UC00B and RX pin of BlueBee should be connected to TX pin ofUC00B.
- Plug UC00B into USB port of computer/laptop.
After connecting UC00A/B to computer or laptop, wait until the driver installation is completed if you are using UC00A/B for the first time. COM port for UC00A/B should be detected. You can check it under Device Manager.
Using Arduino Board + Xbee shield
- Make sure USB are selected for both UART selector jumpers.
- Connect Arduino RESET pin to GND.
- Connect Arduino Board to the computer using USB cable.
To send AT commands using USB cable, first we will need to hook up BlueBee 4.0 to appropriate hardware as shown in Section Hardware Assembly. User may use either SKXBEE-BOARD, UC00A/B or Arduino Board + XBee shield. As for software application, user may use Arduino Serial Monitor, RealTerm, or HyperTerminal. At the same time, the module need to stay unconnected to other Bluetooth devices.
Determine which COM port BlueBee 4.0 is connected to and configure the port settings under menu Tools -> Port.
AT commands must be in UPPERCASE and can be entered directly without any ending symbols such as \r or \n. The default baud rate is 115200 bps. Therefore, open and set up Arduino Serial Monitor with settings below.
- 115200 Baud
- No line ending
Figures below shows sending “AT” using Arduino Serial Monitor. If the result returns “OK”, it means you have successfully communicate with the module.
Feel free to try out other AT commands. AT command list can be downloaded here.
Communication between Computers
This section will show how BlueBee 4.0 can replace computer built-in Bluetooth or USB Bluetooth dongle and enable communication between 2 computers. 2 computers named computer A and computer B will be used.
Computer A will be using BlueBee 4.0 with SKXBEE-BOARD (BlueBee 4.0 with other hardware like UC00A/B or Arduino Board + Xbee shield is also acceptable).
Computer B will be using its own built-in Bluetooth module (If computer B is desktop, Bluetooth dongle can be used).
Note**: BlueBee 4.0 in EDR mode (the mode which requires pairing process before the connection) can only act as slave device, so it requires another Bluetooth device such as PCs, phones to initiate the pairing and connection process. In this section, computer B will act as host (master) and initiate the pairing and connect sequence.
Setup for computer A:
- Setup hardware installation can be referred to hardware assembly. User may use either SKXBEE-BOARD, UC00A/B or Arduino + XBee shield.
- Open and setup Arduino Serial Monitor for Computer A. For this example, the COM Port for BlueBee 4.0 is COM3 and baud rate is set to 115200. No line ending should be selected as well. The COM port may be different with other computer/laptop.
Setup for computer B:
- User needs to turn on bluetooth on computer B to enable bluetooth connection with computer A. If computer B does not have built in bluetooth, user can install USB bluetooth dongle instead.
- Go to Devices and Printers on Computer B -> Add a device.
- Search for BlueBee4.0 and click Next. Enter the pin code, by default it is 1234.
- After the pairing is complete, BlueBee4.0 icon will be listed in the devices and printers list. Right click the icon to search for bluetooth serial COM Port. Under Hardware tab -> Device Functions, COM Port will be shown. In this case, bluetooth serial COM Port is COM19.
- Open and setup Arduino Serial Monitor for computer B. For this example port setting for Bluetooth is COM19 and the baudrate is 115200.
When Arduino Serial monitor is opened on Computer B, the bluetooth connection starts and the Status LED of BlueBee 4.0 should be staying lit.
Type any words at Arduino Serial Monitor at computer A. User may see, the words typed on computer A will be received by Arduino Serial Monitor of computer B and displayed. Then, type any words at Arduino Serial Monitor computer B and those words also received and displayed on Arduino Serial Monitor computer A. That means that Bluetooth link is created and data is able to communicate (transmit and receive) between computer A and computer B.
Computer A (COM 3)
Computer B (COM 19)
Communication between Computer and Microcontroller
This section will show communication between computer and microcontroller using BlueBee 4.0. Arduino board will be used as microcontroller. XBEE shield is being used as well to provide easy platform between BlueBee 4.0 and Arduino.
Setup for Arduino + XBEE shield +BlueBee 4.0:
- The setup is almost similar with Hardware Assembly section but with following modifications to be made:
- UART selector change to D1 for TX and D0 for RX.
- Remove the connection between RST and GND.
- Upload BlueBeeExample sketch to Arduino Board. Arduino Board can be disconnected from the computer after the sketch upload is complete.
- Power up Arduino Board and BlueBee 4.0 with power adapter.
Setup for computer:
- Turn on the Bluetooth.
- Pair with BlueBee 4.0 and identify the bluetooth Serial COM Port. (can refer to Section Communication between Computers – Setup for Computer B)
- Open Arduino IDE. Go to Tools -> Port and select Bluetooth Serial COM Port. Open Serial Monitor with 115200 Baud.
When Serial Monitor is opened, bluetooth connection starts and Status LED on BlueBee 4.0 should be staying lit. Now you can send anything you want (less than 64 characters). If the serial monitor shows “From BlueBee4.0:” followed by anything you have sent, the connection is considered successful.
BlueBee 4.0 is the latest version of Bluetooth module brought to you by Cytron Technologies with new features and enhancements, what is more it is more power saving! If you have any inquiries about this new product, please do visit our technical forum for more info!