0

$USD

$USD
NEWS micro:bit

micro:bit board: an introduction

DFRobot Oct 13 2017 1874

The objective of this post is to introduce the micro:bit board, a very easy to use ARM-based development board.

Introduction

The objective of this post is to introduce the micro:bit board, an ARM-based development board. This is a very easy to use board that already includes a lot of peripherals, which avoids the need for soldering or use of external hardware to get started with simple applications.

Furthermore, as we will see below, some of the programming environments available are also designed to facilitate beginners getting started with it.

In terms of dimensions, its a compact board with a size of 43×52 mm and a weight of 8 g [1]. You can check the board below at figure 1.


Figure 1 – micro:bit board. Taken from [1].
You can consult the community website of micro:bit for a lot of information about the board, including the hardware features and the software environments available for programming it. You can also access the micro:bit product website here.

The processors

The core of the micro:bit board is a nRF51 System on Chip from Nordic Semiconductor. This SoC has a 32 bits ARM Cortex-M0 core, which runs at 16 MHz [2]. You can read more about this ARM core here.

The nRF51 is used as the application processor, meaning that will be the one running the programs we will develop. In terms of memory, it has 16 KB of RAM and 256 KB of FLASH [2].

All the GPIOs accessible are provided by the nRF51 and the board has 19 of them available as assignable. From these, up to 3 can be assigned as PWM pins and 6 as analog inputs [2]. The ADC of the processor has a resolution of 10 bits [2].

These pins also have support for the I2C, SPI and Serial communication interfaces [1], which are the basic ones regarding to the interaction with other peripherals.

Additionally to the nRF51, the board has a Freescale MKL26Z128VFM4 microcontroller, which is responsible for handling the USB connection between the micro:bit board and a computer, and also for the flashing of new code. This device has a ARM Cortex-M0+ core, 128 KB of FLASH and 16 KB of RAM.

You can read more about the interaction between the application processor and this interface processor here. One of the interesting features that comes from this architecture is that the micro:bit board is detected as a USB disk when connected to our computer, and we simply need to drag and drop the binary file obtained from our code to this disk and it will be automatically flashed and run.

Peripherals

As mentioned, one of the characteristics of the micro:bit board is that it has already a lot of peripherals on board, making it easier for prototyping some simple applications without the need to solder or buying additional hardware.

Regarding environment sensing, the board has a Freescale MMA8653FC, a 3-axis accelerometer  with a resolution of 10 bits [2]. It also has an on board Freescale MAG3110 magnetometer, which allows to get magnetic field strength measurements [2]. Both of these devices are connected to the processor via I2C protocol [2].

Additionally, the nRF51 processor has an integrated temperature sensor that allows us to obtain measurements [2]. It has a resolution of, 0.25°C and an accuracy of +-4°C [2].

As user inputs, the board has 2 two buttons [2] that we can use for a simple interface. These buttons are located in the front of the board and in the back there is an additional button that allows to reset the system.

To complement the user interface, the micro:bit board also has a 5×5 LED matrix [2] which can be used as a simple display.

Communication

In terms of communication capabilities, the micro:bit board has a 2.4 GHz transceiver, which allows it to support Bluetooth low energy to establish communication with other devices [2]. You can read more about the supported micro:bit Bluetooth custom profile here.
 

Besides Bluetooth, the radio of the board also allows the use of the Nordic Gazell protocol, which is a proprietary protocol that allows communication between devices that support it [2]. This protocol operates on the 2.4 GHz, like Bluetooth.

Power supply

The micro:bit operates in a range of voltages between 1.8 V and 3.6 V [2]. It can be powered via USB connection or using its battery conector [2], allowing for the development of portable projects.

 

Programming environments

The micro:bit has many development environments available, some of them designed to make it easy for beginners to get started, as can be seen here.

A very good feature of this editor is that it offers us the possibility of simulating the code execution very easily. Basically, as can be seen in figure 2, a model of the micro:bit board is located at the left side of the code editing window and we can simply click a button to start testing it. This allows anyone curious about the platform to test it before buying the actual hardware.

In terms of higher level languages, we can use the online JavaScript Blocks Editor, which supports both the development using a drag and drop interface and coding in JavaScript. Besides that, we can alternate between these two modes since the JavaScript code is automatically mapped to the drag and drop interface and vice-versa.


Figure 2 – JavaScript Blocks Editor code simulation, with the simulated serial communication output highlighted.
As another JavaScript alternative, Espruino can also be used to program the micro:bit board, as can be seen here. Espruino is a JavaScript interpreter for microcontrollers [3].

Alternatively, also as an higher level language, we can use MicroPython. To do it, there’s also a online development environment available here. You can also read more about this development environment here. You can check at figure 3 below a screenshot of this development environment.

Figure 3 – Micro:bit MicroPython development environment.
Other option to program the board that is familiar to many developers is using the Arduino environment. You can check here the GitHub page of the project, which includes installation instructions.

Another supported platform is mbed, which has an online IDE for development in C/C++ [4]. Naturally, these are lower level languages, which may be a little bit harder for beginners.

Micro:bit also appears as one of the board supported in the PlatformIO environment, although there is not yet much information on how to get started with it.


NOTE: This article is written by Nuno Santos who is an kindly Electronics and Computers Engineer. live in Lisbon, Portugal. you could check the original article here.
He had written many useful tutorials and projects about ESP32, ESP8266, microbit, If you are interested, you could check his blog to know more.

Related Blog Post:
Microbit Tutorials

Micro:bit board: an introduction
5 Easy Steps for you to Quick Start with BBC Microbit
Micro:bit JavaScript Blocks Editor: Hello World
Micro:bit JavaScript Blocks Editor: Turning LEDs on and off
Micro:bit JavaScript Blocks Editor: Detecting button click events
Micro:bit JavaScript Blocks Editor: String interpolation
Micro:bit: MicroPython support


Microbit Projects
Mobile Doorbell System with BOSON and Micro:bit
How To Make A Micro:bit Heart Rate Monitor
Microbit Project micro:bit Laser Target
Micro:bit Surprise box
Microbit Project: Micro:bit Selfie Remote
Micro:bit Project: Light(Mood Lamp)
Micro:bit Project: Yes/No Bear
Smart Fan Control System with Micro:bit
LED writing board (micro:bit compatible)
micro:bit car with DFRobot gamepad
OBLOQ-IoT Module +Micro:bit IoT Flower Watering