Make your own Automated, Self-Seeking 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!
Gather 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
Tools:
Pliers
Soldering Iron
Mini Philips Screwdriver
Mini Flathead Screwdriver
Wire Cutter/Stripper
Patience
Assemble 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.
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.
Motor Driver:
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
Get your IC Board and 16pin DIP, solder on the DIP into the middle of the IC board like this:
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
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?
Recording Module:
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
Sonar:
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
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 want yours sturdy) onto
the base of your bot.
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
Finale
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)
http://www.youtube.com/watch?v=o99HX5-J5Oc
I will edit this later to share how to incorporate the srf05 seeking into code