Introduction: Micro:bit - Micro Drum Machine

This is a micro:bit micro drum machine, that instead of just generating the sound, actuelly drums. It is heavy inspired by the rabbits from the micro:bit orchestra.

It took me some time to find some solenoids that were easy to use with the mocro:bit, since I didn’t want to use alternstive power sources or relays.

The circuit is a bit more complicated than my other projects, and though it is not that hard, it is properly not a project for middle school students.



1 x micro:bit

4 mm plywood

3 x M3 bolts

12 x M3 nuts

1 x TIP120 darlington transistor

1 x 1k ohm resistor

2 x 10 uF electrolytic capacitors

1 x 47 uF electrolytic capacitor

1 x TO220-3 voltage regulator

1 x rubber band

1 x 9 volt battery

1 x 9 volt battery clip

1 x Switch

1 x Diode

1 x 5 volt solenoid

A few meters of wire.

It is good if you have different colours

Some perf board

Wood glue

Hot glue


Soldering tools



Hot glue gun

Step 1: Solder the Circuit

Solder the circuit on the drawings. You shouldn't solder anything to the micro:bit since we are going to connect it with bolts and nuts. Just leave some wire there. I soldered the 1k ohm resistor into the wire.

When I made this first I didn't realise that a switch was needed, so I added it later, but you should properly learn from my mistake and add it now.

Step 2: Lasercutting

Download the files and cut them out of 4 mm plywood.

Step 3: Add Battery

First attach the rubber band, then strap in the battery.

Step 4: Attach Circuit

Use hot glue to attach the circuit and solenoid. Use plenty of hot glue. You will be able to recover the solenoid for another project if you want to, since hot glue doesn't stick that well to metal.

Step 5: Glue It Together

Use woodglue to glue the two sides on. Wait a bit before you continue working.

Step 6: Add Bolts

Now take one of the M3 bolts, wrap the data wire you want to connect to the micro:bit around it and keep it in place with one of the nuts. Do the same for the ground and 3.3 V wire.

Then put the screws through the holes. Gnd through the left most hole, 3.3 V through the second most to the left and data throught the right most hole. Use two nuts on each to keep them in place. We use two instead of one,because we also need to creat some distance for when we connect the micro:bit.

Step 7: Add the Forgotten Switch(Optional)

If you forgot to add a switch like me, then this is when I added it. Without the switch to turn of the circuit it will be very hard to get the micro:bit in place, because the solenoid will randomly turn on and off, until the micro:bit is properly set. Cut the ground wire from the battery clip, solder on the switch and glue it on with hot glue.

Step 8: Attach the Micro:bit

Screw the micro:bit on.

Step 9: Programming

So programming it is pretty simple.

The first red block turn the solenoid off.

The next block makes the LED's show a tired face.

Third block pauses the program for a second.

The second red block turns the solenoid on, so that it jumps out and make a beat.

Afterwards we have a block for shocked face and a 100 ms wait.

I use the faces in my first program for trouble shooting, but if you want to program a more perfect beat, then you properly don't want to include them, since it take time for the micro:bit to draw them. A small amount of time, but enough to mess up a beat.

Here is a program.

Step 10: Test

Now transfer your code to the micro:bit and test it.

If you use a fast beat, then the solenoid will start getting warmert after 5 minuts and after 15 - 20 minuts it will start getting hot. So if you want the Micro Drum Machine to be on for a long time, then you might want to aply a small passive cooler to the solenoid.

Audio Challenge 2020

Participated in the
Audio Challenge 2020