Door Chimes

Introduction

I like mechanical stuff. Even more, I like mechanical stuff that’s computer controlled. Building stuff that moves under computer control is pretty damn funky if you ask me. So, I got a couple of little solenoids the other day at Active Surplus. They have a little moving piece that pops out about 1/4″ when 12 volts DC is applied to the wires. The end of the moving piece is small and blunt, and that got me thinking: These would make very good dingers for some sort of bell thing. So my roommate Dan and I set out to make something musical, electronic and somewhat useful using these solenoids. We thought they would make a great addition to our current doorbell, which is a car horn. Having bells playing music as an alternate ding-dong would be neat.

First Steps

The basic idea was already in our heads as to how this thing would work. We would make some bell-like things, each one would get struck with a solenoid, and making it all go would be a little microcontroller that would watch for the doorbell button to be pressed and then play one of several tunes.

I wrote a little program to run on the PIC16F84 microcontroller, which is the type of chip that my uses. This program is much simpler though. I downloaded a sample of Westminster Chimes to be sure about the notes and the timing. I programmed this tune into the chip and it seemed to work in the simulator software! Woohoo! (the simulator makes it easy to see what’s going on in the PIC without actually building any circuits… it’s a good sanity check when you’re starting a new program) Next I built a prototype of the electronics using a PIC microcontroller as the brains, a ULN2003A darlington transistor array to drive the solenoids, some LEDs to show the tune being played, and a 5 volt regulator to power the PIC. The solenoids run off 12VDC, which is supposed to be supplied by a wall wart or some sort of external power supply.

With the program written and the prototype circuit made, I tested everything, and apart from a few software tweaks and a couple of changes to the hardware, I got it working quite easily. We moved on to the mechanical parts, and I planned to come back and build a permanent version of the circuit the next day.

Bells (aka dingees)

Next we started looking for stuff to make bells out of. Dan and I made a trip to Home Depot, where we dung quite a number of pipes. We tried dinging copper water pipe of various diameters, and also some of the smaller types of steel electrical conduit. I fell in love with the sound of a 1.25″ diameter steel conduit, but it sucked when we found out that a pipe cutter that big costs $33. Damn! I had to settle with 1″ diameter and a $12 cutter. (Dan’s pipe cutter only does 7/8″… I wasn’t going to settle for anything less than 1″) We also got some cheap wood to make a frame out of and some thin nylon rope which we planned to use for stringing the pipes up.

Dan found a formula for calculating pipe lengths to make various pitches. The trick is that you can’t calculate an absolute note, because the formula doesn’t know anything about what your pipes are like. But once you have one piece of pipe cut, you can figure out the length of other pitches based on the first one. As long as you use the same material for all the pipes, this works. So, I just cut a piece of pipe about 60cm long, and then did a calculation for the next note. (which was to be a perfect 4th higher) I came up with 38cm, which was totally completely wrong because I made a mistake in the calculation. It ended up being about an octave and a 7th higher instead. The good thing was that the shorter pipe sounded about million times better. It was more pure with less really loud overtones. We decided to make that one the lowest note. Dan then calculated all the rest of the pipes, because he is better with math.

The formulas worked very well. I cut the pipes to millimeter accuracy, (which required careful pipe-cutter technique) and the tuning is nearly perfect. You can see a few of the cut pipes on the floor. We finished the four pipes needed for the Westminster tune: soh, do, re and mi. We then realized that by adding a high soh, we could also play Mary had a Little Lamb. :) (and probably bits of other songs too) So we added a fifth pipe. The tuning worked out nearly perfectly, and even better just by chance we found that the bells were in the same key that I was working in on my computer when I was converting the tunes into code. I was quite astounded at that bit of luck.

Frame

With the bells cut, we started working on the frame. I marked where the holes for the bells would go. The trick with supporting the bells is that there is a node (no wiggles) 22.4% from each end. Thus, you can support it at these points and they won’t adversely impede wiggling. So we worked out a shape that would allow us to support each pipe at the nodes. We needed to have the pipes laying horizontally because the solenoids don’t have springs, so they need gravity to pull them back. (to save a lot of extra electronics and power consumption) We also wanted the whole thing to stand vertical so it could be easily mounted on the wall when we hook it up to the doorbell. So, one side of the frame is flat so that the solenoids are pointing straight up, and the other side is tapered from bottom to top to make the support points line up with the nodes.

I then drilled 2″ holes in the boards. After a bit of sanding we had the two side boards ready to go. I then drilled small holes in the sides of the boards so that we could put the thin rope through to hang the pipes in the holes. The problem was that the rope was too hard to thread though the holes. I wasn’t really sure it was going to be very stable anyway, so I tried using coat hanger wire and it worked perfectly. We assembled the frame with a top and bottom piece, as well as a brace on the back made of coat hanger wire to keep the frame from changing shape. Only one pipe didn’t have its holes lined up with our frame, but a bit of bending of the coat hanger wire made it fit. I used the abandoned rope and tied little hitches around the coat hanger wire on either side of the pipes to keep them centred in the holes. And then we attached the solenoids with steel strapping. Finally it looked like something!

Electronics

The next day I soldered up the circuit board and wired up the solenoids. Then I added a wall wart that I found in my junk bin, and we mounted a doorbell button to one side so that it could be played without being wired to the front door. And it worked!

We found that the solenoids were being energized for too long, which caused the moving piece to press against the pipes, slightly deadening the sound. I rewrote a bit of the code to make it neater and also to shorten the strike delay. Now it only turns on the solenoids for about 25mS, which makes a much better sound. I also adjusted the height of the solenoids to improve the sound, and wrapped them with electrical tape (Dan’s idea) to make them not slide up and down in the strapping.

Schematic

If you’re curious about the circuit that I used, you can check out the schematic. If you have any questions I would be happy to help you, however if you want to build something similar, there will be a lot of things you need to figure out on your own.