In my previous post, the robotic glockenspiel played its first tune. This post is an update on transcribing more tunes.
I’ve been busily transcribing public domain Christmas carols from “The Oxford Book of Carols” and other sources of public domain carols, so the glockenspiel has more material to play. All the carols are checked into the SD folder of the Robotic Glockenspiel Git repository, and are part of that open source project.
In other news, I bought this edge guide for my router, so now I can cut the grooves that will hold the base of the glockenspiel. Next I need to learn how to make rabbet joints, so I can put the glockenspiel box together.
My next post is about crafting the cabinet for the glockenspiel.
In my previous post I pointed to my Open Source code for the project. In this post, I describe the mounting of the solenoids to the frame.
The conundrum of the project has been how to mount the solenoids to the glockenspiel. If I were a metalworker, I’d probably tap the solenoid holes and fasten them with 2mm screws into a metal strip. My 2017 future self says to design a 3D printable holder. Not knowing how to tap such tiny holes and not (yet) knowing how to design 3d printed parts, I’ve been thinking and thinking about how to mount the solenoids to wood.
One day I was wondering out loud how to fasten the solenoids, and Linda said “Why don’t you just buy a router? They’re perfect for that sort of thing.” So I did.
My first attempt with a router was pretty sad. I had imagined that since I knew the basics I’d be fine. A few unintentionally-diagonal cuts later, I realized that making the solenoid channel cuts freehand wouldn’t work: I’d need a jig to let the router cut exactly the width channel I needed.
So using the router and a makeshift fence, I made a little height-adjustable jig. The first attempt at the jig turned out badly, but I’m happy with the second try:
If I were to make jig revision 3, I’d change a few things:
use wider wood to give the router more base to glide on
make the gap large enough so I can clamp the wood to be worked to the jig.
use a plunge router so that the ends of the jig are solid rather than open. Doing that will make the end less likely to warp and bend apart over time.
At any rate, I made a test slot using this jig, and it turned out great!
Now I’ve marked the real solenoid bar, and am ready to route the 19 solenoid slots.
In my next post, I describe the last steps to a functional robotic glockenspiel.
In my previous post I pointed to some sources of information about how to read Midi music files. I’ve now Open Sourced my working code.
I’m a total newbie at Git, but even so I’ve managed to create repositories for the Robotic Glockenspiel and the Arduino Midi File Reader library it uses. See My GitHub repositories for the current state of things.
The repos are far from ready for prime time, but they have the essentials for this project-in-progress:
The Arduino Midi File Reader library I wrote to deliver Midi events from the file in sequence. I’m hoping others will find this library useful. It currently has no documentation at all, other than the comments in the code.
The Fritzing circuit diagram for the glockenspiel controller so far (no physical user interface)
A Bill of Materials (parts list) for the electronics and a few other things. I still need to add the wood and work out e.g., the number of conduit pipes I needed to build the 19 chimes.
The Robotic Glockenspiel Arduino program, as-is. It currently will play a hard-coded list of Midi files that reside on the MicroSD card, with what seems to be the correct timing (although I know it will end each song abruptly). There’s much left to add, such as using a network card to read the playlist and the Midi files from the net, and code to control the player using a set of pushbuttons.
As an added benefit, all this is now under a real revision control system rather than being backed up nightly to my USB fob.
In my next post, I show how I mounted the solenoids to the frame.
In my previous post I covered the Arduino-based circuit I built to strike the chimes. I’ve also, with a little effort, gotten the Sparkfun MicroSD shield to work with the Arduino Mega 2560, so I’m now in the thick of writing the software to read music files for the Robotic Glockenspiel.
Not happy with the Arduino Midi libraries I’ve seen (they seem not very file-oriented), I’ve written the bones of what will become a Midi file-reading library. This library will enable an Arduino Sketch to read events from a Midi file, one by one, so that it can play the notes with the proper timing.
The trick of reading the Midi file was the “running status”, which omits midi channel bytes when they’re repeated.
Here are some useful pages for understanding Midi file format:
Then I chose a few specifics: at TIP120 transistor, a 1000uF capacitor, a 1N4004 diode, and a 5V solenoid from Sparkfun. …and did 19 iterations of the circuit; one per chime in the glockenspiel.
I’ve done a quick Fritzing circuit diagram, which I plan to upload to GitHub.
My main concern was whether the solenoids could be powered only by the VIn pin on the Arduino when powered via a 9V 650mA wall power supply. Turns out the answer seems to be “Yes”: the 1000uF capacitor prevents the solenoid from drawing down the main power enough to reset the Arduino, and the power consumption of the solenoids (see below) is easily supported by the power supply.
To avoid burning out the solenoids each one is powered only a few milliseconds at a time. This causes the solenoid to hit the chime with just enough power to ring nicely, but not too loudly. The math’s pretty straightforward: the data sheet provides the maximum average wattage that the solenoid can dissipate and the minimum resistance of the solenoid. The power supply puts out about 9V. Working out the numbers, it looks like for quickly-paced music, a 6ms-per-strike is about the maximum the solenoid should support (conservatively). Playing most music, this shouldn’t be anywhere near the maximum power the solenoid can support.
This is my second try at making the frame for the chimes. You can read about the Epic Fail first attempt in my earlier post. The trick was figuring out how to make a wooden frame precisely-aligned enough that the chimes fit.
Here’s my tale of this second, successful attempt, phrased as “How to build a glockenspiel frame”
Suppose your glockenspiel will have 19 chimes (like mine) spaced 1″ apart, with a 1″ space at the top and bottom, then a 1.5″ piece of wood at the top and bottom, giving a total height of 24″.
Start by screwing together a 24″ square frame from overlapping pieces, where the sides are just for lining up marks; the top and bottom pieces will remain. Add a small triangle at each corner, to keep the frame square. Add a center piece of wood whose side (not center) marks the center of the frame. Later you will use this piece to line up the center marks of all the chimes.
Next, mark evenly-spaced 1″ marks that – when transferred to the angled parts of the frame – will show where each pipe goes. (I later found I should have marked 1/2″ spaces as well.)
Next you’ll add the angled parts of the frame:
on the longest pipe and the shortest pipe, measure the distance from the pipe center to the pipe node (one of the holes)
Mark the longest pipe distance on the top piece of the frame, and the shortest pipe distance on the bottom piece. It’s a little more complex than that, but you get the idea: place the pieces so that all the pegs will fit on them.
Mark the centerline of two 1.5″ wide pieces of wood.
Line up the centers of the two pieces of wood with the marks on the top and bottom pieces. Mark where the two pieces of wood extend past the top and bottom parts.
Cut off the extended parts of those pieces of wood, then replace them on their marks.
Glue and clamp the two pieces of wood to the top and bottom parts of the frame, making sure they are still aligned with their marks.
While the glue is drying, use the 1″-spaced marks on the side pieces to mark 1″-spaced marks on the two pieces that you’re gluing. Then similarly mark 1/2″ marks (ok, I should have originally marked 1/2″ marks on the side pieces). These 1/2″ marks will line up with the holes in each chime.
The result should look a lot like the photo below:
Once the glue is dry, unscrew the outer parts of the original frame, and cut the over-long remaining pieces, leaving you with what will be the final frame, with an extra piece running down the middle.
Next comes the tricky part: drilling the holes for the pegs that will hold each chime. The pegs need to fit precisely into the holes of the chimes so that the chimes will wiggle. Since the chime holes are 3/16″ and the pegs are 1/8″, there isn’t a lot of room for error. This is the point I messed up in the first attempt at a frame.
To make sure the pegs are lined up, here’s how to add the peg holes for one chime:
place the chime so that its holes are aligned with the 1/2″ centerline on the frame, and so that the lengthwise center of the chime is aligned with the long center piece running down the middle of the frame.
Hold the chime tightly in place while you use a drill with a 3/16″ bit to drill a shallow pilot hole for the left peg of the chime. Don’t drill the right side hole yet. Instead of drilling, you could use a very thin pencil to mark where the left hole will go.
Using a drill press (I have something like a Microlux micro drill press) with a 1/8″ bit, drill the left peg hole.
Cut a 1.5″ piece of 1/8″ dowel; this is one peg. Insert this peg into the hole (but not all the way yet – you want to be able to pull the peg out soon).
Place the chime on the left peg, and line up the right hole of the chime with the 1/2″ line. Center the left hole on the left peg, so there’s wiggle room.
Mark the right hole in the same way you did the left (with a hand drill or pencil).
Drill the right peg hole and insert a second peg.
Place the chime on the left and right pegs. Double check that it is still a little loose. If not, you have to putty up the right hole and try again (luckily I didn’t have to do this).
Remove the pegs and chime, and go on to the next chime.
Now unscrew and remove that center piece. You don’t need it now that you’ve drilled all the peg holes.
Meanwhile, it’s time to cut the felt pads that will surround each peg. These pads keep the chimes from rattling on the wood.
In an earlier post I tuned the chimes. In this post, I find one way not to make a frame for those chimes.
I created the frame for the glockenspiel, with a square frame on the outside so that I could mark the inner part of the frame with 1″ lines, one per chime.
I then aligned each chime in turn with the lines and with the centerline of the frame – the place where the solenoid will strike the chime.
I then drilled a pair of shallow marker holes for each aligned pipe. I could have instead marked the holes by slipping a thin pencil through the chime holes – but I didn’t have such a pencil, so the handy hand drill sufficed.
I then drilled smaller holes centered in the marker holes, and glued a short dowel in each hole.
Then I made the big mistake: I unscrewed the frame so that I could glue it back together – replacing the screws with glue.
Although I was careful to glue the frame pieces along marker lines I’d made when it had been screwed together, the long sides of the frame slipped enough that the dowels no longer aligned with the holes in the chimes.
You can see in the photo below that, for example, the “D” chime hole is nearly 1/4″ away from the peg above it, that it should have been able to rest on. This offset is true for almost all the chimes, indicating that the long parts of the frame shifted between the time I drilled the dowel holes and the time I tried to drop the chimes onto the dowels in those holes.
So, my plan now is to make another frame, and to glue the frame together before I mark and drill the dowel holes (duh) that the chimes will fit over. If at first you don’t succeed, find the root cause of the problem and correct it :-)
My next post has the details of the working frame for the chimes.
Imagine my surprise, after working on my robotic glockenspiel for weeks, when I opened the Signals Catalog, and page two revealed Chimes of the Seasons Music Box, $90. The product has since been discontinued, but it was fun to see it in the catalog.
I knew the project was far from unique, but hadn’t seen such a thing in stores for years – cool that returned to the zeitgeist.
After a few weeks of experimentation, I think I can now write sensible notes on how to cut and tune the chimes for a glockenspiel (metal xylophone) out of metal conduit. This is the first step of my Robotic Glockenspiel project, which I hope to end with a network-connected, Arduino-controlled set of chimes that can play Christmas carols.