Introduction: The Revenge of the Yellow Drum Machine (Arduino)

About: I am a theatre designer and technical director. I work at Merely Players, a small non-profit theatre group in Southwest Colorado. Check us out on Facebook: Merely Players-Durango. You can also see some of …
I was inspired by Frits Lyneborg's Yellow Drum Machine.  Watching the videos, it has such personality!  I have also been thinking recently about sound and robotics.  I did some research looking for a version of the robot that used the Arduino as a brain, but couldn't find one that seemed so responsive and alive as Frits' version.

I have attached the Arduino code for the robot.  You will need to create a folder in your Arduino library and put both files in the folder.  I separated the data for the "songs" because the code just got too long.

Step 1: Creating a Stable Base

 For the robot base, I used a Six Leg Walking Gearbox Kit # 21-135, which is available from several different sources.  Here's one source:,-Walking,-Elenco,-Kit,/Detail .  

I had previously created an Arduino-based robot that used an h-bridge motor control chip to run the motors.  It also has a 6volt 1000mAH rechargeable NiCad battery that was rectangular and flat for power.  But that's all it had. 

I love spheres, so I took an acrylic Christmas tree ornament from Hobby Lobby and cut a hole in the bottom to pass wires through.  I used 1 1/2 inch #6 bolts and nuts as standoffs to hold the sphere above the six-legged base.

But once I created the first hi-hat stick, I realized that I had no stable place to attach it to.

I had some 1/8 inch thick plastic sheet laying round, so I marked out a stretched hexagon to use as the base.  I cut it out with a dremel and a plastic cutting blade.  I attached it to the base with #6 machine screws.  The base has some places that will take a machine screw.

Step 2: Hi-hat Stick

I decided to make the hi-hat stick first, because it it the thinnest.

I am using solenoids because the geared pager motors that Frits used cost $14 each from Solorbotics:  .  Well, $12 plus shipping.  I bought these solenoids from American Science and Surplus a very long time ago for about $1.50.  There are some solenoids available for a reasonable amount.  Allelectronics has one I've tested:  .  It is strong enough at 7 volts using an RC car's NiCad rechargeable battery to easily pull a drum stick.  These solenoids only cost $1.50.  I only did a little experimenting with this one, but I cut down the spring and bent back the flat metal and it looked like you could use it for a stick actuator pretty easily.

I cut pieces of square brass tubing for the fork.  The fork provides a pivot point for the hi-hat stick.  I use needle files to roughen up the areas where the brass connects.  Then I put a little Everclear  (pretty pure alcohol) on the joint to clean it.  Then I light up the butane pen torch and apply heat.  Once the joint is hot, I touch the solder to it and get a pretty strong connection.

Step 3: Finish and Test the Hi-hat Stick

I was worried about the stresses on the little dowel at the pivot point.  The hole for the #6 bolt was pretty big compared to the diameter of the dowel, so I decided to sheath the dowel in a piece of square brass tubing to strengthen it.  I used a little needle file to smooth out the hole so that the bolt wouldn't bind.  I also used epoxy glue to strengthen the connection.

The second photo shows all of the pieces ready to assemble into the hi-hat stick actuator.  The last photos show clearly how the end of the solenoid looks.  The third photo shows how I used brass wire to wrap around the solenoid.  The wire was then bent to attach to the lower hole in the hi-hat stick.  A little tweaking made for a smooth and quick action.

At this point I have the hi-hat stick solenoid working. It is triggered by the PING((( sensor as a test. The rear platform sticks out to allow room for the bass stick and solenoid.  The PING((( sensor is attached to a little 9 gram servo mounted on the robot's front.  It scans the PING((( sensor back and forth.  Later code compares readings when it is looking for an obstacle or looking for something to play on.  Obstacle avoidance looks for the most open area, then turns the robot to face that direction.  Looking for a surface to drum on does the opposite, trying to find the nearest object.

Step 4: Bass Stick

The bass stick posed some problems.  I tried to mount the solenoid horizontally, but it didn't work well.  I ended up with a vertical mount.  The fork on the end of the square brass tubing fits onto the solenoid end securely.  The solenoid makes a strong and quick sound when the robot is on a hard surface.

I cut a hole in the plastic bed just behind the battery at the rear of the robot.  I was afraid that the weight would throw the whole robot off balance, but it hasn't created a problem.

I use a dremel tool with a wood cutting blade to make a notch in the thicker wooden dowel.  The dowel is about 3/4 inch in diameter.  The spring in the solenoid was strong enough to pull the dowel back into a horizontal position after it hits the floor.

Step 5: Snare Stick

Adding the snare stick was really the same as the hi-hat stick.  I used brass rod to bend around the solenoid and then attach to the dowel.  Frits advised me to shorten the two front sticks.  I reduced their length to make them respond quicker when the robot is at the correct distance from the drumming object.

Frits' code includes using the front servo to move the PING((( sensor back and forth when drumming.  This can create some nice drum beats when the object is hard enough to resound.

Frits' documentation includes detailed instructions on how to tune the robot.  The code looks at the instructions sequentially.  That means that instructions that are acted upon higher in the code happen first.  Later instructions happen at the end of the cycle.  By moving the solenoid control higher or lower in the code you can fine tune how the robot plays.

Step 6: The Sound Sampler and Zx Sound Sensor

I wanted to add a sound sensor so that the little bot could have more input from its surroundings.  Frits wrote that the bot should respond to its environment and choose songs to drum based upon it.

I had already added a photoresistor to the top of the dome to take light readings and record them.  Adding ambient sound levels seemed like another idea to make it more responsive.

I first tried using the sound sensor from Sparkfun.  (  However, I could not get it to work.  Reading the forum, I found that many others had trouble with it.  I attempted to replace a capactior on it, to no avail.  For once, a call to the Sparkfun tech guys also didn't help.  Their only suggestion was to check the solder joints to the wires I added.

One Sparkfun forum writer suggested the ZX-Sound Module.  (  The circuit only uses 7 resistors and 3 capacitors an electret mic and a TLC272 chip.  It works very well.  So I added the circuit and all works well now.

Step 7: Done

The little guy is merrily roaming my studio space and occasionally drumming on walls, file cabinets, and the like.

This was a really fun project because the robot appears to have such personality.  I am indebted to Frits Lyneborg for his original Yellow Drum Machine, which is true genius.

Hurricane Lasers Contest

Participated in the
Hurricane Lasers Contest