Introduction: AbstractC - a Drum Clock

Music has always been of great inspiration to me, as well as the concept of time.

My project is about trying to make an abstract clock with a drum set. Abstract because it will play every hour, but you won't actually know what hour it is. The idea is to have different elements (drum sticks, mallets, brushes, solenoids...) hitting the drums, driven by step motors and arduinos. The objects would start playing a random sample by hour. I plan to use a lamp timer to activate the arduino and launch the code every hour.

Here is a video of the outcome:


[Play Video]

I'll explain the steps for 3 motors, but you can easily do it with 4.

For this project, you will need:
x1 Arduino Uno Board
x3 (or 4) pololu motor drivers (https://www.pololu.com/product/1182) + soldering plate (big enough to mount the arduino and the pololus) + soldering pins (male female and male male) OR buy this motor shield: http://www.ebay.fr/itm/ARDUINO-UNO-R3-CNC-SHIELD-V...

x3 Steppers medium size
x1 double pin connector for 12V input and ground
x2 connectors for motors. It's easier to use this kind of connectors: http://g03.a.alicdn.com/kf/HTB19sMvHFXXXXbKXFXXq6x...

x1 100uF capacitorconn
x1 PC Power Supply (gives enough amps to run 3 or 4 motors and 12V)
x1 board of MDF wood 3mm thick
x6 5x20 mm bolts + corresponding nuts
x6 5x8mm bolts + corresponding nuts

x4 3x8mm screws

x1 5mm drill bit and 3mm drill bit (metal and wood)

x3 metal Ls (large as your motor)
x3 little metal Ls to fixate motors on big metal Ls

x3 kinder surprise eggs AND/OR little fishing leads (This is for the counter-weight, necessary to have the hitting elements come back to their original position. You can tape a few knots or bolts at the end, or anything else you can think of)
x3 "hitting elements" : drumsticks, mallets, brushes, cowbells...
x1 lamp programmer

Step 1: Step 1: Build Your Motor Shield (or Buy One and Skip This Step)

Place your components on your soldering board. Try to find a good combination so that it makes it easier to solder. The pololus will be put on top of female pins: if they burn, you can replace them easily.
Before fixing everything, check that the arduino and pololu fit on the pins.
The capacitor goes in parallel to the 12V input: Capacitor + goes connected with 12V, Capacitor - goes to ground.
Once every thing is in place, tape it with masking tape, return the board and solder the pins (this will keep them kind of steady). A good trick to have the pins soldered straight is to solder the first pin and the last one.
Once this step is complete, you will have to solder the cables of the pololu drivers: this is HELL and takes FOREVER, be prepared.
Mount your arduino and visualize where the number of your pins. Same for the pololu.
Check the data sheet. For this shield, I connected all the micro-stepping pins of the pololus to the same arduino pins: 10, 11 and 12. I used pins 2 to 9 for the step and direction (Pololu 1: step - pin2, dir - pin3 // Pololu 2: step - pin4, dir - pin 5...etc). Reset and sleep are connected together. You have two grounds on the Pololu, they can be connected together, and then to the main ground.
Start connecting one pololu, then the other, it's the easiest way.
Check your connections with a multimeter. If something goes wrong, check that everything that should be connected is beeping. Also check that what shouldn't be connected is not beeping. Prepare a magnifying glass!

Upload a simple code and connect your motors just to check your motors are running:


#include <AccelStepper.h>

// AccelStepper M0(A5, A6, A7);
AccelStepper M0(1, 3, 2), M1(1, 5, 4), M2(1, 7, 6), M3(1, 9, 8); //step,dir

//instead of calling M1(1,3,2)
AccelStepper M[] = {M0, M1, M2, M3};

int ms1 = 12 , ms2 = 11, ms3 = 10; // declare micro stepping pins (all modules have the same ms pins)

void setup() {
pinMode(ms1, OUTPUT);
pinMode(ms2, OUTPUT);
pinMode(ms3, OUTPUT);

// MicroStepping in LOW will allow to bang with more force on the drum

digitalWrite(ms1, LOW);
digitalWrite(ms2, LOW);
digitalWrite(ms3, LOW);

}

void loop () {

for (int i = 0; i<=3 ; i++) {
delay (1000);
M[i].setMaxSpeed(10000);

M[i].setAcceleration(100000);

M[i].move(50); // distance à parcourir (on n'est pas encore parti) //

while (M[i].distanceToGo() > 0) {

M[i].run(); //on avance d'un pas
}

delay (temps); /// si la baguette reste un peu sur le tambour // //

M[i].move(-50); // distance à parcourir (on n'est pas encore parti) //

while (M[i].distanceToGo() < 0) {

M[i].run(); //on avance d'un pas

}

}

}

Step 2: Step 2: Build Wood Supports

To hold the motor in place, I used a structure of wood around the screws holding the skin of the drum.

I laser cut a series of little wood rectangles that would clamp around the screw.


First, measure the height of your screw and the space between the drum and the screw. I had 9mm, which allowed me to use three rectangles of 3mm thickness MDF.

1. cut a 5,5 x 2,5 cm rectangle with 3cm apart holes to fit the bolts (mine were 5mm thick and 20 mm long bolts).
2. cut 4 little rectangles that align to the holes of the first rectangle, with a 5mm gap between the right and left rectangle. Glue the two layes of little rectangles on top of the big one. This will clamp to the screw of the drum (5mm thick). (See pictures!)
3. Cut a 5cmx3cm rectangle with two holes 3cm apart (I cut an hexagon, but it can be a simple hole, or nothing. If you cut the hexagon, it has to be smaller than the diameter of your nut. This board allows to trap the nuts).
This board needs to be a little bit longer so that it remains stable behind the screw. You might have to sand a little bit at the back so that it fits on the metal structure of the drum. Slide this board behind the screw of the drum.
4. Cut a 5x2.5 cm board with two hexagons that fit the size of your nuts, 3cm apart. Put the nuts inside, and slide it behind the screw of the drum, in front of the other board.
5. Cut a 5x2.5 cm board with two circular holes: diameter 5mm (of your bolt) and 3cm apart. Slide this board between the screw and the other two boards. You will have to force it a little bit to be sure it is steady.

Be sure the holes are aligned.

6. Place the "clamping structure" you first built in front of the screw (the screw goes in the 5mm gap that was left).

Step 3: Step 3: Metal Structure and Motors

After making your wood supports and placing them around the screw, you can put your metal L and insert the bolt in the corresponding holes. Screw it tight, it can't move, or the motor will lose a lot of strength.

Place your motor on top of the L and fix it with little metal Ls (see pictures) and the 8mm long bolts. You can put a layer of rubber before fixating the motor to lower the sound of the vibrations.

One of my motors needed to be placed under the L, for the brush that has to move from left to right instead of up and down. Measure carefully the distance of the holes on the motor and drill them on the L. Drill 3mm holes on the points that match the holes of the motor. Drill a big hole for the axis (it has to be bigger than 5mm that is the diameter of the axis). Fixate it with little screws (8mm long, 3mm thick).

Step 4: Step 4: Hitting Elements

Cut your hitting elements if you need it. I had to cut the drumstick around half.

You can glue them to the axis, but I wanted to keep a possibility of changing them.

Drill a hole 4.5mm and fixate it to the axis of the motor. Hammer it down. (the axis is 5mm, you need a smaller hole to be sure your drumstick won't move). To be sure it doesn't move, you can drill another hole (smaller, around 2mm or 3mm) through the hitting element and the axis of the motor and place a little screw to hold everything in place.
You can also thread the axis and block the stick between two nuts.

You will notice that the drumstick is not balanced. If you move it around the axis, it will follow gravity. You need to avoid this with a counterweight, otherwise the motor won't be able to pull back the stick.
I used kinder eggs that I filled with nuts or nails until the element is balanced and doesn't fall anymore, no matter the position in which you put it. It's a counterweight, but also a Maraca!

I also used little fishing leads that I placed along the mallet by drilling little holes and attaching them with thread (nylon would be better, it is stronger).

To fix the brush, I had to find a way for it to remain fix on the axis. I built a little wood structure with the size and shape of my axis that I could remove if need be, on top of which I hot glued the brush (hot glue keeps it fix on the wood, not on the metal). kinder

Step 5: Step 5: Connect Your Arduino and Start the Clock!

Screw your arduino on an MDF board, put the shield on top and attach it to the drum.
You can use double sided tape or velcro, or screw it.

Connect your 12V input, ground and motors.

Load your code on the Arduino (.ino file).

Connect the power supply to a lamp programmer, and set the hours you want your clock to turn on.

Enjoy!

Improvements:
You can use bigger motors to hold the weight better, this will allow you more flexibility to program samples. I left it to random because my motors weren't behaving as expected.
You can also place LEDs around the skin to show the hour.
Add as many motors as you want, with any percussion sound you might think of!