Skip to main content

Edge connector and pinout

Overview​

The edge connector on the micro:bit is used to connect to external circuits and components.

There are 25 strips/pins including 5 rings for using with 4mm banana plugs or crocodile clips. 3 of these rings are for general purpose input and output (GPIO) and are also capable of analog, PWM and touch sensing, and two are connected to the micro:bit power supply.

The smaller strips spaced at 1.27mm on the edge connector have additional signals, some of which are used by the micro:bit, and others that are free for you to use. There are a number of external PCB connectors for purchase with an 80w 1.27mm pitch that can be used to easily access these extra pins.

Only the pins on the front are connected to signals. The back rings are connected to the front rings, but the back small strips are unconnected.

Edge connector pins​

The diagrams below show the assignation of the micro:bit pins. On the V2 board revision Pin 9 is no longer jointly shared with the LED display, but Pin 8 and Pin 9 can be configured for NFC (though this is disabled by default).

V2V1
edge connector V2edge connector v1

microbit.pinout.xyz​

microbit.pinout.xyz is a fantastic resource for further information on the micro:bit pins and how they are used by some popular accessories

Pins and signals​

This table shows various data about each of the pins on the micro:bit edge connector.

m:b ringmodschemMCUs/wfunctionsdirpull?
21COLR3P0.31/AIN7P3(GPIO), (ANALOG), LEDCOL(3), (PWM), (UART)O--
RING0P0}
RING0P0}
018RING0P0.02/AIN0P0} GPIO, ANALOG, TOUCH, PWM, UARTIe10Mu, i12Kd
RING0P0}
22COLR1P0.28/AIN4P4(GPIO), (ANALOG), LEDCOL(1), (PWM), (UART)O--
37BTN_AP0.14P5(GPIO), BUTTON(A), (PWM), (UART)Ie10Ku, i12Kd?
30COLR4P1.05P6(GPIO), LEDCOL(4), (PWM), (UART)O--
29COLR2P0.11/TRACEDATA2P7(GPIO), LEDCOL(2), (PWM), (UART)O--
RING1P1}
RING1P1}
119RING1P0.03/AIN1P1} GPIO, ANALOG, TOUCH, PWM, UARTIe10Mu, i12Kd
RING1P1}
38GPIO1P0.10/NFC2P8GPIO, PWM, UART (NFC2)Ii12Kd
28GPIO2P0.09/NFC1P9(GPIO), (PWM), (UART), (NFC1)O--
23COL5RP0.30/AIN6P10(GPIO), LEDCOL(5), (ANALOG), (PWM), (UART)O--
9BTN_BP0.23P11(GPIO), BUTTON(B), (PWM), (UART)Ie10Ku, i12Kd?
40GPIO4P0.12/TRACEDATA1P12(GPIO),ACCESSIBILITY, (PWM), (UART)Ii12Kd
RING2P2}
RING2P2}
220RING2P0.04/AIN2P2} GPIO, ANALOG, TOUCH, PWM, UARTIe10Mu, i12Kd
RING2P2}
6SCK EXTERNALP0.17P13GPIO, SPI(SCLK), PWM, UARTIi12Kd
5MISO EXTERNALP0.01/XL2P14GPIO, SPI(MISO), PWM, UARTIi12Kd
4MOSI EXTERNALP0.13P15GPIO, SPI(MOSI), PWM, UARTIi12Kd
34GPIO3P1.02P16GPIO, PWM, UARTIi12Kd
+V_TGTPSU(V_TGT)--
+V_TGT}--
+V_TGT}--
3V+V_TGT} PSU(V_TGT)--
+V_TGT}--
+V_TGTPSU(V_TGT)--
17I2C EXT SCLP0.26P19(GPIO), I2C(SCL), (PWM), (UART)Oe4k7u
16I2C EXT SDAP1.00/TRACEDATA0P20(GPIO), I2C(SDA), (PWM), (UART)Ie4k7u
GNDPSU(GND)--
GND}--
GND}--
GNDGND} PSU(GND)--
GND}--
GNDPSU(GND)--
columnpurpose
m:b ringthe micro:bit basic interface (the 5 rings on the front)
modthe pin number on the module:bit
schemthe symbol name in the micro:bit schematics
MCUthe actual pin name of the Nordic MCU chip
s/wthe name that is used in the DAL runtime software
functionsall possible functions, BOLD for default. brackets indicate use with caution
dirthe startup conditions (direction) when the micro:bit boots: Input or Output
pull?pull resistors: i12Kd = processor internal 12Kohm configurable pull-up/down/none; e10Mu = external 10Mohm fixed pull-up.

Notes​

  1. RINGs for 0, 1, 2, 3V and GND are also connected to the respective reverse side rings on the edge connector.

  2. The 3V and GND rings have guard strips either side of the big rings, to avoid any degradation of device performance due to slipping crocodile clip connections. Care should be taken on rings 0, 1 and 2 to avoid shorting crocodile clips against adjacent pins, which could cause some slight interference with the pattern currently displayed on the LED matrix, or introduce some inaccuracies in the light sensing readings.

  3. The DAL DynamicPWM driver (and the underlying Nordic timer peripherals) dictate that PWM can only be active on 3 pins simultaneously. Any attempt to allocate a 4th pin for PWM use, will disable one of the existing PWM pins.

  4. A digital input pin's internal pull resistor is configured by default to pull-down by the DAL/CODAL.

  5. Functions in brackets should be used with caution, as other features of the device may become unstable, degraded or non operational, if their normal use is not disabled in the software first.

  6. The source file for the pinout table is held in CSV format. You can load this into a spreadsheet and sort and filter it in any way that makes sense to you. There is also a zipped Python script in this folder that you can download to re-generate the markdown table version of the pin map used on this page, from the .csv file.

  7. The pin marked 'ACCESSIBILITY' is used to enable/disable an on-board accessibility mode, and should not be used for anything else (even though it can be used as a GPIO for testing). Future versions of the official micro:bit editors may remove the ability to write to this pin.

Uncoupling default functionality​

Pins that are marked with brackets around functions, require the default functionality for that pin to be disabled, before other functions can be used.

pins: P3, P4, P6, P7, P9, P10​

These pins are coupled to the LED matrix display, and also its associated ambient light sensing mode. To disable the display driver feature (which will automatically disable the light sensing feature) call the DAL function display.disable(). To turn the display driver back on again later, call the DAL function display.enable().

Note also that the LED 3x9 matrix connects LEDs with associated resistors across these pins, so you should take that into account when designing circuits to use these pins for other purposes.

pins: P5, P11​

These pins are assigned to the two on-board buttons. In their default setup with all the standard high level languages, there is a global uBit instance containing: uBit.buttonA, uBit.buttonB and uBit.buttonAB.

Buttons are hooked into the system timer in their constructor for regular debouncing. However, if you want to completely remove this feature and use the physical pins for other purposes, you can delete uBit.buttonA, it will call the C++ destructor and de-register the button instance from the system timer, effectively disabling all DAL activity with that pin. It is then possible to use a MicroBitPin instance around the physical pin name to control it directly without interference from the DAL.

Be aware though, that there are 10K external pull-up resistors fitted to the micro:bit board.

pins: P19, P20​

These pins are allocated to the I2C bus, which is used by both the on-board motion sensor. It is strongly suggested that you avoid using these pins for any function other than I2C.

It is possible to disable the DAL services that use these pins as the I2C bus, but the motion sensor device will still be connected to the bus, and may try to interpret the signals as data payloads, which could create some undesirable side effects on the SDA and interrupt pins. There are 4K7 pull-ups fitted to both pins on the board, so the best use for these two signals is to add other I2C devices.

The main reason you might choose to use these pins for other purposes would be if you were designing your own micro:bit variant without any I2C devices, and then it would free up two more pins for other purposes.

Power supply capabilities​

There is a dedicated page on power supply capabilities and parameters, which better defines how you can use the GND and 3V rings

GPIO capabilities​

NRF51​

These key GPIO parameters are transcribed directly from Section 6, 7 and 8 of the nRF51822 Datasheet, and provided here as a handy reference.

KEYDescriptionsectionMinMax
VOLVoltage Output Low8.23VSS0.3V
VOHVoltage Output High8.23VDD-0.3VDD
VILInput voltage for logic low8.23VSS0.3*VDD
VIHInput voltage for logic high8.230.7*VDDVDD
xxxMax source current from IO pin8.23--5mA
xxxMax sink current into IO pin8.23--5mA
VIOTolerable pin voltages for IO pin6-0.3VVDD+0.3
xxxPin impedance when an input?TBC
VDD(o)Operating voltage range (LDO)91.8V3.6V
VDD(a)Absolute voltage range9-0.3V+3.9V
VSSGround reference60V0V
RPUPull up resistance8.2311K16K
RPDPull down resistance8.2311K16K

NOTE 1: The maximum number of pins configured as high-drive (5mA) at any one time is 3 pins.

NOTE 2: A common way that the maximum pin voltages can be exceeded, is to attach an inductive load such as a speaker, motor, or piezo sounder directly to the pin. These devices often have significant back-EMF when energised, and will generate voltages that exceed the maximum specifications of the GPIO pins, and may cause premature device failure.

NOTE 3: The pin marked 'ACCESSIBILITY' is used to enable/disable an on-board accessibility mode, and should not be used for anything else (even though it can be used as a GPIO for testing). Future versions of the official micro:bit editors may remove the ability to write to this pin.

NOTE 4: The BBC suggest in the safety guide, that the maximum current you can draw from the whole edge connector at any one time is V190mA. This is set based on the 30mA budget for on-board peripherals, and the fact that the on-board regulator of the KL26 when powered from USB is rated at a maximum of 120mA. On the latest board revision the maximum current is V2270mA, though it is possible that the on-board mic and speaker can draw more current, so this value is TBC.

nRF52​

These key GPIO parameters are transcribed directly from Section 6, 7 and 8 of the nRF52833 Datasheet, and provided here as a handy reference.

KEYDescriptionsectionMinMax
VOL,SDVoltage Output Low, standard drive, 0.5 mA, VDD ≥ 1.76.8.3VSSVSS +0.4
VOL,HDHVoltage Output Low, high drive, 5 mA, VDD ≥ 2.76.8.3VSSVSS +0.4
VOL,HDLVoltage Output Low, high drive, 3mA, VDD ≥ 1.76.8.3VSSVSS +0.4
VOH,SDVoltage Output High, standard drive,0.5 mA, VDD ≥ 1.76.8.3VDD -0.4VDD
VOL,HDHVoltage Output High, high drive, 5 mA, VDD ≥ 2.76.8.3VDD -0.4VDD
VOL,HDLVoltage Output High, high drive, 3mA, VDD ≥ 1.76.8.3VDD -0.4VDD
VILInput voltage for logic low6.8.3VSS0.3 * VDD
VIHInput voltage for logic high6.8.30.7 * VDDVDD
IOL,SDCurrent at VSS+0.4V, output low, standard drive, VDD ≥ 1.76.8.31mA4mA
IOL,HDHCurrent at VSS+0.4V, output low, high drive, VDD ≥ 2.76.8.36mA15mA
IOL,HDLCurrent at VSS+0.4V, output low, high drive, VDD ≥ 1.76.8.33mA---
IOH,SDCurrent at VDD-0.4V, output high, standard drive, VDD ≥ 1.76.8.31mA4mA
IOH,HDLCurrent at VDD-0.4V, output set high, high drive, VDD ≥ 2.76.8.36mA14mA
IOH,HDHCurrent at VDD-0.4V, output set high, high drive, VDD ≥ 1.76.8.33mA---
VIO≤3.6Tolerable pin voltages for IO pin with VDD ≤3.69-0.3VVDD+0.3
VIO>3.6Tolerable pin voltages for IO pin with VDD >3.69-0.3V3.9
VDDOperating voltage range (LDO)7-0.3V3.9V
VDDHAbsolute voltage range6-0.3V5.8V
VSSGround reference90V0V
RPUPull up resistance6.8.311K16K
RPDPull down resistance6.8.311K16K

Connectors and breakouts​

There are a number of suppliers of edge connector for the BBC micro:bit, in various forms, such as a right angle through-hole, a stand-up through-hole and a stand-up surface mount.

There is an 80 way * 1.27mm pitch double sided PCB connector, which you can buy from a number of sources.

At a pinch, it is also possible to use an old PCI edge connector from a PC motherboard, as the pitch is the same (but it is slightly wider).

There are also some nice ideas that have surfaced in the community such as using just the right size of countersunk or cheese-head bolt, or even 3D printed inserts.

Can you help to find or design a better connection solution to the micro:bit edge connector? Share your designs and discoveries with us!

Edge connectors for the BBC micro:bit​

Add your connector to our list
SupplierProduct
4UCon4UCon connector
Cyclonn/Dongguan Yuliangmicro:bit connectors, also see Alibaba store

Further information​