Tag Archive for: projects

@NUSTEMxmas: our festive, robotic, IoT glockenspiel

Every now and then, we (Jonathan and Joe) get an idea stuck in our heads. It’s usually a ridiculous idea, an idea that should never see the light of day. But then, one of us says it out loud…

We’d like to introduce you to the NUSTEM IoT Festive Glockenspiel™.

Whilst you pick your jaw up off the floor, we’ll explain what’s going on and offer a little background as to how we ended up with this creation in our office.

The Glockenspiel has the brains of a Raspberry Pi, and those brains are listening to Twitter. When anyone tweets to @NUSTEMxmas and requests a festive tune, our Pi picks up the message and quickly searches through our vast bank of early 00s mobile phone ringtones for a match. A command is then sent to another Pi elsewhere in the office, which decodes the ringtone and instructs yet another Pi to rev eight servos into action. Those servos move hammers which strike our home-made, only-slightly-out-of-tune, no-sharps-or-flats, plays-with-enough-enthusiasm-to-occasionally-break-itself glockenspiel. We also added flashing lights – synced to the music, obviously –  to enhance the festive mood, and a readout so we know who’s requested the song. One of the Pis (we forget which, but probably the first) also tweets a reply to the original requester.

If you’re interested in finding out more about how it works, we’ve documented our code on GitHub. You can download it and (in theory…) build one of these things yourself. Or poke around in our code for festive giggles: we cobbled this whole project together using bits of previous projects or longer-term incomplete ideas, so the system architecture is at the hilarious end of software engineering.

How we got here

The Glockenspiel is a spin-off from our Robot Orchestra workshop. We’ve been running this digital making activity with our schools and as a public drop-in for several years. The workshop (and the robots) have gradually developed, becoming a little cleverer each time:

  • First version: Arduino controllers move servos on a fixed beat pattern.
  • Second version: Arduinos ‘easily’ reprogrammable, and operating two servos.
  • Third version: Wemos D1 controllers commanded over wifi from a Raspberry Pi, hence all playing in sync.
  • Fourth version: Command system can parse saved patterns and so ‘play tunes’; controllers can respond to one of eight ‘channels’.
  • Fifth version: You know, things get a little hazy somewhere in here…
  • nth version: System controlled by a lovely light-up button board, or a less glamorous but more practical on-screen interface. This is both a super-modern visual programming environment, and something that looks uncannily similar to the sort of punched cards that were used to drive weaving looms and started all this stuff off in the first place.

We’ve built the various parts of our system in a modular sort of way, so it’s relatively easy to switch bits in, remove parts, or graft in new ideas. We use this approach in lots of our digital making projects, with the result that ideas and bits of code are easily shared across projects. We also have a habit of attempting projects which are right on the edge of what we think we can do, but which feel achievable because we’ve already solved half the problems in other projects.

(an early version of the robotic glockenspiel – from, like, Tuesday or thereabouts – showing the on-screen direct programming interface. This was before we built the parser for mobile phone ringtones.)

The new parts we’ve built for this version of the project include:

  • Using a Raspberry Pi as our servo controller, and driving eight (count ’em, eight!) servos from it. Thanks to Ben Nuttall for pointing us in the right direction for that.
  • Handling requests from Twitter. We’ve done this before, but we’ve done a better job of it this time.
  • We found a library of suitably festive songs … in RTTTL mobile phone ringtone format, which is one of those things that rather died out in 2004. So we dredged up music theory half-remembered from our pre-GCSE days and leaned on bits of code from others (RTTTL parser; frequency-to-note convertor), and ended up with code which plays ringtones on our…
  • …home-made copper pipe glockenspiel. Which was itself inspired by this Instructable. Big thanks to everyone who came to our Raspberry Jam last weekend and mucked in to help build this!
  • We added a Pimoroni Displayotron HAT screen, which was intended for a completely different project but was just too bling not to use. Only later did we realise there’s a whole monitor literally right next to it. Oh, well.
  • Finally, we hacked some of the older Wemos-based players so they drove twinkly lights rather than servos, and used them to increase the total amount of festive.

We’ll use bits of this system in a variety of ways throughout 2018, so it’s not even the case that we’ve been massively goofing off in work hours. Mostly. Sadly, we didn’t manage to get to ‘posting video clips back to Twitter’ – most of the recipes we’ve seen for that sort of thing are video-only, which wouldn’t work so well for a musical project. So if you tweet us, you’ll just have to trust that the system has indeed played a little tune for us in the NUSTEM office.

Hmm… a little belief? At Christmas? It’ll never catch on.

 

Ohbot on Kickstarter

I may be a little obsessed with DIY robots. We’re gradually building up a robot menagerie in the Think Physics office, and I’m planning a comparative review of some of the available kits and plans. But that’s not ready yet, and in the meantime you may like to know about this:

I met Matt and Dan at BETT at the beginning of the year, where they had a tiny stand showcasing early prototypes of their Ohbot robotic head. Think Physics bought a couple – we were showcasing one of them at the Juice Festival last week, and you’ll see them around at more of our events over the coming months. I continue to be impressed by them, and the software’s particularly good. It’s Windows-only, but adopts a Scratch-like block programming system which is both straightforward and quite flexible.

Right now, the guys are back on Kickstarter with a more developed, easier-to-build and more expressive version of Ohbot. It’s turning even more into a robot puppet, and once they get over the injection moulding hurdle it should be considerably cheaper than the previous short-run laser cut prototypes.

Ohbot’s interesting because while it is a robotics and programming project, it’s also about self-expression, dialogue, emotion, and our responses to technology. I very much like the pure robotics approach of miniature robotic arm MeArm, and the accessible turtle-graphics programming focus of Mirobot, but Ohbot is a fascinating addition to the mix. For Think Physics’ purposes, I like it because it’s clearly using the same palette of components and techniques as our other robots, and it’s also doing something rather different. If the Maker movement is about any one thing, that thing has to be “technology put to creative use”, and Ohbot is an excellent invitation to think beyond Arduino coding and wiring components together, and to really explore how we want our technology to work for us.

The Ohbot2 Kickstarter closes on Sunday morning (!), and as I write this is tantalisingly close to success. If you can help it reach its target, do pledge for one of the rewards.

Update: Success!
The Ohbot2 Kickstarter was successful on Sunday, so the team are gearing up for full-pelt production in time for Christmas. Congratulations, guys!