Micro:bit做為當紅的少兒編程工具,這兩年在編程教育領域越來越火。今天就從硬件架構開始,分享Micro:bit的相關主題。
Microbit 硬件設計是根據ARM mbed技術所開發的應用IC及相干周邊功能所設計出來的!另外有一顆接口IC 用來處理USB 接口及拖拉式核心軟件更新法.這接口IC 並未用來鏈接任何周邊.
兩部分關鍵信息可以一窺Microbit 的內部設計:
· 線路圖(schematics,http://tech.microbit.org/hardware/schematic/ ), 可以看到主要零件的鏈接方式及設計.
· 參考設計及相關模塊數據(referencedesign,
http://tech.microbit.org/hardware/reference-design/ ), 這部分的數據可以幫助進一步了解Microbit 的設計及變動性
硬件相關說明
nRF51 應用處理器IC
nRF51 應用處理器IC是讓使用者作主要程控的處理器,完整的程序包含了用戶客制及中介層(runtime) 及藍芽協議層(Stack),(譯者注:瀏覽器編譯環境會在用戶程序寫完同時,將這三部分整合完成) 一旦用戶將完整程序(HEX 文件)放在USB 閃存根目錄上,處理器便會直接執行程序代碼。使用者也可對連接在這處理器上的GPIO去做控制. 也可透過2.4GHz 無線去做相關周邊的控制.
項目 |
說明 |
Model |
Nordic nRF51822-QFAA-R rev 3 |
Core variant |
ARM Cortex-M0 32 bit processor |
Flash ROM |
256KB |
RAM |
16KB |
Speed |
16MHz |
Debug |
SWD, jlink/OB |
More Info |
http://tech.microbit.org/software/ |
藍芽通訊
板子上2.4G無線相關設計提供了對手機平板的藍芽通訊功能
項目 |
說明 |
Stack |
Bluetooth 4.1 with Bluetooth low energy |
Band |
2.4GHz ISM (Industrial, Scientific and Medical) 2.4GHz..2.41GHz |
Channels |
50 2MHz channels, only 40 used (0 to 39), 3 advertising channels (37,38,39) |
Sensitivity |
-93dBm in Bluetooth low energy mode |
Tx Power |
-20dBM to 4dBm in 4 dB steps |
Role |
GAP Peripheral |
Congestion avoidance |
Adaptive Frequency Hopping |
Profiles |
https://lancaster-university.github.io/microbit-docs/ble/profile/ |
More Info |
http://tech.microbit.org/bluetooth/ |
無線通信
板子上2.4G無線相關設計提供另外的無線通信協議(Nordic Gazell),這通訊協議已經在不同的程序語言環境可以直接使用,並且可以在多個microbit 裝置中互相傳遞並且群組化(group code ).
項目 |
說明 |
Protocol |
Nordic Gazell |
Freq band |
2.4GHz |
Channel rate |
1Mbps or 2Mbps |
Encryption |
None |
Channels |
101 (0..100) |
Group codes |
255 |
Tx power |
Eight user configurable settings from 0(-30dbm) to 7 (+4dbm) |
Payload size |
32 (standard) 255 (if reconfigured) |
More Info |
https://lancaster-university.github.io/microbit-docs/ubit/radio/ |
按鍵
Microbit 正面有兩個按鈕,背面有一個。背面的按鍵連接至KL26 接口IC及 nRF51 處理器做系統重制用(reset)
正面的按鍵A 、 B 是可以由使用者去做程控包括了短壓、長壓或是A、B同時按,按鍵A、B 均連接至金手指(edge connector)上的GPIO ,加上電路設計可以做logic 0 或 1值的操作.
項目 |
說明 |
Type |
2 tactile user buttons, 1 tactile system button |
Debounce |
(A & B) software debounced, 54ms period |
Pullup |
(A & B) external 4K7, (System) 10K |
顯示
在板子上有5x5 數組LEDs.做為顯示屏,microbit 是以3x9 數組電路去控制它.並用很高的速度去刷新它。
項目 |
說明 |
Type |
minature surface mount red LED |
Physical structure |
5x5 matrix |
Electrical structure |
3x9 |
Intensity control |
10 steps |
Intensity range |
TBC |
Sensing |
ambient light estimation via software algorithm |
Sensing Range |
TBC, 10 levels from off to full on |
Colour sensitivity |
red centric, red is 700nm |
重力傳感器(加速度傳感器)
重力傳感器是經由I2C 跟處理器連結,並提供了三軸的感應數據並包含了手勢感測的算法 (like : fall detection, logo-up, logo-down, shake)
項目 |
說明 |
Model |
Freescale MMA8653FC |
Features |
3 axis, 2/4/8g ranges |
Resolution |
10 bits (0..1023) |
Max output data rate |
800Hz |
On board gestures |
‘freefall’ |
Other gestures |
Other gestures are implemented by software algorithms in the runtime. |
磁力傳感器
磁力傳感器也是透過I2C 跟處理器連結,提供了磁力感測數值,並提供指南針功能,(The compass must be calibrated before use, and the calibrationprocess is automatically initiated by the runtime software –譯者對這段有些疑慮,暫不翻譯)
項目 |
說明 |
Model |
Freescale MAG3110 |
Max update rate |
80Hz |
Full Scale range |
1000uT |
Sensitivity |
0.10uT |
溫度感測
nRF51 處理器提供了板子上的實時溫度感測(Runtime ambient temperature sensing ).
項目 |
說明 |
Type |
on-core nRF51 |
Sensing range |
-25C .. 75C |
Resolution |
0.25C steps |
Accuracy |
+/-4C (uncalibrated) |
More Info |
https://lancaster-university.github.io/microbit-docs/ubit/thermometer/ |
數字輸入輸出(GPIO)
金手指 (edge connector) 上有許多 GPIO 。處理器上有許多的多任務訊號針腳(pin define),有些已經設定成GPIO 功能連接至金手指,如何進一步使用這些針腳請參閱 (nRF51 data sheet)
項目 |
說明 |
Rings |
3 large IO rings and two large power rings, 4mm plug and crocodile clip compatible |
GPIO features |
19 assignable GPIO pins |
2 are assigned to the on board I2C interface |
|
6 are used for display or light sensing feature |
|
2 are used for on board button detection |
|
1 is reserved for an accessibility interface |
|
19 may be assigned as digital input or digital output |
|
19 may be assigned for up to 3 simultaneous PWM channels |
|
19 may be assigned for 1 serial transmit and 1 serial receive channel |
|
6 may be assigned as analog input pins |
|
3 may be assigned to an optional SPI communications interface |
|
3 may be assigned for up to 3 simultaneous touch sensing inputs |
|
ADC resolution |
10 bit (0..1023) |
Edge Connector |
http://tech.microbit.org/hardware/edgeconnector_ds/ |
Pitch |
1.27mm, 80 way double sided. |
Pads |
5 pads, with 4mm holes |
More Info |
http://tech.microbit.org/hardware/edgeconnector/ |
電力供應
給microbit的電力,主要是由接口IC透過USB 提供,亦可由電池盒連接器提供,在金手指上亦有電力供應的功能,需要熟悉電路設計的人操作.
項目 |
說明 |
Operating range |
1.8V .. 3.6V |
USB current |
120mA max |
Onboard Peripherals budget |
30mA |
Battery connector |
JST X2B-PH-SM4-TB |
Battery current |
TBC |
Max current provided via edge connector |
90mA |
More Info |
http://tech.microbit.org/hardware/powersupply/ |
界面
這接口IC提供USB鏈接功能、拖拉式程序刷新(drag and drop flash program)及跟主計算機做序列通訊(serialcommunication) .
項目 |
說明 |
Model |
Freescale MKL26Z128VFM4 |
Core variant: |
ARM Cortex-M0+ |
Flash ROM |
32KB |
RAM |
4KB |
Speed |
16MHz |
Debug capabilities |
SWD |
More info |
http://tech.microbit.org/software/daplink-interface/ |
USB通訊
項目 |
說明 |
Connector |
USB micro, MOLEX_47346-0001 |
USB version |
1.1 Full Speed device |
Speed |
12Mbit/sec |
USB classes supported |
Mass Storage Class (MSC) |
Communications Device Class (CDC) |
機構
我們有提供2D 跟3D CAD 圖文件,這些資料可以用來提供3D printing 的生產制造的圖文件數據.
項目 |
說明 |
Dimensions |
5cm(w) 4cm(h) |
Weight |
5g |
原文鏈接
https://mp.weixin.qq.com/s?__biz=MzU0MTg0ODIzNA==&mid=2247483907&idx=3&sn=bef5bb1d947ac09c6355114c78abadef&chksm=fb22e5c6cc556cd090116d3e53dcea9d99b94d27e5fd1d960bfe50399d782ad685bbc2823093#rd