Learn the basics

5 V parts with a Micro:bit

The Micro:bit works with 3.3 V, many sensors and servos with 5 V. Give them their own 5 V, share GND, and put a divider where 5 V comes back into a pin.

The USB power board: a small green board with a USB socket and five pins

5 V parts with a Micro:bit

The Micro:bit works with 3.3 V. Many sensors and servos want 5 V. The USB power board gives them their own 5 V on the breadboard.

Share GND. Never 5 V on the Micro:bit's 3V pin. 5 V back into a pin goes through a divider.

The Micro:bit gives and takes 3.3 V. The ultrasonic sensor and the servo want 5 V.

The Micro:bit keeps its USB cable. The USB power board brings 5 V for the servo and the sensor.

Join the GNDs, or the signal has no way back. Then the servo moves.

A 5 V part hears about 2.5 V and more as on. A Micro:bit pin's 3.3 V is enough.

Echo answers with 5 V. Straight into a pin that is too much: put a divider in between.

1 kΩ above, 2 kΩ below: the middle gets two thirds of 5 V, about 3.3 V.

The 3.3 V regulator makes 3.3 V from the 5 V. It feeds the Micro:bit's 3V pin.

With a diode, the regulator and the USB cable never push into each other.

A laptop port gives about 500 mA. A moving servo can take more: then use a power bank.

More: the rules in one place
  • Power: the Micro:bit on its USB cable or battery pack; 5 V parts on the USB power board (VCC to the + rail, GND to the − rail).
  • GND: the Micro:bit's GND to the − rail too. Without a shared GND no signal arrives.
  • Micro:bit to a 5 V part: straight from the pin (Trig, a servo signal, an LED strip's data on most strips).
  • A 5 V part to the Micro:bit: through a divider, 1 kΩ from the part and 2 kΩ to GND, the middle to the pin.
  • Every HC-SR04, both kinds: VCC on 5 V and Echo through the divider. Then you never need to know which kind you have.
  • Several signals: a level converter does the same job as the divider, for four wires at once.
  • Without the laptop: regulator IN on 5 V, OUT through a diode (1N5817, stripe at the Micro:bit) to the 3V pin. No diode: then never the Micro:bit's USB cable or battery at the same time.

Used in: Parking gate and Parking assist (Micro:bit).