Seeed BLE Shield 藍牙擴展板 兼容 arduino/seeeduino Arduino 透過 UART 轉 BT 4.0 通訊

-21%

Seeed BLE Shield 藍牙擴展板 兼容 arduino/seeeduino Arduino 透過 UART 轉 BT 4.0 通訊

NT$724 NT$571 未稅

Seeed BLE Shield 是一款低功耗藍牙4.0傳輸模組。模塊採用的是TI CC2540 晶片,配置256Kb空間,支持AT指令。你可以將此模塊應用於遙控、遊戲手柄、數據無線採集、智慧家居等領域。同時作為Shield系列的一員,它能很方便的直插到開發板上使用。

尚有庫存

  • 商品說明
  • 原廠資料
  • 技術文件
  • 評論 (0)

商品說明

讓 Arduino 透過 UART 轉 BT 4.0 通訊

Seeed BLE Shield 是一款低功耗藍牙4.0傳輸模組。模塊採用的是TI CC2540 晶片,配置256Kb空間,支持AT指令。你可以將此模塊應用於遙控、遊戲手柄、數據無線採集、智慧家居等領域。同時作為Shield系列的一員,它能很方便的直插到開發板上使用。

本模組附技術文件與 Android 範例程式

參數一覽

  • 工作頻率: 2.4GHz ISM band
  • 調製方式: GFSK
  • 發射功率: -23dbm, -6dbm, 0dbm, 6dbm(可通過AT指令選擇)
  • 靈敏度 : ≤-84dBm at 0.1% BER
  • 傳輸速率: Asynchronous: 6K bytes , Synchronous: 6k Bytes
  • 支持服務: Central & Peripheral UUID FFE0,FFE1
  • 功耗: 工作電流小於15mA,搜索電流小於30mA,睡眠模式小於3mA
  • 供電電源: 5V DC
  • 工作溫度: –5 ~ +65 C
  • 通訊距離: 最大理論值為100m
  • 尺寸: 68mm x 43mm
  • HM-11:我們採用的藍牙低功耗模塊為HM-11模塊,詳情請點擊鏈接進入HM-11 wiki進行查閱。
  • Signal lamp: State為連接指示燈,當未連接時,指示燈大概以一秒每次的頻率閃爍;當已鏈接後,指示燈常亮。
  • Grove connectors: Seeed BLE Shield v1板上有兩個Grove接口,方便用戶直插Grove產品。
  • Hard or Softserial port:用戶可通過此跳帽選擇不同的數字口作為傳輸端口。此處絲印有兩處錯誤,查看PCB板絲印時請將”WIFI_TX”及”WIFI_RX”看成”BLE_TX”及“BLE_RX”
  • Reserved pinouts from HM-11: 這些引出口為HM-11模塊上的預留引腳,當用戶需要的時候,可以很迅速的焊接,以方便使用.
  • Reset button: 復位鍵,按下即可複位HM-11模塊。且,按下Seeed BLE Shield的複位鍵不會影響開發板的狀態。

產品使用

硬件連接

Seeed BLE -2.png

直接將BLE Shield插入到Arduino/Seeeduino上. 請注意PCB板上跳帽的選擇.

軟串口通信

當你使用不同代碼的時候,Seeed BLE Shield可以作為主機或從機。當使用軟串口通信時,即使用軟件代碼對BLE模塊進行通信時,跳帽的選擇應為:BLE_TX–>D2,BLE_RX–>D3.
然後打開Arduino IDE v1.0.5,複製以下主機或從機的代碼,並下載到主板中。 從機代碼

主機代碼

硬串口通信

當然,你可以通過AT指令直接對BLE模塊進行操作,而不需要使用任何代碼。但需要注意跳帽的位置:BLE_TX–>D1,BLE_RX–>D2。
然後打開串口工具,比如MAC版用戶可以打開CoolTerm串口助手,PC版用戶可打開Sscom32串口工具。串口工具的設置如下:Baudrate: 9600(default) , Data Bits: 8, Parity: none, Stop Bits: 1

你可以發送指令”AT”進行測試,如果返回“OK”,即能夠通信。如果沒有返回任何值,用戶可以嘗試燒錄一個空程序到主板上,然後再發送指令“AT”進行測試。

確認可以通信之後,便可以發送AT指令給BLE模塊了。比如設置BLE模塊為從機,發送指令“AT+ROLE0”,如果返回“OK+Set:0”,即表示BLE模塊已設置成功。

Seeed BLE -3.png

AT指令

所有的AT指令都包含在以下的資源版塊的BLE模塊data sheet中,用戶請自行下載查閱。

Overview

Seeed BLE v1 FrontSeeed BLE -4.pngSeeed BLE -5.pngSeeed BLE v1 Back

Introduction

This Seeed BLE Shield utilizes an HM-11 module to provide your Arduino/Seeeduino with serial BLE function. It only takes two pins of the micro controller to communicate your device with this shield. With support for a BLE ComAssistant APK, this BLE Shield can talk to your mobile phone more easily without pairing. You can use it in many conditions, like robot controls or remote control equipment ,etc. We prepared an easy and convenient command set for this shield so that you can use neat and concise code to run the function.

Parameters

Specifications Value
BT Version Bluetooth Specification V4.0 BLE
Working Frequency 2.4GHz ISM band
Working Current < 15 mA
Sourcing Current < 30 mA
Sleeping Current < 3 mA
Modulation Method GFSK(Gaussian Frequency Shift Keying)
RF Power -23dbm, -6dbm, 0dbm, 6dbm, can modify through AT Command AT+POWE
Speed Asynchronous: 6K Bytes, Synchronous: 6K Bytes
Sensibility ≤-84dBm at 0.1% BER
Security Authentication and encryption
Service Central & Peripheral UUID FFE0,FFE1
Supply Power 5v
Working Temperature –5 ~ +65 Centigrade
Size 68mm x 43mm

Introduction

BLE Shield.png
  • HM-11: The basic module is HM-11, more information you can refer to this wiki of HM-11.
  • Signal lamp: Lamp will blink if no one connect BLE, but the lamp would keep lighting after BLE has been connected.
  • Grove connectors: There are two Grove connectors onto the BLE shield, you can plug Grove products onto the board conveniently.
  • Hard or Softserial port: You can choose two of seven digital pins as the communication channel. Just plug the jumpers into the headers. There are two mistakes on the silkscreen, please kindly regard “WIFI_TX” and “WIFI_RX” as “BLE_TX” and “BLE_RX”.
  • Reserved pinouts from HM-11: There are some reserved pinouts from HM-11 module, such as CTS1, RTS1 and PIO2, etc.
  • Reset button: Press the reset button if you need to reset the BLE Shield. However, this reset button does not affect the state of the main board(such as Arduino Uno) if BLE Shield is plugged onto the main board.

Applications

Hardware Connection

Seeed BLE -2.png

Plug Seeed BLE Shield onto the Arduino/Seeeduino directly. Please pay attention to the position of jumpers on the BLE Shield.

SoftwareSerial Communication

Seeed BLE Shield can be acted as a master or slave, you can use the one via different demos.If you are going to use the following SoftwareSerial program, please refer to the way of connection in the previous pic. BLE_TX–>D2, BLE_RX–>D3.
Open Arduino IDE, copy the following program and upload it onto the Arduino/Seeeduino board. And then two BLE Shields can communicate with each other.

Demo : BLE Slave

#include <SoftwareSerial.h>   //Software Serial Port
#define RxD 2
#define TxD 3
 
#define DEBUG_ENABLED  1
 
SoftwareSerial BLE(RxD,TxD);
 
void setup() 
{ 
  Serial.begin(9600);
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  setupBleConnection();
 
} 
 
void loop() 
{ 
  char recvChar;
  while(1){
    if(BLE.available()){//check if there's any data sent from the remote BLE shield
      recvChar = BLE.read();
      Serial.print(recvChar);
    }
    if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
      recvChar  = Serial.read();
      BLE.print(recvChar);
    }
  }
} 
 
void setupBleConnection()
{
  BLE.begin(9600); //Set BLE BaudRate to default baud rate 9600
  BLE.print("AT+CLEAR"); //clear all previous setting
  BLE.print("AT+ROLE0"); //set the bluetooth name as a slaver
  BLE.print("AT+SAVE1");  //don't save the connect information
}

Demo : BLE Master

#include <SoftwareSerial.h>   //Software Serial Port
#define RxD 2
#define TxD 3
 
#define DEBUG_ENABLED  1
 
SoftwareSerial BLE(RxD,TxD);
 
void setup() 
{ 
  Serial.begin(9600);
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  setupBleConnection();
 
} 
 
void loop() 
{ 
  char recvChar;
  while(1){
    if(BLE.available()){//check if there's any data sent from the remote BLE shield
      recvChar = BLE.read();
      Serial.print(recvChar);
    }
    if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
      recvChar  = Serial.read();
      BLE.print(recvChar);
    }
  }
} 
 
void setupBleConnection()
{
  BLE.begin(9600); //Set BLE BaudRate to default baud rate 9600
  BLE.print("AT+CLEAR"); //clear all previous setting
  BLE.print("AT+ROLE1"); //set the bluetooth name as a master
  BLE.print("AT+SAVE1");  //don't save the connect information
}

HardwareSerial Communication

Besides, you can use BLE Shield via AT commands without any program, but you need to change the positions of two jumpers. BLE_TX–>D1, BLE_RX–>D0.
Then open a Serial Port Tool, like CoolTerm or others.The following are some settings : Baudrate: 9600(default) , Data Bits: 8, Parity: none, Stop Bits: 1.

First, you can send a(some) “AT” command(s) to BLE Shield to have a test. If it returns an “OK”, then you can do the following steps. If not, you can upload a blank program to Arduino/Seeeduino, and see whether you can get response from Serial Port Tool via the previous operation.

void setup()
{                
}

void loop() 
{
}

Then, send an “AT+ROLE0” command to BLE Shield; it will return an “OK+Set:0”, which means now the BLE Shield is ready to act as a slave.

Seeed BLE -3.png

AT Commands

More information about the AT Commands please refer to the data sheet of BLE module. You can download it from the Resource space.

 

Download File Not available

商品評論

目前沒有評論。


只有註冊並且購買過商品的顧客才能撰寫評論