loading

The Revenge of the Yellow Drum Machine (Arduino)

Featured
Picture of The Revenge of the Yellow Drum Machine (Arduino)
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.
 
 
Remove these adsRemove these ads by Signing Up

Step 1: Creating a stable base

Picture of Creating a stable base
2012-04-04_20-59-13_43.jpg
2012-04-04_21-20-20_86.jpg
2012-04-04_21-20-00_447.jpg

 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:  http://www.jpmsupply.com/servlet/the-658/Gearbox,-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:  http://www.solarbotics.com/product/gm10/  .  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:  http://www.solarbotics.com/product/gm10/  .  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

Picture of finish and test the hi-hat stick
2012-04-02_21-53-25_79.jpg
2012-04-02_21-55-56_279.jpg
2012-04-12_20-14-30_62.jpg
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

Picture of bass stick
2012-04-13_10-02-10_682.jpg
2012-04-17_08-14-05_925.jpg
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

Picture of snare stick
2012-04-17_08-14-27_351.jpg
2012-04-17_08-14-49_168.jpg
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

Picture of the sound sampler and zx sound sensor
2012-04-27_15-26-55_890.jpg
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.  (http://www.sparkfun.com/products/9964)  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.  (http://www.inexglobal.com/downloads/ZX-sound_e.pdf)  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

Picture of Done
2012-04-22_11-31-03_870.jpg
2012-04-22_11-31-22_408.jpg
2012-04-22_11-31-32_597.jpg
2012-04-22_11-31-41_774.jpg
2012-04-28_15-51-14_375.jpg
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.
carfin331 year ago

I have the issue of MAKE the original yellow drum bot was featured.

techiebot (author) 3 years ago
I can post the Arduino code if anyone is interested.
interested?!?!?!?! of course, i've been looking for this for ages!!!!!
depotdevoid3 years ago
That's all kinds of awesome!
What an adorable little robot!

Great instructions, too - thanks for all the videos. :D
techiebot (author)  jessyratfink3 years ago
Thanks. I agree that he has more personality than any other robot I've created.