Powering the BBC micro:bit with a 5V power bank

I had an interesting question to a blog post I made about running a DC motor from a microbit. The blog post is here. I am pleased that anybody reads my blogs.

Doesn't applying 5V to the microbit board exceed the voltage spec?

When we connect the board to our laptops or PCs, we apply 5V to the board through the USB connector. Sometimes I run the board from a USB power bank. This supplies 5V to the microbit. The advantage of using the power bank over AAA batteries is that I can use the power bank to also run e.g. a DC motor. So far I have not cooked off a microbit doing this.

But I still only measure 3.2V on the pads on the board edge connector.

Why is this?

Let's look at the board circuit schematics. Please find a screengrab showing the USB connector on the left and the microcontroller on the microbit on the right.

BBC micro:bit schematic fragment, showing USB connector and the microcontroller.

Let's zoom in on the connector:

Schematic showing the USB connector.

The 5V input voltage on the USB connector is given the net label VBUS_IF. This label reappears next to the little number 5 - which means this is where the track connects to on the PCB. The zener diode to the left of the number 5 and the 10 Ohm resistor R31 to the right combine to protect the board in the case of reverse polarity - if somehow the voltage is applied to the USB connector backwards, the current flows to ground, not into the microcontroller.

The capacitor C31 and C33 are there to act as little charge stores for the microcontroller for when it needs a sudden 'oomph' of charge that the USB power supply cannot supply quickly enough. These are called decoupling capacitors.

The +5V signal is renamed VBUS_IF_2 to the right of R31. Lets look at where this goes into the microcontroller. I labelled the net VBUS_IF_2:

So our +5V USB voltage connects to the microcontroller on a dedicated pin VREGIN. This is the input to a regulator inside of the microcontroller. The output of this regulator is a DC voltage called +3.3V_IF. This output supplies the +3.3V seen elsewhere in the board and on the board edge connector pads.

Now, if the input to VREGIN is below 3.3V, we are not going to see 3.3V on the output pads. In fact, I see 3.2V with an input of 5V, so there is a 0.1V drop somewhere on the board.

So, in summary, we can apply 5V through the USB connector.

One last schematic fragment. This shows the battery connector and where this supply connects with the voltage generated by the internal regulator on the microcontroller:

Microbit schematic showing the battery connector and how it connects to the board voltage tracks.

The battery voltage goes through a low drop BAT60A schottky diode labelled D2. This then connects to V_TGT. This is the main voltage rail for powering most of the board components, such as the magnetometer and accelerometer. This is also the rail that connects to the board edge connector on the pad labelled '3V'.

Both the output from the microcontroller regulator, labelled 3.3V_IF and the voltage from the battery labelled VBAT connect to this rail through BAT60A schottky diodes. The diodes mean that the battery voltage and the regulator output voltages are isolated from each other, but either can produce V_TGT.

What if both a battery and a USB connector are connected? Whichever is the higher of VBAT or 3.3V_IF, minus a small voltage drop created by the BAT60A diode, will produce V_TGT. The voltage drop across the diode is around 0.1-0.2V according to the datasheet for the BAT60A.

It would be dangerous to the board to apply 5V to the battery connector. I am not about to try this. The battery connector bypasses the regulator in the microcontroller, so applying a high voltage to this connector applies the same high voltage to the components on the microbit board, minus a small drop across the BAT60A diode. Many of these are not rated to work at 5V.

The board is designed to take 5V only through the USB connector.

10 thoughts on “Powering the BBC micro:bit with a 5V power bank”

    1. The power bank may well be turning off as not enough current is being drawn from it, so the power bank thinks that nothing is connected. Try turning on some LEDs to increase the current draw.

  1. Been looking for info about 5v power. TY. It’s taken me a little while to realise that a rechargeable power bank is a very convenient way of powering the micro:bit for portable projects (I have a few power banks lying around).

    Also, regarding powering 5v accessories; I found there is a test point on the back of the Micro:bit called TP19 (right next to the 5v USB connector) https://tech.microbit.org/hardware/schematic/ which exposes the 5v VBUS line on USB Connector. Was planning to solder a little plug/wire to this Test Point to power 5V accessories. It seems sensible as there are so many 5V accessories out there. But I wonder if you have any opinion as to whether this is a good idea? (as I am a beginner at all this)

    1. Connecting to TP19 is effectively the same as connecting to the USB +5V pin, so is good to use. I checked the schematic. The pad is quite small, so you might want a drop of hot melt glue on top of your test wire to act as strain relief. One thing to watch out for on the micro:bit is powering it through the edge connector. There is no over-voltage protection if you do this and the regulator on the board can get quite hot if you apply too much voltage through the edge connector.

      1. I found this post looking for solutions to a problem we’re having in school. We use micro:bits plugged in to 4Tronix Robobit robots, which carry 4xAA batteries to power the motors and the micro:bit via the edge connector (presumably at ~3V although I’ve not measured it). The failure rate of the micro:bits is very high – typically pin 1 stops working, which means that one motor can’t be controlled. They still work fine for “standalone” projects but become useless for the robots. Do you have any idea what might be causing this? The only thing I can think of is that the pupils occasionally plug the micro:bits in upside down so the power supply goes to pins 1 and 0 instead of GND and 3V – is there anything on the board to protect against this? Thanks for any help you can offer 🙂

        1. There is no over-voltage protection on the edge connector. If the 4Tronix board is supplying too high a voltage to power the board, this is a potential cause of damage. This doesn’t explain why only pin 1 is affected though. Pins 0 and 1 connect directly to the nRF51822 IC with no external overvoltage protection. The maximum voltage rating for these pins is the supply voltage plus 0.3V. Motors are notorious for generating high voltage transients. I suspect that the motors on the board are creating a voltage spike into pad 1 and destroying an internal transistor on the chip connected to that channel.

          I just tried plugging a micro:bit v2 into an edge connector upside down and there was no loss of functionality to pads 0 and 1 – I’m using these pads as a serial interface to an Arduino. A sample size of one is not the most rigorous test though.

          1. Great info, thank you. Thinking about it a bit more I now wonder if it’s kids either pushing the robots or spinning the wheels by hand with them switched on, thus turning the motors into generators and bunging voltage spikes onto the motor pins on the microbit. I suspect that would be bad.

            Thanks again for your help!

          2. Transient voltage suppressing (TVS) diodes are used to protect against over-voltage spikes. I don’t know if it is feasible to add these to the robot though.

  2. This is very good information. I’m wondering if the TP19 +5 V could be used to drive a single servo motor. It’s a pretty beefy one that I want to use so I’m wondering what kind of current limitation might exist on TP19?
    Thanks again for you great post!

    1. There are a few potential bottlenecks:
      Can what you are connecting to the USB port supply the necessary current?
      Can the connector and the copper tracks to the test point carry the necessary current?
      According to this website: https://www.mclpcb.com/blog/pcb-trace-width-vs-current-table/ a 10 mil trace is good for 1A, a 30 mil trace is good for 2A. It looks like the trace from TP19 to the USB connector is around 30 mils.
      I looked at a couple of micro USB connectors on Farnell. The data sheets state a maximum of 1A per contact.
      So the weak link may well be the USB connector. As a rule of thumb, I wouldn’t want to stress any part to more than 50% of its rating, so I would estimate 500mA as being the most I would feel comfortable supplying through TP19 for any length of time.

Leave a Reply

Your email address will not be published.