現貨供應最新開發模組

Seeed BLE Shield

  • 工作頻率: 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

代號
seeed-ble-shield

SKU 即原廠標號
113030013

定價
600
特價
630 (含營業稅)

有庫存

原廠連結:http://www.seeedstudio.com/wiki/index.php?title=Seeed-BLE_Shield_v1

簡介


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

參數一覽

  • 工作頻率: 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


 

產品解析

BLE Shield.png

註:此圖為樣板示意圖,生產圖請在簡介版塊查看。
 

  • 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,複製以下主機或從機的代碼,並下載到主板中。

從機代碼

#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
}


主機代碼

#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
}

硬串口通信


當然,你可以通過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」進行測試。

void setup()
{
}

void loop()
{
} 


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

Seeed BLE -3.png
 

AT指令


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

文檔下載


Schematic of Seeed BLE Shield
BLE_apk_for_Android
DataSheet of BLE module

資料來源:https://www.seeedstudio.com/Seeed-BLE-Shield-p-1859.html

Description

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.
 
Features
  • Arduino/Seeeduino compatible
  • UART serial port of HM-11 on the Shield can be connected to Arduino by jumpers
  • With two Grove connectors, making it easy to connect I2C and digital IO Grove modules to Arduino
  • AT commands support
 


 

Technical Details

Dimensions 115mm x 75mm x 25mm
Weight G.W 45g    
Battery Exclude

Part List

Seeed BLE Shield 1

Line share