About the Micro:bit
The Micro:bit is an easily programmable 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 processor and manages communications via the USB interface, including the drag-and-drop code flashing process. The interface processor does not connect to any of the Micro:bit peripherals.
Hardware Guide
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 on-board 2.4GHz radio peripheral used to provide Bluetooth and custom radio capabilities via an off-chip aerial.
Bluetooth Wireless Communication
The on-board 2.4GHz antenna supports Bluetooth communications via the Nordic S113 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.
Buttons
The two buttons on the front of the Micro:bit, and the one button on the back, are tact momentary push-to-make buttons. The back button is connected to the 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 pull-up 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.
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 different 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.
Speaker
In addition to outputting 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
Feature | Description |
---|---|
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 | 1.27mm pitch, 80 way double sided |
Pads | 5 pads, with 4mm holes |
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.
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.