星期三, 8月 02, 2017

BLE Lego Train

I've been busy with BLE Lego Train recently. 
8879 Remote control IR Speed Remote Control
8879 Remote control IR Speed Remote Control

Traditionally, we use 8879 Remote control IR Speed Remote Control to control most 4 trains.
But I also want to control auto switch tracks with motor , it's need more and more 8884 REMOTE CONTROL IR RECEIVER.


If I want control 4 train and 4 switch, I need 2 x Remote Control, 8 x IR Receiver, 4 x 88002 Train Motor, 4 x 8883 Medium Motor, 8 x Battery Box, cost $$$$$$$$$$....

The expenditure of motor is unavoid, but I want build more intelligent railway system, a IoT based system, IR is not a good choice.
A BLE based Remote Control is better.
At beginning, I use RFDuino, a Arduino ecology mcu with NRF51822, including Nordic privated Gazell Link Layer protocol(GZll), very easy to exchange data between BLE devices by GZll.
gzll_fig1_star_network.png
GZLL Star Network




This my first prototype:


RFDuino with GZll is good, but only support 8 devices (with host, totally 9 devices), there is not enough expansion capability for me. So I begin to study next prototype.

I found RedBear BLE Nano is a good candidate, acceptable price, and a most important: open source!
RedBear BLE Nano


Open source that mean I can duplicate many BLE Nano compatible device with cheap NRF51822 board.
NRF51822 BLE GT82C01


First I buy a set of RedBear BLE Nano for my 2nd prototype, I use RFDuino as RC host, to treat as a Beacon/Broadcaster. BLE Nano as RC device, to treat as a observer.
BLE Nano can receive advertisement data from Beacon, parse the data and interpreter command to control motor.
Now the path between RFduino and BLE Nano is linked, next step is controlling train motor directly!

沒有留言:

iPhone 14 Pro vs Olympus EM10 MkII 中篇

時間來到2022年, 我的S20+因為綠線事件, 立馬被我淘汰了, 同時我也正計畫購入Mini Countryman, 很殘念的是該車系統只支援CarPlay而不支援Android AUTO, 所以我也開始考慮要不要從Android換到Apple陣營. 好, 上面都是題外話, 反...