Introduction: How to Make Your Own Drumming Bot!!

This robot was inspired by a robot that was granted tons of attention, called the Yellow Drum Machine, I will link to it later when I can find it. This robot uses tank treads to roam around, it uses its ultrasonic sonar to find impediments, It will determine the hardness/softness/echo of an object with sonar. Once it finds an object worth playing on, it will snake into place, then, using motorized drumsticks, make a short 20-60 sec. beat. Using an external recording/playback module, it will record 20sec of the beat, and play it back in sync with the continuously playing beat (with the robot still playing). Upon completion of this minute long jam session, it will roam away, and attempt to find another, in an endless loop. Very fun to watch/listen!

Step 1: Materials:

1 Gear Motor and Tread Package-$39.99 BuyBuy

4 GM10 Geared Pager Motor- $39.00 Buy

2 L293D Motor Driver Chips- $8.00 Buy

1 9V Recording Module- $10.79 Buy

1 Dual General-Purpose IC PC Board Buy

1 16-Pin Retention Contact Buy

1 28 Pin Project Board Picaxe 28x1 Buy

1 SRF05 Ultrasonic Range Finder Buy

A Bunch of 2-3mm White Sintra, or any other Building material you prefer Buy

1 SRF05 Housing Bracket Buy

A Bunch of AA Batteries

A Big Speaker

Some hollow aluminum tubing

A Bunch of 2.54mm Header Pins

Many Many Many Jumper Wires, both F/M and F/F

Step 2: Tools

Pliers
Soldering Iron
Mini Philips Screwdriver
Mini Flathead Screwdriver
Wire Cutter/Stripper
Patience

Step 3: Gather Materials

Step 4: Connect All the Treads

Self explanatory, assemble the tracks, and screw in the wheels into your geared motor that came with it. On the other end of the treads, hot glue on one of the aluminum tubing so that it spins freely, just like the picture.

Step 5: Motors

Solder one wire to each of the slabs on the motors (two for each). The previous picture should do the justice for this too.

Step 6: Motor Driving

Plug in the L293D into the project board, and solder on the four wires from the motors to the A-B terminals. Now write the code in your programmer:

high 4

low 5

press F5

Switch the two numbers around until both wheels turn forwards


Step 7: Motor Driving #2

Get your IC Board and 16pin DIP, solder on the DIP into the middle of the IC board like this:

Step 8: Connecting the Second L293D to the Picaxe

Connect the GM10->L293D->Picaxe board like the picture below and run the code:


main:
high 1 low 0
wait 1
low 1 low 0
wait 1
low 1 high 0
wait 1
low 1 low 0
wait 1
goto main

Step 9: Drumsticks

Hot Glue on two of the GM10s, two aluminum tubings, each the same length, you want ones that give it a good "ding" when you hit something hard against it. And the third is gonna be the bass drum, so this will be (thicker?), or will just produce a deeper sound, I am not musical, I dont know :). Pretty self explanatory enough to go without pictures?

Step 10: Recording Module

The fun part:

Cut the V+G from the recorder module, you want it long, so keep it long
Connect the V+G to the Picaxe's V+G ports
Cut one of the recording modules' wires, and connect the non cut one to a Picaxe output 0
Cut one of the playback modules, and connect one to another output 1
***IMPORTANT: if your playback is a button, then take off the button, exposing the membrane, and follow the board imprint from there, should lead you to a tiny hole, the manufactor uses this to test it to see if its working, solder your wire into that, this is your single playback wire (connects to output)****

Run the code:

main:
high 0
wait1
low 0
wait1
goto main



Step 11: SRF05

Solder on 5 header pins onto your SRF05 (came with) refer to the datasheet if you are unsure which side to solder to

http://www.robot-electronics.co.uk/htm/srf05tech.htm

And connect the srf05 to the picaxe and run this code:

symbol trig = 3
symbol echo = 6
symbol range = w1

main:
pulsout trig,2
pulsin echo,1,range
let range = range * 10 / 58
debug range
goto main

your srf05 should be blinking red, good

Step 12: Actually Assemble the Bot

Glue up the Sintra into a bookshelf-like design (mine had two stories) and hot glue this (or use an L-Bracket if you wat yours sturdy) onto the base of your bot, looking like this:

Step 13: Test #1

Connect one wire of each drumstick to an output on the picaxe (0-7), connect the other wire of each to a V+ terminal (V1)
Connect the Playback to one output, and the record to another, as well as the V+G wires from the board
Connect the spare L293D, and 4th GM10 to that chip and execute the code:

main:
high 0
pause 100
low 0
pause 100
high 1
pause 100
low 1
pause 100
high 2
pause 100
low 2
pause 100
high 3
pause 100
low 3
pause 100
high 4
pause 100
low 4
pause 100
high 5
pause 100
low 5
pause 100
high 6
pause 100
low 6
pause 100
goto main

This is just a test, to make sure everything works, not the final beat :P
and you should get the following video:


minus the dog+and family yelling in the background

Refer to this diagaram:

Step 14: Finale

No I am not going to pose the final code for the project, so don't get your hopes up, but I will tell you valuable information. Use that last test you did (step 12) to see which command controls which drum/record/playback, and make it rhythmic using various time differences (pauses, followed by the number is the time in Ms)
Try to make, say the output of the recording module start in the beginning of a session (high ) and end in the end of a session (low _)
and then in the next session, make the drummer playback the beat over the next session (high, low, etc)

I will edit this later to share how to incorporate the srf05 seeking into code

I will not share the code, don't ask :) Have fun!!


SANYO eneloop Battery Powered Contest

Participated in the
SANYO eneloop Battery Powered Contest