# Monk Makes Servo for micro:bit

**Type:** Product page · **SKU:** CE06257 · **Brand:** [Monk Makes](https://core-electronics.com.au/brands/monk-makes-australia)
**Page:** https://core-electronics.com.au/monk-makes-servo-for-micro-bit.html ([markdown](https://core-electronics.com.au/monk-makes-servo-for-micro-bit.html.md))

The MonkMakes Servo for micro:bit board provides a really easy way to attach up to three servomotors to a BBC micro:bit.

## Pricing

- **Price:** $14.95 (inc GST) — $13.59 AUD, exc GST
- **Quantity discounts:** 10+ $13.05 (exc GST) · 25+ $12.64 (exc GST)

## Availability & dispatch

- In stock, ships same business day if ordered before 2PM (Australia/Sydney).
- We can dispatch 39 today; more stock is typically available with a 7–14 day lead time.

## Description

The MonkMakes Servo for micro:bit board provides a really easy way to attach up to three servomotors to a BBC micro:bit. The board requires a power supply or battery pack to provide 5 or 6V to the servomotors. It includes a voltage regulator that will supply 3V back to the micro:bit, so that you don’t have to power it separately.

If you have one of our Servo Kit for micro:bit products, then you will find more information about that here. This is where you will also finds a getting started guide for this board.

### Features

- Header pins for three servo motors
- Up to 2A total can be supplied to the servo motors
- Regulated 3V output to power your micro:bit
- Polarity protection for the servomotors
- Electrolytic reservoir capacitor for the servomotors
- 1kΩ series resistors to the control signals to prevent accidental sort-circuits of the micro:bit’s output pins.
- Orange LED to indicate that the Servo for micro:bit board has power.
- Works with both the [micro:bit V1](https://core-electronics.com.au/micro-bit-by-bbc.html) and [micro:bit V2](https://core-electronics.com.au/micro-bit-v2-australia.html)

Connections
The picture below shows a typical setup using the Servo for micro:bit board.

![](https://core-electronics.com.au/attachments/localcontent/kit_in_action-web-1024x950_13706849e76.jpg)

The following connections have been made:

- 3 x servomotors plugged into header pins. These need to be the right way around, with the control signal (yellow or orange wire) to the left (pins marked c).
- Alligator clip lead from GND on the micro:bit to GND on the Servo for micro:bit board.
- Optional alligator clip lead from 3V on the micro:bit to 3V on the Servo for micro:bit board. You only need this if you want to power the micro:bit from the same battery pack as the servomotors. If you want to power the micro:bit over USB or the JST battery connector then you do not need this connection.
- Alligator clip leads between P0, P1, P2 on the micro:bit to the Servo for micro:bit board. These need to match up with the servomotors you are using, so if you only need the board for one servomotor, then just connect P0 on the micro:bit to P0 on the Servo for micro:bit and make sure that there is a servomotor attached to the header pins marked 0.
- Power to the screw terminal on the Servo for micro:bit. Typically this will be a 4xAA battery pack or other power supply. Make sure that the positive lead goes to the screw terminal marked with a +

### Test Software

**Block Code**

To check that everything is working, this Blocks code project will get you started. Flash it onto your Servo for micro:bit and the servo arms should all start waggling in a random manner. You can see a video of this in action here.

![](https://core-electronics.com.au/attachments/localcontent/microbit-screenshot-1024x705_35514c3ce8a.png)

The servo write pin block allows you to set the angle of the servomotor’s arm between 0 and 180 degrees. Note that servomotors, will not usually travel a full 180 degrees so you may find the actual range is more like 10 to 170 degrees.

**MicroPython**

The following MicroPython example will move the servo one way or another when you press the A and B buttons.

f*rom microbit import \**

*def set\_servo\_angle(pin, angle):*
 *duty = 26 + (angle \* 102) / 180*
 *pin.write\_analog(duty)*

*angle = 90*
*set\_servo\_angle(pin2, angle)*

*while True:*
 *if button\_a.was\_pressed() and angle &gt;= 10:*
 *angle -= 10*
 *set\_servo\_angle(pin2, angle)*
 *if button\_b.was\_pressed() and angle &lt;= 170:*
 *angle += 10*
 *set\_servo\_angle(pin2, angle)*

 *if button\_a.is\_pressed() and button\_b.is\_pressed():*

 *display.scroll(str(angle))*

## Images

- [Product image 1](https://core-electronics.com.au/media/catalog/product/m/o/monk-makes-servo-board-for-microbit.jpg)
