Glock around the clockenspiel

Are you a primary or secondary teacher in the UK? Do you want some free CPD? Apply to join our free Raspberry Picademy here at Pi Towers in Cambridge with our amazing education team: closing date for applications is March 28. 

Ivan Roulson from RPi Kitchen (really worth some of your time this afternoon if you fancy browsing your way around some rather excellent Pi projects) was at the local recycling centre earlier this year, when he came upon an abandoned glockenspiel.

There are so many places this story could go from here, but you’ve probably already guessed what happened next.

Ivan took that sad glockenspiel home and gave it a Pi for brains. He designed and built some hammers, and hooked up a motor mechanism and some rubber bands to make the hammers snap back up once they’d made contact. Ivan then proceeded to make the whole apparatus dingle-dongle its way through some sweet, sweet music using Python.

The motors are hooked up to the Raspberry Pi’s GPIO pins using two ULN2803 Darlington driver ICs – Ivan’s plan is to build a dedicated PCB to do the job.

This is not the first glockenspiel project we’ve seen (Mike Cook produced one a couple of years ago, with instructions you can follow to reproduce the project at home), but we very much liked the mechanism Ivan built to make his setup work. We’re dying to see a project where someone adapts Sonic Pi to interface with GPIO: seeing some of you replace the pretty-bell command with an honest-to-god real-world bell would make our day. Any takers?



I love these kinds of projects. Ingenious mechanism on this one.

Liz that sounds like a VERY interesting challenge I’d LOVE to take up. I’ve wanted to do a fully chromatic Pi-brained solenoid glockenspiel since I saw Mike’s. Too much else on at the moment though. :(


*Stares pointedly at Alex*

*Still staring*


I know. What could possibly be more important than a Pi and solenoid-powered glock?
Answers on a postcard (as long as the postage charge is not too high) to…


Doing level best Snoopy impersonation of a vulture looking at Alex:

Eyes have that very serious, “Patience my butt, I’m gonna kill somethin’.”, look that young-turk vultures get when they’re trying to impress the impressionable young-chick vultures.


I am intending to add sonic pi to my pi based sequencer. I am building a new controller based on two adafruit trellis’s at the minute. Once thats done and coded in I will integrate sonic pi. I just need someone to make a pi based device that will extend the day by a few hours!


Liz, Thank you so much for the lovely write-up of my project. I’d been hoping to do something like this for a long time after seeing something similar with a PICAXE. I’ve since produced a PCB using BCX38C darlington transistors and now that I’ve written the Python program better I’m not blowing them if I press CTRL-C to exit the program. I’ll try to put the artwork details and circuit diagram on my site once I’ve got my GCSE students out of my hair…

The glockenspiel has been quite popular at the Exeter Raspberry Jam events. It’s my intention to decode ringtones to save me having to re-code music. It will also save exposing the other attendees to the same set of tunes over and over.

On the subject of recycling centres – these are well-worth looking at. Our local place has sold me three flatscreen monitors at prices even I can afford, as well as the glockenspiel.

Lastly, I’m so grateful for the inspiration that the Raspberry Pi has been. From Jupiter Ace with home-built interfaces (and writing my own wordprocessor for my dissertation – in Forth) through BBC B and beyond. Best wishes and thank you all.


Sorry, slightly off-topic here. Since I’m on the wrong side of the Atlantic, would one of you natives please explain what “CPD” stands for? Thanks!


CPD = Continuing Professional Development, I’d guess from a quick google…


yes, known in the old days as Teacher Training, but that’s far too sensible so they changed it ;)


This whole project gives me a warm fuzzy feeling inside. This is the sort of thing I wish I had the time to do. I love a musical Pi


Next project ideas Ivan…


haha…awesome. I’ll have to grow my hair long and do some headbanging.

Actually, I’m more into Jean Michel Jarre, so perhaps a laser harp should be my next project.


Potentially a dumb question, but one I’ve been curious about for years.

Could an audio signal be pushed through an FFT, which then pulls out the timing of specific frequency of notes (as with the previous tap-dancers, but for notes, rather than “the beat”).

And then the resulting set of timings could be used as an input to a system like this, providing a poor man’s mechanical playback of an original mp3 source?

(I’m thinking “Sweet Child O’ Mine” on a glockenspiel ;-)


An FFT can derive frequency spectrum data from any signal and so, yes, you can select any frequency or frequencies to monitor and initiate triggers when they’re present to a desired threshold level. This is how guitar-to-MIDI, vocoders, and similar devices can work, but another approach is to use analog electronic circuit signal filtering for each frequency of interest. However, FFTs are completely programmable, so the software can analyze what frequencies are actually present and adjust what’s monitored to initiate triggers.


I think we have found a way of bringing keyboard cat back to life.

Leave a Comment

Comments are closed