Powering the BBC micro:bit with a 5V power bank
Last updated: Jan 11, 2023
Summary
Powering the micro:bit v1 through the battery connector with +5V risks destroying components on the board as there is no voltage regulator in-between this connector and other components on the board.
Powering the micro:bit v2 through the battery connector with +5V is safe by design as there is a regulator in-between this power connection and the rest of the board.
micro:bit v1
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.
Let’s zoom in on the 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:
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.
micro:bit v2
The micro:bit v2 has a different architecture from the micro:bit v1. If we look at a schematic fragment for the battery connector, where I outlined the signal VCOMBINED below:
The voltage rail from the battery connector connects with VCOMBINED via two diodes. Why are there two diodes? So that a single component failure does not directly connect the battery rail to the regulator.
If we follow the schematic to the regulator section, we see that VCOMBINED is the input to the regulator. The output from the regulator is called VREG. This is the what powers the microcontroller and other components on the board. This means that the voltage to the microcontroller is limited by the regulator. Obviously, this component has a rating for the maximum input voltage that is safe to apply to it.
The +5V from the USB connector also joins with the VCOMBINED trace, via a diode:
Looking at the data sheet for the NCP114BMX330TCG regulator, which is the regulator on the schematic, the maximum operating input voltage is 5.5V. As USB is 5V, powering the micro:bit v2 through the battery connector from a power bank at 5V is safe.
Afterword
Thanks to Pierre Boucot for an interesting email dated 10th January 2023, pointing out that the v2 of the micro:bit is safe to power from a USB power bank. This prompted me to add information about the micro:bit v2 to the post.
Any comments, please email me at matt@(this website’s url)