← Glossary
Scientific experiments and activities with a Micro:bit or Microbit

Micro:bit

The micro:bit is a programmable microcontroller board designed by the BBC, rich in built-in sensors (accelerometer, magnetometer, light, temperature) and fitted with a matrix of 25 LEDs. Intended for learning programming, it transmits its measurements to the smartphone via Bluetooth in FizziQ.

Discover FizziQ

How to measure it in class

FizziQ records in the experiment notebook the data transmitted by a micro:bit. The board brings its own sensors, which makes it possible to directly compare two instruments measuring the same quantity.

Steps:

  • Program the micro:bit from the online MakeCode editor, in blocks or in Python, to read one of its built-in sensors (accelerometer, magnetometer, light, temperature).
  • Send the values to the smartphone over the board’s Bluetooth link, at an interval set in the program.
  • Check that data is being received in FizziQ before starting the measurement, by shaking the board to see the curve react.
  • Record a series of measurements, then plot it and export it from the experiment notebook.
  • Place the micro:bit and the smartphone side by side and compare their two accelerometers on the same experiment: the observed difference opens a discussion on calibration and resolution.

The tutorial for connecting the micro:bit to FizziQ is available here

Learn more

A board born from a BBC educational program

The micro:bit was born from a BBC program intended to revive computer science education in the United Kingdom, designed with some thirty industrial and educational partners. About one million boards were given to British students aged 11-12 at the launch, in 2015-2016. The board is now developed by a nonprofit organization, the Micro:bit Educational Foundation, which continues its distribution in many countries with the goal of providing an affordable way to learn programming and electronics.

A board that already carries its own sensors

This is what distinguishes the micro:bit from an Arduino Uno or an ESP32: it measures without anything being plugged into it. It carries a three-axis accelerometer, a three-axis magnetometer, a light sensor, a temperature sensor, two buttons and a matrix of 25 LEDs that serves as a display. A complete experiment can therefore be carried out with the board alone, whereas a bare Arduino measures nothing at all.

The LED matrix, both display and sensor

The 25 LEDs on the front face normally serve to display a digit or a pattern. They also serve as a light sensor: a reverse-biased LED produces a current proportional to the illuminance it receives. The micro:bit alternates very quickly between the two functions. The practical consequence is that this sensor is not calibrated in lux: it returns a relative value from 0 to 255, useful for comparing two situations, not for giving an absolute illuminance.

The temperature sensor measures the chip, not the air

A frequent error: the temperature read by the micro:bit is that of the processor, not that of the ambient air. At rest, the difference is small, of the order of one to a few degrees. But as soon as the board computes, transmits over Bluetooth or lights its LEDs, the chip heats up and the reading drifts upward. For a serious measurement of air temperature, an external sensor must be connected.

Resolution of the analog-to-digital converter

The analog inputs of the micro:bit are digitized on 10 bits, that is 1024 levels, over the 0 to 3.3 V range. The quantization step is therefore about 3.2 mV: it is the smallest voltage variation the board can distinguish, whatever the fineness of the connected sensor.

Orders of magnitude

Dimensions: about 4 cm x 5 cm, mass under 10 g. Measuring range of the accelerometer: adjustable from ±1 g to ±8 g, that is up to about 80 m/s². Quantization step of the analog input: 3.2 mV over 0-3.3 V. Light sensor: relative value from 0 to 255, not calibrated. Power supply: 3 V from two AAA batteries, or 5 V via USB.

Formula

The micro:bit is not associated with any physical law of its own. The useful relations are those of digitization.

Quantization step of the analog input:

q = U_ref / 2^n

where:

  • q: smallest distinguishable voltage variation (V)
  • U_ref: full-scale voltage, 3.3 V on a micro:bit (V)
  • n: resolution of the converter, 10 bits

Numerical application: q = 3.3 / 1024 ≈ 3.2 × 10⁻³ V, that is about 3.2 mV.

Conversion of the raw value into a voltage:

U = N × U_ref / (2^n − 1)

where:

  • U: voltage present on the analog input (V)
  • N: integer value read, between 0 and 1023

Magnitude of the acceleration measured by the three-axis accelerometer:

a = √(a_x² + a_y² + a_z²)

where:

  • a: magnitude of the measured absolute acceleration (m/s²)
  • a_x, a_y, a_z: components along the three axes of the board (m/s²)

At rest on a table, this magnitude equals g, that is about 9.81 m/s².

Application examples

  • Lay the micro:bit flat and read its accelerometer: the magnitude of the three components is about 9.81 m/s², as for a smartphone, which illustrates that the sensor measures absolute acceleration.

  • Attach the board to a pendulum and record the acceleration to find the period of the oscillations, the board being much lighter than a phone and therefore disturbing the motion less.

  • Use the magnetometer to locate north or to detect the approach of a magnet, and plot the decrease of the field with distance.

  • Measure relative illuminance with the LED matrix by bringing a lamp closer then moving it away, to check qualitatively the 1/d² decrease.

  • Attach the micro:bit to a launched projectile without fear of breaking it, something one does not dare to do with a smartphone.

  • Compare, on the same fall, the data from the micro:bit’s accelerometer and from the smartphone’s, and discuss the origin of the differences.

FAQ

Q: Is the micro:bit more accurate than a smartphone? A: No, rather less. Its sensors are of the same MEMS type as those of a phone but often less well calibrated. Its value lies elsewhere: it is small, light, sturdy and inexpensive, so it can be thrown, attached or left outside.

Q: Why is the displayed temperature higher than that of the room? A: Because the sensor is integrated into the processor and measures the temperature of the chip. Computing activity, the LED display and Bluetooth transmission heat the board and raise the reading by a few degrees.

Q: Does the light sensor give an illuminance in lux? A: No. It returns a unitless number between 0 and 255, not calibrated. It allows comparing two lighting situations, not giving an absolute value.

Q: Do you need to know how to program to use it? A: The MakeCode editor works with blocks, like Scratch: reading a sensor and sending its value takes three or four blocks. Python is available to go further, but is not necessary for a first experiment.

Q: What is the difference with an Arduino or an ESP32? A: The micro:bit is the only one of the three to carry sensors and a display directly on board. The Arduino Uno is the simplest and best documented but has no sensor; the ESP32 brings Wi-Fi and a 12-bit converter, but it too has no usable sensor.

Arduino - ESP32 - Accelerometer - Magnetometer - Resolution - Calibration

Explore FizziQ

Discover all the science experiments you can do with your smartphone.