Abstract C_ /// 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.

So far, I’ve been trying to get the motors to work, but they are not running on 12V, only 5V, which doesn’t give them enough force to hold the drumsticks.

  20151207_224653  20151207_230320-2

After figuring out that the motor shield didn’t work, I set up to build my own. That way, I could control 4 motors with pololu motor drivers and 1 single arduino.

20151209_192453 20151208_155239

The structure is made with a metal L on top of which I screw the motor. They’re tighten around the screw of the drum with a little structure that allows is to be stable.

20151215_181436 20151214_100058 20151215_164403

I pierced a hole in the drumsticks to put them on the axis of the motors, and found different ways to counterbalance them (if they’re not counter balanced, they don’t come back once they hit the drum):

20151216_114330 20151216_10310720151215_222954

It ends up looking like this:



The code is simple enough. I used the Accelstepper library on Arduino, which allows to control not only the speed but also the acceleration of the motors. That way I had different variables to play with.

#include <AccelStepper.h> // Utilisation librairie Accelstep, déclaration des moteurs
//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;; // déclaration des broches controlant le micro stepping (la valeur résultante est commune à tous les modules)
//int var = random (0,3);

int temps = 0;

int distance = 50;

int pos = 60; //number of steps (one revolution = 200)

int stopIt = 0;

void setup() {
// put your setup code here, to run once:

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

void loop () {
// M[1].setMaxSpeed(20000);
// M[1].setAcceleration(80000);
// M[2].setMaxSpeed(10000);
// M[2].setAcceleration(500);
// M[3].setMaxSpeed(8000);
// M[3].setAcceleration(2000);
for (int h=0; h<5; h++) {

M[1].setMaxSpeed(random (10000, 20000));

M[2].setMaxSpeed(random (20000, 50000));
M[2].setAcceleration(random (500,5000));

M[3].setMaxSpeed(random (10000, 40000));
M[3].setAcceleration(random (500, 5000));

delay (50);

//the Move function tell the motor the distance it will have to run

//the run function makes the motor move to the distance set with move()

while (M[1].distanceToGo() > 0){
while (M[2].distanceToGo() > 0){
while (M[3].distanceToGo() > 0){
delay (50);

//Set the motors to hit, then go back to their original position:

while (M[1].distanceToGo() < 0) {
while (M[2].distanceToGo() < 0) {
while (M[3].distanceToGo() < 0){


delay(900000); // 15 minutes is the time the lam programer stays on. The delay is set so that
//it doesn’t keep playing for 15 mn.



Because the motors end up having different behaviors than expected (probably a problem in the shield I built), the clock turns out to have some sort of life of its own.
I wanted to produce a series of rhythmic samples that would randomly be activated every hour. That turned out to be impossible given the autonomous rebel behavior of my motors.
In a way, I prefer having it this way. It feels as if it has a life of its own and the capacity to make its own decisions, and I created some kind of Frankenstein.


Instructables Link to build your own: http://www.instructables.com/id/AbstractC-a-Drum-Clock/

Here is a small video of what it looks like:



Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation