Introduction: Arduino Controlled Bell Tower/Carillon

This is a set of musical bells which are driven by solenoids and controlled by an Arduino microcontroller.

There are 8 bells covering one octave.

The bells are controllable from a PC, or the tower can stand alone and play pre-programmed melodies.

Check out the final page for video of it in action.

Step 1: Parts

The following parts were used:

1 set of chromatic handbells. I got these from my local Aldi for $20. They span the range from C to C. (I.e. c,d,e,f,g,A,B,C).

Wood panel & brackets to hold the bells and solenoids in place. $10.

8 Solenoids to strike the bells. I had these laying around in my junk box. I got them from a typewriter repairman who was throwing them away. You can probably find similar on Ebay.

Arudino microcontroller. ~$45. I got mine from SparkFun electronics.

Proto/Perf board & misc components to make my custom 'shield' for the arduino. $10.

Darlington driver board. I used one I had laying around, but I believe they're not sold separately. Should be possible to make it using the ULN2803 chip for a couple of dollars.

Step 2: Woodworking

Surprisingly enough this step took the longest. The coding and wiring took less time than for the glue to dry.

The frame for this was pretty simple. Just a piece of plywood to hold all the bells, plus some pine brackets for the solenoids. Everything was glued together with PVA glue.

In order to make the solenoid brackets more repeatably, I made a stencil in MS Visio and then glued it to the wood. This helped a lot to have all the solenoids at a constant distance from the bell.

If you do this I can't stress enough to measure carefully for the striker locations. The bells sound quite different depending on where you hit them and the 'throw' of the solenoid.


Step 3: Electronics & Wiring

Driver side:
I was lucky enough to have a darlington driver laying around, which simplified the design a lot. The darlington is a power transistor that you can use to drive heavier loads than the tiny microcontroller pins would normally support. The board I used is based on the ULN2803 chip, which is quite common and cheap.

Please note: Solenoids are (usually) not designed to be driven constantly! They may melt if you do! See the software section for more info.

Arduino side:
This was just a matter of finding 8 IO pins from the arduino to drive the Darlington inputs.

Because I wanted to send and receive serial data, I couldn't use pins 0 & 1, so I ended up using digitals 2,3,4&5 on one side, and using four of the analog input pins on the other side as digital outputs. I also added a potentiometer hooked up to analog input #5, which is used to control the tempo. Two LEDs are used for visual feedback of the driver.

Pins 8-13 were of no use because of the funky arduino pin spacing (grr...)

Notes on Power:
Although I originally wired this up to use an external power supply to drive the solenoids, I discovered (by accident) that the USB power was sufficient.

I had been concerned that the sudden current pulse would cause the voltage to dip, and the microcontroller to 'brown-out', but this doesn't seem to be occurring. Your mileage may vary. Since it's way more convenient for me to just use the USB power, I'll keep doing that till I have a problem.

Step 4: Software Design

Design strategy
The goal for this was to have the bell tower driven from the PC. Arduino's USB-->Serial link was the ideal way to do this.

The arduino receives serial data from the PC which corresponds to which notes to play. The protocol is straightforward; the notes are all in their ASCII text equivalents. There's also a numerical number as a variable delay.

E.g. The PC sends: "cde2fgABC" and the Arduino plays bells 1,2,3, rests for half a note and then plays bells 4,5,6,7&8.

Tip of the hat to John Plocher for his ServoBells project, which partly inspired this project.

Arduino Side Code:
The arduino code receives the serial data, decodes which note or delay to play, and then toggles the solenoids appropriately.

Speaking of which. Make sure your code is designed so that solenoids are not kept on!. If you leave a solenoid on by mistake, it will melt. I solved this by making my note routines block until the solenoid is turned off, rather than constantly polling, etc.

PC Side Code:
The client program was written in C#. It has buttons for each individual note, as well as buttons for pre-programmed melodies. The note data is sent to the serial port.

The source code for everything is attached.

Room for improvement:
  • Polyphonic notes
I left off the possibilty for two notes to be played simultaneously, as I didn't think any tunes capable of fitting into 1 octave would require them. Additionally firing more than one solenoid can
  • Killing the queue
The PC sends big sentences of notes down to the arduino, which then processes them until the queue empties. However for big tunes this can be tiresome and it may be desirable to be able to interrupt a running tune. This could be accomplished by having some other letter in the serial sentence (e.g. 'x') as a code to flush the buffer.

Step 5: Operating the Bells

Operating the bells is pretty simple. Plug in the USB cable and open the PC software.

You can click on the individual bell buttons to play a tune. Optionally there are buttons to play scales, pre-programmed tunes and also a text-box for freeform text entry.

I've included a video of the bells playing. So far only simple tunes are programmed in.

video is here:
http://blip.tv/file/1521415

(If anyone knows how to play the Futurama theme in one C thru C octave, please let me know....)