Arduino-Controlled Robotic Drum

127,130

310

84

About: My name is Randy and I am a Community Manager in these here parts. In a previous life I had founded and run the Instructables Design Studio (RIP) @ Autodesk's Pier 9 Technology Center. I'm also the author ...

Intro: Arduino-Controlled Robotic Drum



For years I have been telling anyone who listens that I was going to build a robotic drum. Most people kind of shrugged indifferently. Even as I built it, most people kind of glanced over at it and conveyed doubtfulness. It seemed like no one but myself was convinced of just how awesome it was going to be.

I received a lot of snarky comments about how I was making a strange annoying noise maker. When I finally go it set up for the trial run, I quickly silenced the naysayers. This robotic drum blew everyone away. I was finally able to convey my vision and explain why someone would ever want to build a robotic drum.

The reason to build a robotic drum is because it is plain super-awesome. It keeps a beat like clockwork. You can slow down and speed up any drum beat with precision and ease. It can even play things a real human drummer could never do.

I intend to use mine for rocking out. The current plan is to program it with different drum beats and play guitar along with it.

I decided to use linear actuators (car door lock motors to be exact), and Arduinos with motor controller shields simply for ease of use and duplication. I am sure there are other more elegant ways to interface with the motors, but this is by far the easiest.

Step 1: Go Get Stuff

You will need:

(x1) Drum set
(x12) Drum sticks
(x2) Cymbal stands
(x12) Car door lock actuator motor
(x6) Arduino Uno
(x6) Arduino Motor Shield
(x1) 7" x 5" x 3" project enclosure
(x1) Terminal strip
(x2) 18 AWG speaker wire
(x3) Panel mount power socket
(x1) 1/4" mono jack
(x1) 1/4" mono plug
(x1) 4" zip tie
(x1) Stranded 22 AWG red and black wire spools
(x1) Assorted shrink tube
(x3) 9V 2A power adapters
(x1) Power strip
(x1) 7 port USB hub
(x6) 6' USB A to B cable
(x1) 4' x 8' x 1/4" plywood sheet
(x4) 1/2" pipe mounting flange
(x1) 24" x 1/2" threaded pipe
(x1) 18" x 1/2" threaded pipe
(x8) 1/2" pipe L-bracket
(x2) 1/2" pipe T-bracket
(x2) 1" x 1/2" threaded pipe
(x4) 2" x 1/2" threaded pipe
(x4) 2-1/2" x 1/2" threaded pipe
(x2) 3" x 1/2" threaded pipe
(x3) 3/4" x 10' 22 gauge steel hanger strap
(x16) 8 - 1/2" wood screws
(x20) 1/4 x 5" bolts
(x4) 1/4 x 2" bolts
(x1) Box of 1/4 nuts
(x22) 6-32 x 2" nuts and bolts
(x4) 6-32 x 1" nuts and bolts
(x11) 1-1/2" binding posts
(x20) 1-1/2" (1/4" i.d.) spacers
(x18) 4-40 x 1-1.2" nuts and bolts
(x18) 1/4" (1/8" i.d.) spacers

You will also need to download the attached files and laser cut (or cut the old fashioned way) the following:

(x16) Drum brackets
(x6) Cymbal brackets
(x4) Cymbal bracket circle spacers
(x2) Kick drum brackets

Please note that some of the links on this page contain Amazon affiliate links. This does not change the price of any of the items for sale. However, I earn a small commission if you click on any of those links and buy anything. I reinvest this money into materials and tools for future projects. If you would like an alternate suggestion for a supplier of any of the parts, please let me know.

Step 2: Attach the Motor

Take two of the pieces of the standard drum bracket (without Arduino mounting holes) and sandwich a motor in-between. Fasten it through the center mounting holes using 6-32 nuts and bolts.

Step 3: Make Another

Pass 4-40 bolts through the Arduino mounting holes on one of the drum brackets and loosely hold them in place with bolts.

Once the bolts are passed through, make another motor bracket "sandwich" like you did in the last step.

Step 4: Motor Pair

Pass a 5" x 1/4 bolt through on of the corner mounting holes in the motor bracket "sandwich" that is prepped for the Arduino.

Repeat for all of the other holes.

Thread a nut all the way down one of the bolts to hold it in place, and then repeat for all of the other bolts

Slide a spacer over each of the bolts and then thread more nuts on to hold them all in place.

Slide the other motor bracket "sandwich" onto the bolt.

Fasten everything securely in place with another nut.

Step 5: Drill a Hole

Tape two drumsticks together and then fasten them securely into a vise in preparation for drilling.

Make a mark at 5-1/8" and 7-1/4".

Drill down through all of these marks with a 3/16" drill bit, to leave an identical pair of holes in each stick

Repeat this process 5 more times, to make 6 sets of drilled drum sticks.

Step 6: Attach Drum Sticks

Grab the complete drum stick assembly.

Pass a binding post from the outside of the assembly through the corner pivot hole,  through the hole in the drumstick closer to the tip, and then through the inner pivot hole.

Fasten the binding post shut.

Zip tie the drum sticks to the motor assembly using the other drilled hole.

Repeat this process for the other motor.

Step 7: Build More

After you build your first complete drum stick assembly, build three more.

Step 8: Glue and Clamp

The motor bracket "sandwich" assembly for the hi hat cymbals requires and extra piece of wood attached on each side of the outside of the assembly.

To attach this wood piece, simply lay down a little bit of wood glue, align the pre-drilled 1/8" pilot holes, and then once aligned, clamp them in place.

Don't forget to make certain that one of the pieces you are gluing the wood piece to has holes for mounting the Arduino.

Step 9: Motor Brackets

Take your brackets and make two more motor "sandwiches," such that when they are ultimately assembled, the pieces with the extra wood piece glued on will be facing outwards.

Step 10: Assemble

Put together the motor assembly like previous motor assemblies, will paying special attention that the pieces with the extra wood piece glued on are facing outwards.

Step 11: Build the Mount

Start with a T-bracket and thread a 3" section of threaded pipe on each end.

Connect L-brackets to each end of the respective threaded pipes.

Thread a 2" section of threaded pipe onto the end of each L-bracket.

Again, put L-brackets on the end of each respective threaded pipe.

Thread a 1" section of threaded pipe onto the end of each L-bracket.

Finally, attach flanges to the end of each threaded pipe.

Step 12: Attach

Slide the flange over the extra bit of wood on the drumstick assembly until they are aligned.

Rotate the flanges as necessary so that the pilot holes are aligned with the flange's mounting holes.

Fasten the drumstick assembly to the mounting bracket place with wood screws.

Step 13: 18" Pipe

Attach the 18" threaded pipe to the base of the T-bracket.

Step 14: Connect Drum Sticks

Using the binding posts, mount the drum sticks like you did for the previous drum stick assemblies.

Again, zip tie the drum sticks to the linear motor assembly.

Step 15: Clamp and Glue Again

Again you will need to attach an extra wood piece to the wooden bracket sfor the cymbal assembly mount. However, because the cymbal only uses one stick, you only have two brackets and will need to glue the wood to each.

Make sure that when you do this, the extra piece of wood will be on the outside when you make your motor "sandwich."

Simply lay down a little bit of wood glue, align the pre-drilled 1/8" pilot holes, and then once aligned, clamp them in place.

Step 16: Assemble

The cymbal drumstick assembly only has one motor "sandwich."

Assemble it accordingly, with the extra bits of wood facing out.

Don't forget to install the Arduino mounting screws as well.

Step 17: Build Another Mount

Start with a T-bracket and thread a 2-1/2" section of threaded pipe on each end.

Connect L-brackets to each end of the respective threaded pipes.

Thread a 2-1/2" section of threaded pipe onto the end of each L-bracket.

Again, put L-brackets on the end of each respective threaded pipe.

Thread a 2" section of threaded pipe onto the end of each L-bracket.

Finally, attach flanges to the end of each threaded pipe.

Step 18: Fasten

Connect the drum stick assembly to the pipe mount exactly like you did for the hi hat assembly.

Step 19: 24" Pipe

Attach the 24" threaded pipe to the base of the T-bracket.

Step 20: Connect the Drum Stick

Once more, mount the drum sticks like you did for the previous drum stick assemblies, and then zip tie the drum sticks to the linear motor assembly.

Step 21: Prepare the Kick Drum Pedal

Detach the foot pedal and chain from the kick drum pedal.

Remove the spring that is keeping tension on the pedal's rotational assembly.

Using the mounting holes in the wooden bracket as a guide, drill 1/4" holes on both sides of the pedal. This should result in 2 holes on each side of the pedal.

Step 22: Attach

Attach the wooden brackets with 1/4 nuts and bolts to the kick drum pedal assembly using the holes that you have just drilled.

Step 23: Spacers

Dissemble two pens so you are left only with the pen tube.

Insert 5" x 1/4 bolts through the bracket's structural mounting holes, using the pens as spacers in-between the two.

Fasten each bolt firmly in place with a nut.

Step 24: Attach Motor

Line up the shaft of the linear motor assembly with the rotational pivot of the kick drum pedal assembly that the spring used to be attached to.

Attach the motor to the wooden bracket using 6-32 nuts and bolts.

Zip tie the motor shaft to the rotational pivot of the kick drum pedal.

Step 25: Socket

Wire the 1/4" socket to the motor on the kick drum assembly such that the ground wire from the motor is connected to the tip, and the other wire is connected to the barrel of the jack.

If the motor does not have red or black wires, designate one of the colors to be ground and the other to be power. In this case, the green wire will be ground.

Step 26: Jack

Take apart the 1/4" plug, and go grab about 5' of speaker wire.

Solder the marked edge of the speaker wire to the ground terminal.

Solder the unmarked edge to the tip terminal.

Reassemble the plug when you are done.

Step 27: Snare

Attach one of the drumstick brackets to the snare drum by passing the steel hanger strap through the thin vertical mounting slots in the brackets and wrapping it around the drum. Fasten it tightly in place with 6-32 nuts, and bolts.

Step 28: Toms

Attach a drum stick assembly to the toms like you did the snare drum.

Step 29: Floor Tom

Attach a drum stick assembly to the floor tom like you did the other toms and the snare drum.

Step 30: Cymbal Strikers

Insert the rods from the cymbal striker assemblies into the extra cymbal stands.

Step 31: Kick Drum

Attach the motor-controlled kick drum pedal to the drum.

Step 32: Plug in the Shields

The motor shields need to be plugged into each of the respective Arduinos.

However, before you go and do this, bend the shields Vin pin so that it will not plug in to the Arduino. This is done to prevent the Arduino from getting directly connected to the voltage input on the motor controller, which is rather high and runs the risk of spiking.

Alternately, if you don't want to preserve this functionality on the shield, cut the pin away entirely.

Step 33: Program the Arduinos

Upload each respective Arduino with the code below.

Hi Hat Arduino:


Snare Arduino:


Cymbal, and Kick Drum Arduino:


Small Tom Arduino:


Large Tom Arduino:


Floor Tom Arduino:

Step 34: Attach

Once all of the Arduinos are programmed, you will want to affix them to the drum stick assemblies.

Remove the nuts from the Arduino mounting bolts that were inserted earlier.

Next, slide 1/4" spacers onto the bolts.

Finally, mount the Arduino using these bolts and fasten them firmly in place with nuts.

Step 35: Extend

If necessary, extend all of the motor wires so that they are long enough to plug into the motor shield.

Cover any exposed wires with heat shrink tubing.

Step 36: Plug

Plug the wires from each motor into either Channel A or Channel B on the motor shield.

For the most part, it is not really important which is which, so long as it is a single motor to a single channel.

The one exception to this rule is the Arduino that controls the kick drum and the cymbal, but we will touch more on this in a moment.

Step 37: Drill

Make 3 side-by-side marks, about an inch apart, centered on each 7" x 3" side of the case.

Drill each of this marks with a 5/16" drill bit.

Step 38: Jacks

Wire each of the jacks such that the positive red wire is connected to the center terminal and the black wire is connected to the outer terminal.

Mount the jacks  into three of the holes side-by-side on one side of the case.

Step 39: Wire It Up

Connect the wires from each of the jacks into the European terminal strip.

Wire them up such that it is alternating power and ground, and each jack is supplying power to two pairs on the strip. In other words, each jack should be supplying power and ground twice.

Connect the speaker wire to the first pair so that the marked edge of the wire is going to ground and the unmarked edge is going to power. Repeat this for all subsequent pairs.

Step 40: Case Closed

Pass the wires in pairs of two through each of the three respective holes in the case.

Make sure the terminals strip is nicely situated inside the box.

Put the lid onto the power box and fasten it shut.

Step 41: Set Up

Install the toms above the kick drum as you normally would for any other drum kit.

The snare and floor tom (not pictured) can just stand on the floor in their typical places.

Step 42: Cymbals

Adjust the height of the drumstick assemblies such that they strike the cymbal and hi-hat reliably. This may take some fussing about.

These cymbals and strikers can then be positioned in their normal drum kit location.

Step 43: Plug Some Stuff In

Take a speaker wire from the power supply box, and plug the marked edge of the speaker wire into the ground input socket on one of the motor shields. Next, plug the unmarked edge into the power socket on the shield. Repeat this process five times, for all of the motor shields.

Plug the marked edge of the 1/4" plug cable into the "Motor A" minus terminal on the cymbal assembly's motor shield. Plug the unmarked edge into the plus terminal of the cymbal assembly's motor shield. Insert the 1/4" plug into the 1/4" jack on the kick drum.

Plug the three 9V power adapters into the power strip, and insert their barrel plugs into the M-type jacks on the power supply box.

Plug a USB wire into each of the Arduinos and then plug them all into the USB hub.

Step 44: Sequence

To use the drum kit, first connect the USB hub to your computer and make sure the power strip is powered on.

Next, visit the Max MSP site and download Max5 Runtime (Mac / Windows).

Download the attached zip file with the "robo drums sequencer57600" Max patch.

Run "robo drums sequencer57600.maxpat" using Max5 Runtime.

This Max patch was created by the amazing Amanda Ghassaei - Max MSP Ninja and loosely certified Instructables Genius. This project would have taken much longer, and probably have not been quite as awesome, without her world class Max MSP skills.

Share

Recommendations

  • Tiny Home Contest

    Tiny Home Contest
  • Fix It! Contest

    Fix It! Contest
  • Audio Contest 2018

    Audio Contest 2018

84 Discussions

0
None
askjerry

3 months ago

That is what I call a PRO LEVEL Instructable!

Great layout, nice images, incredible project... the whole thing is first class!

0
None
zacker

3 months ago

Awww Come on!!! I was so looking forward to hearing what this kit could do but there was nothing but a couple notes played in the video!!! Boooooo! I want to see it actually play a song, see what it could do ... Please post another video...lol

2 replies
0
None
randofozacker

Reply 3 months ago

Tell me about it! This project was originally sponsored by Radioshack (RIP) and the video they made to go with it didn't showcase the drums at all!

Here is a not-so-great video of the drum kit right before I sold it and moved across country:
https://www.instagram.com/p/94zVc_EaJm/

And this is a video someone took when I was first building it and working out the bugs:

I really wish I had a better video of this thing in action!

0
None
zackerrandofo

Reply 3 months ago

Cool...lol... thats pretty sweet! Now you need to build a robotic guitar! lol

0
None
TG17

Question 5 months ago on Introduction

Hi, awesome project, but I have a few questions. First, what amperage do the car door actuators run at? Also, instead of doing the whole audio-wire setup, could you simply plug the wires into a button switch and a power supply, replacing the arduino with a human pressing the button(this is really only concerning one drum)?

1 more answer
0
None
randofoTG17

Answer 5 months ago

I don't remember, and I don't own the drum anymore. The current is not very high. Likely much less than 1 amp.

If you did that, the drumstick would only travel in one direction, and the drumstick might have not enough recoil to bounce back on its own.

You might be able to work something out with a DPDT pushbutton switch (to work as an H-bridge), but I don't know if that would be good for the motor because it would never turn off in the opposite (recoil) position.

Alternately, you might be able to figure something out with a SPST pushbutton and a spring (for the recoil).

0
None
Kyle_Endsley

Question 6 months ago on Introduction

Hello. My name is Kyle Endsley. My peers and I are involved in an education program called STEM. Coming up in about 6-8 weeks, we will be competing in the STEM expo. That is where you engineer or design something that can help solve an issue. We have decided to choose musical engineering. Our plan is to build a robot type system that you can program to play certain things on a single drum. Our goal is that people can learn at home, on their own, and still being taught. Considering we are only in eighth grade, we are having slight issues designing everything we need. We were wondering if you could possibly send us a materials list and instructions for just one single drum. We don't have the time to do a whole system so we want to do just one drum. Our whole idea behind this is that practicing physically with someone is better than just watching a video. Saying all of that, we ask again, could you possibly send us a materials list and instructions for just one single drum. We would greatly appreciate it as it would immensely help us.

Thanks so much, Kyle, Carson, and Max

2 more answers
0
None
davemundoKyle_Endsley

Answer 6 months ago

Kyle, this is what I ended up doing (building just the snare) and got it working. Holler if you have trouble with it.

0
None
randofoKyle_Endsley

Answer 6 months ago

All of the drums essentially use the same electronics. In the instructions I say to buy 6 of everything. You only need 1 of everything. Basically, you will need an Arduino, motor shield, 1-2 motors, a 12V power supply, and a USB cable.


I would just follow the instructions for the snare drum part of my Instructable (and ignore the other drums).

The code will need to be rewritten to play particular songs.

However, the way my sample code is written, it should currently work with just 1 drum track.

Is the STEM expo a nation-wide event, or a local event?

0
None
davemundo

6 months ago

Randy, super awesome. I have the same issue as another poster...when I run the sequencer it's lighting up the Arduino perfectly, though the motors aren't moving. Any suggestions on what to try? I'm using the R3 Motor Shield, thx.

2 replies
0
None
randofodavemundo

Reply 6 months ago

Did you bend the shield's V-in so that it is not plugged into the Arduino socket and apply 12V power separately to the shield?

0
None
davemundorandofo

Reply 6 months ago

Sweet, got it working! We didn't have power plugged into the shield...that did it. Thx againa!

0
None
La GoldenA

7 months ago

hi randofo
congratulations for your project!
it is incredible

I'm interested in doing a robotic percussion set, but I'm a Linux user and I want to do it in pure data instead of max

how is the communication between max and the arduino?
Would it be possible to replace the max sequencer with one of pure data or even a baby seq with the integrated 4017 and use the same code?

Greetings and many thanks

Daniel

3 replies
0
None
randofoLa GoldenA

Reply 7 months ago

Basically, max is sending out numbers as serial data (a particular number to each drum). Every drum has a number which triggers it. Each program is listening to the serial stream using timer interrupts and taking in all of the numbers, all of the time, in the background of the sketch (interrupts are essentially parallel processing). If the particular drum happens to receive the number it is listening for over serial, it triggers (the rest of the numbers are ignored). You can have anything send this serial data.

If you use a 4017 decade counter, you will need to rewrite the Arduino code fairly dramatically to work with this new scheme. Or have a second Arduino handling the 4017 inputs, and then have that Arduino spitting out serial data. You are likely better off having a parallel in (shift-in) shift register than a decade counter, which is more similar to a parallel out (shift-out) shift register.

0
None
La GoldenArandofo

Reply 7 months ago

Thank you very much
I think the simplest thing will be to write my own code or use signage and send the signals directly from PD.
But that's why I ask you
How did you manage the opening and closing times of the actuator?
yesterday I was testing with values between 20 and 50 ms in each direction, and with a delay of 20 in between, but I could not have a regular movement, where the actuator always reaches the same point.
Any recommendation in this regard?

Greetings and many thanks

0
None
randofoLa GoldenA

Reply 7 months ago

I don't know. I have not worked on this and while and don't even have the drum anymore. I do remember, the recoil from striking the drum helped retract it. I always got fairly consistent results though.

0
None
U04601

11 months ago

I made one set of drum sticks to see if it might work to build a "little drummer boy" prop for my Christmas light display. Instead of using the custom program, I used a different sketch so that the drum sticks could read data from Vixen. Vixen is a sequencing program used to synchronize Christmas lights to music. It works well, I just have not finished making it into the final form yet.

Thanks for the inspiration, templates and instructions.

0
None
stang75

1 year ago

Dear Randofo,

Why did you have 2 sticks/motors and 1 arduino per drum?

Why not have 1 drum stick per drum, and therefore 1 arduino servicing 2 drums, thus halving the number of arduinos, motors and motor shields?

Thank you though - its a nice project and you've helped me a lot with my similar project.

0
None
RichGirlsDallas

1 year ago

Any tips on programming songs into the sequencer?

0
None
i.saralynn

1 year ago

Is there a risk of the motor (door lock actuators) burning out? Aren't they not designed to be triggered so often? Mine get warm fast. Also does anyone have a noise problem with their motors or know of a way to dampen them? Mine are practically as loud as the drum. Thank you!