It has been quite a bit of work, but the winding of the solenoid coils and the construction of the armatures is finished.
Some notes on the armatures, they are made from 6mm steel rod about 17mm long. To the end of each steel slug a 2mm x 6mm round neodymium magnet is attached. Super glued to the top of each magnet is a piece of 1mm styrene made using a hole punch. The purpose of the styrene is to produce a more pleasant tone when the armature hits the aluminum bar. I may end up gluing a piece of felt or similar to the bottom of each armature to dampen the clicking noise produced when the it drops back into the coil after being actuated.
The circuitry prototyped thus far has been on a breadboard. For the final implementation something less fragile would be better. I contemplated using the soldering type proto/experimenters board, but ultimately figured it would be cleaner and more fun to attempt to make a PCB.
After a little research into PCB design programs, I found fritzing.org. I like that the project is open source and that it ties in with arduino.
Fritzing is an open-source initiative to support designers, artists, researchers and hobbyists to work creatively with interactive electronics.
I found the program simple to use and reasonably stable (though I advise saving frequently). You can design the PCB by starting in a "breadboard view". You build up a circuit by simply dragging required components into the workspace and adding connecting wires. Then selecting by "PCB view" you find the skeleton of your PCB and you are left to decide where to lay the paths. There is also a "Schematic view" if you wish to make a circuit diagram.
After a bit of work, I produced the following PCB layout.
Here I have started to wind the solenoid coils using 0.25mm diameter magnet wire. A 25g spool filled up 4 solenoids nicely, I didn't worry about counting the number of turns.
The winding jig was very simple. Just a crank handle made from a couple of 3mm screws and a scrap of 2mm aluminium. The bolt in the vice is being used as a pin, the thread isn't being used. The spool of wire is being held behind a couple of bits of steel, ground parallels in the case, this keeps a bit of tension on the wire. I just used my finger to guide the wire to get an even distribution. The winding took about 2 mins per coil.
After winding I soldered longer wire leads to each of the enamel wire endings. The soldering process removes the enamel, so you don't need to worry about scraping it off. I used some shrink tube to protect the join.
After successfully winding 6 coils, that brought the total to 8 including the prototypes. Enough coils for a single octave and a good chance to test out playing some songs.
Here is a fast version of the "doe a deer" song from The Sound of Music. This was about as fast as I could play with the first prototype coil. It required a 100ms pulse while the later design with more windings only needed a 7ms pulse to get a note to ring. So when all the coils are wound it will play about 14 times faster than this, which, after a little test, is ridiculously fast.
Now that the test solenoids worked well it is time to get stuck in making the rest. Starting off with the spools.
Here is the design.
Turning on the lathe. I had to use a the tail stock and turn between centres as the nylon was deflecting. I think a more machining friendly plastic could have helped. I had more deflection problems with the drill producing a well undersized hole and ended up using a 6.5mm drill.
So I spent a little time getting the chain of 4 shift registers to behave and now have 32 output pins to play with. The glockenspiel I made has 25 keys so things should work out well.
I also wound a second solenoid coil of a slightly different design to the first. I used 12mm nylon for the spool which allowed for some more windings than the first.
The circuit to actuate the solenoids is similar to one shown on the arduino forum.
I found a little time last weekend to finish off the glockenspiel notes I've been making.
To make things a little bit interesting I used 10x40mm aluminium for the natural notes and 12x25mm for the sharps. I was quite happy with the results from a design aspect.
Here are the first few keys for my glockenspiel. I crept up on the finished lengths of the first two bars, taking 0.1mm increments and measuring frequency. With the remaining six I put my trust the physics and was surprised by how well tuned they turned out.
For those interested in the physics, the ratio of frequencies differing by a semitone is 2^(1/12).
Also the fundamental frequency of a bar is inversely proportional to the square of its length.
Thus the ratio of bar length between semitones is (2^(1/12))^(1/2) = 2^(1/24).
For example if it is known that say a bar tuned to C is 200mm long then a bar tuned to C# is given by: