Mega:Bit

Mega:Bit


The Mega:Bit

We’ve been experimenting and doing projects with the BBC micro:bit for quite a while now. We’ve also been following some of the work that other people have been doing with the micro:bit. One of the projects that really impressed us was the work that Andrew Gale and David Whale have been doing with their Mega:Bit.

What is a Mega:Bit?

The Mega:Bit is basically a scaled up micro:bit, and has the 5 x 5 LED matrix and buttons, just like the normal micro:bit. To make it behave like a micro:bit, it is necessary to connect it to a real micro:bit; which is where things get a little tricky. Although control of the micro:bit’s buttons is quite simple, emulating the LEDs is somewhat more complicated. This is because only some of the LED signal information is available from the micro:bit’s pin connections.

Also, while much of the information relating to the LED signals is available on the internet, some of it is not so easy to find. Thankfully, Andrew and David were extremely helpful in providing us with much of the information we needed. Also, Andrew very kindly sent us one of his own Mega:Bits, giving us the chance to examine it in detail.

Mega:Bit

LED Signals

For LED signal information that cannot be obtained directly from the pins, the signals must be obtained from the actual LED contacts. This means having to solder fine wires directly onto the solder points of the LEDs on the micro:bit. This is clearly quite a daunting prospect.

micro:bit Solder Points

Initially being a little nervous about the thought of soldering directly onto the LED matrix, I considered another possibility. Although LED signals could be obtained from the electronic signals, they could also be obtained optically. This is also something that Andrew has worked on in his own Mega:Bit project. The theory behind this involves having 25 LEDs, each controlled individually by a single phototransistor. By having these phototransistors mounted immediately over the LEDs on the micro:bit, these LEDs can effectively emulate those on the micro:bit.

The Optical Mega:Bit

To test out this theory, I set up a simple circuit consisting of a single LED and phototransistor. In order for the phototransistor to switch the LED, I also needed a single NPN transistor and 560Ω resistor. The circuit diagram for this is shown below.

Prototype

Phototransistor Circuit

Having shown this to work successfully, I needed a way of mounting the phototransistors over the LEDs on the micro:bit. For this, I designed a small 3D printable mounting plate that would fit over the micro:bit. This plate has holes for the 2 switches, and also recesses for the micro:bit LEDs and holes for the 25 phototransistors.

3D Printable Mounting Plate

3D Printable Mounting Plate - Reverse Side

The 3D print file for this mounting plate is available on Thingiverse.

So, having proved that the concept should work, the next step was to build up the full circuit. The list of components required for this is as follows:-

The images below show our optical Mega:Bit board at various stages of the build.

Optical Mega:Bit Board - 1

Optical Mega:Bit Board - 2

Optical Mega:Bit Board - 3

Optical Mega:Bit Board - 4

Optical Mega:Bit Board

Our next challenge is to work out how to fit the mounting plate over the top of the phototransistors. Any suggestions will be gratefully received.

The Mega:Bit

To build the Mega:Bit, the following components are required:-

The image below shows the completed Mega:Bit board without the LEDs or the hex non-inverting buffer chips inserted.

Mega:Bit Board

And the final working Mega:Bit circuit without the 2 switches connected looks like this.

Mega:Bit

micro:bit Soldering

Wiring For the Mega:Bit

The LEDs on the micro:bit are controlled using multiplexed signals based on rows and columns. However, the row and column arrangement for the control signals does not match the rows and columns of the physical LEDs on the micro:bit board. The multiplex signals are arranged as 3 rows and 9 columns. Rows 1 and 3 control 9 LEDs each, and row 2 controls 7 LEDs; as shown in the simplified circuit diagram below.

LED Rows and Columns

The diagram below shows how the multiplex rows and columns relate to the physical LED matrix on the board.

Rows and Columns

Some of the signal information for the rows and columns come from the GPIO connectors on the micro:bit. The signals that are derived from GPIO connectors are:-

  • Column 1 = Pin 3
  • Column 2 = Pin 4
  • Column 3 = Pin 10
  • Column 7 = Pin 9
  • Column 8 = Pin 7
  • Column 9 = Pin 6

The other signals (Rows 1 to 3, and Columns 4 to 6) can only be derived by soldering wires directly to the LED solder points on the micro:bit LED matrix. The diagram above showing the rows and columns of the LED matrix indicates the possible solder points that could potentially be used. The ones we have used are as shown in the diagram and image below.

LED Solder Points

micro:bit Solder Points

Using this information, the circuit for columns 1 and 2 is as shown in the following circuit diagram:-

LED Rows and Columns Circuit

Columns 3 to 7 are connected in the same way as columns 1 and 2. However, as we have already seen, columns 8 and 9 only require to be connected to rows 1 and 3.

Choice of LEDs

Having a warehouse of LEDs at our disposal, we did have the opportunity to try out a few different LED types. However, for our final version of the Mega:Bit, we took some advice from Andrew Gale who suggested that we try some 900mCd 10mm LEDs from Kitronik. These did seem to work best with the circuit that we have used.

However, we will be working on a mark 2 version, which will give us the chance to maybe try out some different resistor values. So, watch this space.

Update – Mega:Bit Version 2

Based on our experience with building the first Mega:Bit, we embarked on building a version 2 Mega:Bit. For this version, rather than using the SIL header sockets for the LEDs, we left gaps for the LEDs to be soldered. Also, we used lower value resistors at the outputs of the inverters; swapping the original 100Ω resistors to 75Ω resistors.

The picture below shows the fully wired up Mega:Bit circuit board before the LEDs were inserted.

Mega:Bit Version 2

For this version, we also designed some 3D printable mounting posts to allow the front face of the Mega:Bit to be mounted onto the circuit board. These mounting posts were fixed to the circuit board and to the front face of the Mega:Bit using a hot glue gun.

Once the front face had been mounted, the LEDs had to be pushed through the front face and into the holes on the circuit board. To help guide the pins into the correct holes on the circuit board, I 3D printed a small tool to help guide the pins into place.

3D Printed LED Pin Guide Tool

Once the LEDs had been passed through the holes of the circuit board, they could be soldered on to the circuit board. Having done this, the wires from the micro:bit and those from the push buttons could finally be connected.