BBC BBC MICROBIT2 C Instructions

Page 1
BBC micro:bit v2
Please see https://tech.microbit.org/ for latest updates!
"
About the BBC micro:bit v2 2
Hardware Description 3
Hardware block diagram 3 ..............................................................................................................................
nRF52 Application Processor 3 .......................................................................................................................
Bluetooth Wireless Communication 4 ...........................................................................................................
Low level radio communications 4 .................................................................................................................
Buttons 5 ............................................................................................................................................................
Display 5 ............................................................................................................................................................
Motion sensor 6 .................................................................................................................................................
Temperature sensing 6 .....................................................................................................................................
Speaker 7 ...........................................................................................................................................................
Microphone 7 ....................................................................................................................................................
General Purpose Input/Output Pins 7 ...........................................................................................................
Power supply 8 ..................................................................................................................................................
Interface 9 ..........................................................................................................................................................
USB communications 9 ....................................................................................................................................
Debugging 10 ...................................................................................................................................................
Mechanical 10...................................................................................................................................................
Page 2

About the BBC micro:bit v2

The micro:bit is Single Board Computer (SBC) that contains an application processor with a variety of on-chip peripherals. Other peripherals are connected to this chip.!
An interface processor is connected to the application processer and manages communication via the USB interface, including the drag-and-drop code flashing process. The interface processor does not control any of the peripherals on the board but is connected to the application processor on the internal board I2C bus.!
!
Page 3

Hardware Description

Hardware block diagram

nRF52 Application Processor

The nRF52 application processor is where user programs run. A single, complete application including user code, runtime code and Bluetooth stack is loaded and run directly from on chip flash memory. All user accessible GPIO pins are provided by this processor. There is an onboard 2.4GHz radio peripheral used to provide Bluetooth and custom radio capabilities via an o-chip aerial.!
item
details
Model
Nordic nRF52833
Core variant
Arm Cortex-M4 32 bit processor with FPU
Flash ROM
512KB
RAM
128KB
Speed
64MHz
Debug
SWD,$J-Link/OB
More Info
Software,$NRF52 datasheet
Page 4

Bluetooth Wireless Communication

The on board 2.4GHz transceiver supports Bluetooth communications via the$Nordic
S140 SoftDevice, which provides a fully qualified Bluetooth low energy stack. This allows
the micro:bit to communicate with a wide range of Bluetooth devices, including smartphones and tablets.!

Low level radio communications

The on board 2.4GHz transceiver supports a number of other radio communications standards, on which we build the microbit-radio protocol This protocol provides a very simple small-packet broadcast radio interface between other devices that support it, such as other micro:bit devices. The ‘radio’ interface that appears in a number of the languages on the micro:bit is built on top of this protocol. Additionally, the micro:bit runtime software adds a ‘group code’ to each data payload, allowing for simple user managed device addressing and filtering to take place.!
item
details
Stack
Bluetooth 5.1 with Bluetooth Low Energy(BLE)
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
-40dBm to 4dBm
Role
GAP Peripheral & GAP Central
Congestion avoidance
Adaptive Frequency Hopping
Profiles
BBC micro:bit profile
More Info
Bluetooth
item
details
Protocol
Micro:bit Radio
Freq band
2.4GHz
Channel rate
1Mbps or 2Mbps
Encryption
None
Channels
80 (0..80)
Group codes
255
Page 5

Buttons

The two buttons on the front of the micro:bit, and the 1 button on the back, are tact momentary push-to-make buttons. The back button is connected to the KL27 interface processor and to the NRF52 processor for system reset purposes. This means that the application will reset regardless of if it is powered from USB or from battery.!
Front buttons A and B can be programmed in the user application for any purpose. A and B are debounced by software, which also includes short press, long press, and ‘both A+B’ press detection. Buttons operate in a typical inverted electrical mode, where a pullup resistor ensures a logical ‘1’ when the button is released, and a logical ‘0’ when the button is pressed. Both A and B buttons are connected to GPIO pins that are also accessible on the micro:bit edge connector.!

Display

The display is a 5x5 array of LEDs. It is connected to the micro:bit as a 5x5 matrix. Runtime software repeatedly refreshes this matrix at a high speed, such that it is within the user persistence of vision range, and no flicker is detected. This LED matrix is also used to sense ambient light, by repeatedly switching some of the LED drive pins into inputs and sampling the voltage decay time, which is roughly proportional to ambient light levels.!
Tx power
Eight user configurable settings from 0(-30dbm) to 7 (+4dbm)
Payload size
32 (standard) 255 (if reconfigured)
More Info
Micro:bit Radio
item
details
item
details
Type
2 tactile user buttons, 1 tactile system button
Debounce
(A & B) software debounced, 54ms period
Pullup
(A & B) external 4K7, (System) 10K
item
details
Type
miniature surface mount red LED
Physical structure
5x5 matrix
Electrical structure
5x5
Intensity control
Software controlled up to 255 steps
Page 6

Motion sensor

The micro:bit has a combined accelerometer and magnetometer chip that provides 3-axis sensing and magnetic field strength sensing. It also includes some on board gesture detection (such as fall detection) in hardware, and additional gesture sensing (e.g. logo­up, logo-down, shake) via software algorithms. A software algorithm in the standard runtime uses the on-board accelerometer to turn readings into a board orientation independent compass reading. The compass must be calibrated before use, and the calibration process is automatically initiated by the runtime software. This device is connected to the application processor via the I2C bus.!
The micro:bit has a footprint for two dierent motion sensors: one made by ST (the LSM303AGR) and one by NXP (FXOS8700CQ). The micro:bit DAL supports both of these sensors, detecting them at runtime. Only one sensor will ever be placed.!

Temperature sensing

The NRF52 application processor has an on board core temperature sensor. This is exposed via the standard runtime software, and provides an estimate of ambient temperature.!
Sensing
ambient light estimation via software algorithm
Colour sensitivity
red centric, red is 700nm
item
details
item
details
Model
LSM303AGR
Features
3 magnetic field and 3 acceleration axis , 2/4/8/16g ranges
Resolution
8/10/12 bits
On board gestures
‘freefall’
Other gestures
Other gestures are implemented by software algorithms in the runtime.
item
details
Type
on-core NRF52
Sensing range
-40C .. 105C
Resolution
0.25C steps
Page 7

Speaker

In addition to outputing sound via PWM on the pins, the micro:bit has a PCB mounted magnetic speaker to which sound output is mirrored.!

Microphone

An on board MEMs microphone provides a sound input to the micro:bit and a built in LED indicator on the front of the board shows the user when this is powered.!
The microphone has an external bias circuit of 33K:1K (power to ground) and is AC­coupled to the microphone input pin.!

General Purpose Input/Output Pins

The edge connector brings out many of the GPIO circuits of the application processor. Some of these circuits are shared with other functions of the micro:bit, but many of these
Accuracy
+/-5C (uncalibrated)
More Info
DAL Thermometer
item
details
item
details
Type
JIANGSU HUANENG MLT-8530
SPL
80dB @ 5V, 10cm
Self-resonant frequency
2700Hz
More Info
Datasheet
item
details
Type
Knowles SPU0410LR5H-QB-7 MEMS
Sensitvity
-38dB ±3dB @ 94dB SPL
SNR
63dB
AOP
118db SPL
Frequency range
100Hz ~ 80kHz
Polar pattern
Omnidirectional
More Info
Datsheet
Page 8
extra circuits can be re-allocated to general purpose use if some software features are turned o.!

Power supply

Power to the micro:bit may be provided via 5V on the USB connector, or via a 3V battery plugged into the JST connector. It is also possible (with care) to power the micro:bit from the 3V /GND rings on the edge connector. The 3V /GND rings at the bottom can be used to supply power to external circuits. The board uses an LDO specified up to 300mA, with thermal cut-out for short circuit protection. !
item
details
Rings
3 large IO rings and two large power rings, 4mm plug and crocodile clip compatible
GPIO features
19 assignable GPIO pins
$
2 are dedicated to the external 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
Edge connector
Pitch
1.27mm, 80 way double sided.
Pads
5 pads, with 4mm holes
item
details
Operating range
1.8V .. 3.6V
Operating current (USB and battery)
300mA max
Page 9

Interface

The interface chip handles the USB connection, and is used for flashing new code to the micro:bit, sending and receiving serial data back and forth to your main computer.!

USB communications

The micro:bit has an on board USB communications stack, that is built into the firmware of the interface chip. This stack provides the ability to drag and drop files onto the MICROBIT drive in order to load code into the application processor. It also allows serial data to be streamed to and from the micro:bit application processor over USB to an external host computer, and supports the CMSIS-DAP protocol for host debugging of application programs.!
Onboard Peripherals budget
90mA
Battery connector
JST X2B-PH-SM4-TB
Max current provided via edge connector
190mA More Info
Power supply
item
details
item
details
Model
MKL27Z256VFM4
Core variant:
Arm Cortex-M0+
Flash ROM
256KB (128kB reserved for future use as storage)
RAM
16KB
Speed
48MHz
Debug capabilities
SWD
More Info
DAPLink,$KL27 reference manual$KL27 data sheet
item
details
Connector
USB micro, MCR-B-S-RA-SMT-CS5-TR
USB version
2.0 Full Speed device
Speed
12Mbit/sec
USB classes supported
Mass Storage Class (MSC)
Page 10

Debugging

The interface processor can be used with special host tools to debug code that is running on the application processor. It connects to the application processor via 4 signal wires. The KL27 interface processor code can also be debuged via it’s integral SWD software debug interface, for example to load initial bootloader code into this processor at manufacturing time, or to recover a lost bootloader.!

Mechanical

We have some$nice 2D and 3D CAD drawings and models of the micro:bit$including all the important dimensions. These models can be used as a basis for generating really nice marketing and project images of the micro:bit, but also as a basis for accurate manufacture of attachments e.g. via 3D printing.!
$
Communications Device Class (CDC)
More Info
DAPLink
item
details
item
details
Protocol
CMSIS-DAP
Options
JLink/OB (via dierent firmware)
More Info
Mbed debugging micro:bit
item
details
Dimensions
51.60mm(w) 42.00mm(h) 11.65mm(d), button depth to board
4.55mm, speaker depth to board 3.00mm, JST connector to board 5.50mm
Weight
TBC
Loading...