How to make a Yellow Drum Machine
| Attachment | Size |
|---|---|
| YDMIIDIY.wav | 3.75 MB |
| YDMIIcode.bas | 21.93 KB |
Update: Minor correction, nothing new here ;)
On this page I will help you making your own "Yellow Drum Machine" (from now on: "YDM", though it can be in any color, of course :)
If you have never build a robot before, I would STRONGLY suggest that you start by making this (follow link) project instead. Many of the parts can be used in making an YDM afterwards.
What You will find on this page is free instructions in:
- What to buy
- Suggestions on where to buy it / links
- How to connect everything to everything
- How to mount everything on everything
- How to test everything
- Short examples of the programming, and tips on how to learn more.
Links on items below are made to save space on this page, and to give you an idea of where to buy the parts, or the chance to see what they look like, get more info etc.
Most likely you want to buy the parts somewhere else, perhaps in your own country to save money or get it faster.
Please use this forum to discuss with others on where to find the parts cheap / local etc..
Enough said :) Start here, shop, here is all you need:
(The items below here can be found in the Picaxe-shop)
1 x SRF05 Ultra Sonic Range Finder (the shop has a wrong image of it, it looks like this)
1 x Sampler board with microphone and speaker
1 x Picaxe start-pack. It comes with the choise of USB or Serial. I recomend USB. Note that the picture on the shop is wrong on USB-option, it shows serial. But if you buy the USB-starter-pack, your USB cable is in there. (Of course if you already have a cable or bought a start-pack before, only buy the parts you need)
1 x Battery Holder for 4 AA Batteries
(The items below here can be found at solarbotics.com)
1 x 2 Geared motors + 2 Belt tracks & 2 wheels that fit the geared motors + 2 wheels for freewheelin' They used to have these in Yellow, but at the time writing this, it seams you will have to do a Black Drum Machine, or find your tracks somewhere else..
(The items below here I suggest you simply find in stores near you)
1 x Melt glue gun, and plenty of glue sticks. (You will be very happy for this purchase later in your life)
1 x PerfBoard Is cheaper to get in your local electronics store, and if you cannot find one, you can easily do without, you will just have some more cables on a chip - read more and see pictures here
1 x roll of Double adhesive tape, the foamy sort,not the thin kind.
1 x about 50 centimeters of thin aluminum tube, or other light but unbendable material to be used as sticks. (Old areal / antennas can be used, and is what I have used, along with some thin fiberglass from kite-hobby stores. However, it is paramount that this is LIGHT material, and so an old "chrome" radio antennae can NOT be used, as it is some sort of brass covered with some sort of chrome etc. Also any non-hallow metal stick will not be usable, it will be way too heavy. Take this very seriously; find as light and unbendable material for the sticks as possible, it will affect drum-performance 100%.)
1 x Old speaker (to work like the top-speaker on mine, so look & size matters) I found the speaker used on the first YDM inside a satelite-speaker of an old cheap Surround system (all plastic) - the kind you get for your PC. For the second YDM, I did not have a such, so I painted half a table-tennis ball yellow, and inside it I mounted a small tiny plastic speaker form some toy. Note that different speakers gives extremely different volumes in a setup like this. If your speaker is too loud for the overall sound-mix, add a resistor on it. It is unlikely to bee too low, as this part is the one to get most straight voltage.
1 x about 1 meter flat stick / wood for the body
1 x Something to cut the sticks
1 x some super strong glue (2-component preferred)
1 x small piece of single thread (thin) (steel) wire (to hold things in place)
1 x some (cable) wire (to lead current)
1 x Soldering equipment
4 x AA cells/batteries - or better, preferred, recomended, what I use: 1 charger, and 4 rechargeable AA cells - the more mAh the better. Actually the rechargable batteries will feed the robot with lower power, and I recomend it for that reason as well - to ensure longer life of vital components such as the pager motors.
Stop shopping, start building!
.. But first you should practice your melt-glue gun! Remember, it is an artform to melt-glue!
- The smart thing about old areals / antennaes, is that there is always one size in there that fits. Cut that off in as long a piece as possible, and ensure that the wheels that do not have the fitting for the geared motors has a perfect free run on these. Better too loose than too tight.
- Assamble your belt-tracks if they came in parts.
- Attach the other 2 wheels on your motors (They come with a a screw, that will fit in and secure them firmly on the motor)
- Take some wire, and solder a piece on each of the 4 poles on the 2 geared motors.
- Cut 2 pieces of stick in a length so that the belt track will not stick out, we want the stick to be out in front and back.
- Cut a piece of the foamy double adhesive tape to fit each motor.
- Mount the motors so that when the belt is on it can just, but without touching, run free from the stick - and so that the belt does not stick more out than the sticks at the back.
What we want to build is this:
- But there are steps first, I suggest you just do it in your own way, here are some highlights:
You will have to find a way to make the wheels on the antennae sit in place, while being able to turn free. Some metal rings will do well, but this can easily be done with only melt glue. If you poke a hole in a piece of paper 4 times, and have one piece on each side of your wheel, there is no danger that the glue will make the wheel get stuck once it has hardened. And the paper can just be torn off.
Another way of stopping the wheels from sliding off the antennae, is to inject some super-glue into the hollow areal, and add a screw to lock it:
if you start by making a frame of 4 pieces of wood, it may be easier to estimate everything.
On the picture above, from the construction of YDMII, I have also added some screws. Double adhesive tape is however plenty, but I was doing my best to make a very strong robot with that.
Remember from your glue-gun lessons, that you start with mounting a fine line of glue, and then add more once you are sure all is in right place:
You want your tracks to be firm & tight. But not so they cannot easily flex. Too lose is better than too tight.
When done, cut a little piece of wood that fits between the motors (see top image in this paregraph). Add a little glue on the inside of each motor, and fit it in there.
On this stick, the microphone from the sound sampler board is going to be placed, if you want to make it 100% like YDM. You are going to have to cut the wires for that anyway, so if you prefer, you can glue the microphone on the stick before mounting it between the motors.
Seen from the side, you should en up with something like this:
Now, if you cannot wait, you can try to hook up the motors to a battery. Note that I am using a very flat 9V, and am connecting so that each only get 4,5V - If you do not know how to du this, then do not use a 9V battery :)
Here are some of my first run with this "chicken without a head".
.. OK.. this video may show me feeding the motors too much voltage :) FOR A SHORT TIME!
Next thing you want to mount is "the head".
First cut off some wire from the pager motors (the yellow and green ones). Reason: It is very light. If you use more heavy cable, the head might not turn so well. If you cut too much of the pager motors, you can always add some to them, they can use any cable. However, the ones I got, had very long wires attached, so taking off some 10 centimeters ("The lenght of your hand") will not matter.
Solder the cable on to the 4 places where wewill need them later:

Soldering such small cables (and even getting the plastic off) may be your first challenge :) (I used my teeth to get the plastic off, and pre-soldered the SRF05 to make it work)
Now the SRF05 has to "stand on a pager motor, somehow. See more pictures of YDM to get details.
What I did was I got some angled alloy, cut a piece, and drilled 2 holes in it to start. However - the SRF05's distance between the 2 cylenders is not - to my knowledge - documented anywhere. And so it is hell on earth to find the excact place to drill the holes. If they are too far apart, your robo will be cross-eyed to look at etc.
So, what I would do, is to take a piece of wood, and glue it on 90 degress on the SRF05, so it has "a stand.
Then I would glue this onto the pager motor. "Mount the pager motor in free air" (your lessons with the melt glue gun, remember? If you skipped them, you will be sad now, as your head will be a glue-mess). Perhaps first mount, to make sure the head is pointing forwards when in relaxed position - and is turning left / right in a proper manner.
Make sure not so leave glue on the little parts of the pager motor so it get's stuck :)
The head must be placed so that when the YDM is driving into a wall, it is not the eyes that it hits with first, but the flat front of the body!
Next thing is mounting the sticks.. You will need 2 component / super glue, steel wire and something to use for the sticks..
This picture should show you pretty much what to do; Mount with wire, add glue, done!
When the glue is hardening, you can move the whole thing around, so that the blob falls nice in place (and avoids touching or hindering what it should not of the moveable parts).
I recomend you not to do as I did, deciding the length of the stick before gluing. THis is a pure show off from my side; in every other occation I have made it too long first, mounted the whole thing, and THEN cut off when I was sure about the length!
Another thing you should not do, as I have done in the picture, is to use that antennae made of chrome and brass. I only did this at the "bass drum" - "tail" - and only because this was not the first time, so I knew what I was doing :)
You want to use lighter material. And you want to have it too long, and then cut it off after mounting.
And.. you want to make sure where to mount it (and thereby which way to turn it) before you mount the stick on the motor.
Tail goes in back :)
This one has glue inside, and a drilled hole has the wire through. Tape wrapped aroung to sort of finish up the looks.. in a way :)
Many times I add a screw or something else in the end to give a better punch.
What you want regarding length, is your stick to be as short as possible whils still hitting "on" the surface, and not "to" the surface. And then you want to make it as heavy in the end that it easily and fast comes back in position with the force of the spring on the pager motor.
Every one of my sticks where individually made, so I do not have any other "rules" than the fact that they should work :)
"Left stick" (seen from robots point of view - the lower front stick) should be placed so that the head can turn all the way without touching it.
"Top stick" should of course also be mounted in a way so that it can never touch the head.
It is allright if the sticks end up having different lenghts - in fact it is cool, we will compensate for it in the code.
I will now assume that you have mounted 3 sticks on 3 motors, and mounted the motors and the head on the body.
Please study pictures of the YDM to see how all functions should be regarding things I may not have mentioned :)
For the next to steps (The sampler board and the L293D motor driver in spare) you should only concentrate on the individual parts, not mount them, and not how to finaly hook them up to the Picaxe. We will look at the parts and get them working first, and then get back to them later, when all needs to be mounted and connected.
The Sound Sampler board
You should have a sound sampler board, and a picaxe 28x1 installed on a proto board. The motor driver should be inserted to the motor board. Please see here if in doubt / for further instructions.
You should also have your Picaxe editor up and running on a PC, and you should be ale to program your Picaxe (upload code to it from the PC). If not, please refer to the Picaxe manuals, the starter tutorials.
The sound sampler board should have 2 buttons (record & play) and a speaker and a microphone.
The next instructions will have to be done with temporary wires. This is for test, so we later just can "hook it up". You should make notes of what you learn, how to connect the things to make it work, that is the purpose of the following instructions:
- Hook up the sampler board with batteries, and play around with it. Get to know how it works; What happens if you press play twice, can you record while playing, when and for how long is the LED on etc. Just to get a feeling with it for what is to come
- Hook up the power to the Picaxe board (4 DD cells, preferable rechargeables)
- Cut off the battery holder from the sampler board, it is no longer needed for this project
- Hook up the Sampler board to the Picaxe's power supply, V&G to the right poles
- Test it is till working - you can record a sound and play back
- Cut off the "Play" button from the sampler board, you will et 2 wires
- Enter your Picaxe programming editor, write the following code and upload it to your Pic:
high 0
wait1
low 0
wait1
goto main
- Now try to take one of the wires from the sampler board's play button, and hook it up to output 0 on the Picaxe board. One of them will work, note which / cut off the other one completely.
- Your Picaxe is now "pressing play" once every second.
- Do the same with "record", so the sampler board can be completely controlled from the Picaxe.
You are likely to be going to cut off the microphone as well once we get to assembling, to make longer wires. Maybe you have already done so, to place it between the tracks.
The Speaker is going to be cut off as well. On YDM I placed it between the tracks.. BUT the sampler board is NOT playing on it's own speaker. It should be hooked up to the "top-speaker", alone for the fact that this setup is more cool.
The port used for sound out is going to the sampler board's original speaker. More on this later, when we return to the sampler board.
L293D motor driver in spare (The one not mounted on the Picaxe 28 board)
Try to read this about the L293D, and follow the links.
Cut out a piece of PerfBoard to match the chip, or do the following with just lots of wires:
- Power the L293D from the Picaxe board
- Hook up the "head"'s pager motor to one motor-driver-set from the L293D
- Hook up the L293D to 2 Picaxe outputs, let's say 0 & 1
- connect everything so that you can write the following code, and make the head turn to each side & look forward:
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
Now, try to download the code atached, and hook up like written in there :)
Best of luck on your project!




@ Tue, 2010-06-08 16:22
Sorry if this has been
Sorry if this has been asked, but your links to the picaxe-shop seem to not work for me. I was able to find all the components on other pages, but I am struggling on the sampler board with mic and speaker. Anyone have a good link to one of those?
Thanks
And awesome robot
@ Tue, 2010-06-08 20:36
Search for sound in the
Search for sound in the Picaxe shop.
I did, and this link came up:
http://81.134.141.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies/Products/PPM155
:)
@ Wed, 2010-06-09 00:19
Thanks. After seeing it I
Thanks. After seeing it I looked for something in the states, but I couldn't so I went ahead and put in my order through that site. A little higher on shipping and I will probably have to wait a few weeks, but it will be worth it.
Thanks again for the quick reply.
@ Wed, 2010-06-09 01:02
Sorry
If you've already ordered then this post is too late. Hopefully it'll help others in the future.
AllElectronics.com has a hackable digital voice recorder in the form of one of the dolls from Saw III. Supposedly records 30 seconds of audio and plays it back with a button poke. Poking the button from a microcontroller should be a simple with a transistor. They're apparently fairly old stock, but they still have them, and they're only two bucks (though shipping is at least $7).
@ Tue, 2010-01-05 00:17
Thanks for inspiration
Thanks for inspiration. I stumbled on a video clip of YDM a few months ago and finally decided to make my own drum machine. Here's what I managed to put together after a couple of weeks work.
Software isn't perfect yet but it's already working. First performances are here:
http://www.youtube.com/watch?v=tbUrY4hoPqI
http://www.youtube.com/watch?v=FEFZTygDRhc
@ Tue, 2010-01-05 10:54
Sweet!! You should post this
@ Tue, 2009-07-14 07:51
where have you connected
@ Tue, 2009-07-14 09:30
Please download and read the
Please download and read the code.
It says:
Digital out:
0 Speaker (not sampler board, speaker to make clicks and beeps)
1 High Hat (HH)
2 Snare Drum (SD)
3 Bass Drum (BD)
4 *
5 *
6 *
7 * 4-7 is used to control the on board motor driver that drives the belt tracks (high 4 low 5 'Left Belt Reverse - high 5 low 4 'Left Belt forward - high 7 low 6 'Right Belt forward - high 6 low 7 'Right Belt Reverse)
Digital in / Port C:
0 Echo (pulse return) from SRF05
1 Trigger to SRF05
2 Record on sampler board
3 Playback / sampler board
4 *
5 *
6 *
7 * 4-7 is used to control the extra motor driver that drives the head to look to each side, and the extra option, "Tee" (see above) (low portc 4 high portc 5' Head Left - low portc 5 high portc 4' Head Right - low portc 7 high portc 6' Tee Left - low portc 6 high portc 7' Tee Right)
I am not going to answer you on every connection, sorry.
@ Mon, 2009-07-13 12:56
where have you connected
@ Mon, 2009-07-13 15:20
To the belt tracks
@ Mon, 2009-05-18 08:38
Hi.I've to ask you again.
Hi.
I've to ask you again. Where do you get this gread treads or chains, i don't know the right word. I'm from Germany and I've been searching for treads like these. Thanx
Protagonist
@ Mon, 2009-05-18 09:45
Hi, and thanks for asking in
Hi, and thanks for asking in here ;)
I got them from Solarbitics:
http://www.solarbotics.com/motors_accessories/treads/
@ Mon, 2009-05-04 13:08
how to connect.
@ Mon, 2009-05-04 13:33
Which wires? There are
Which wires? There are many!
Look in the code for specific info.
@ Tue, 2009-04-21 22:17
Thankyou
brilliant robot fritsl.
this was the robot that brought me to letsmake robots.
keep building them as good as this
Tom J
@ Sun, 2009-03-22 01:00
Awsome
@ Sun, 2009-03-22 12:51
Now that just might get to
Now that just might get to my head :D
(Thanks!) :)
@ Sun, 2009-04-05 20:33
Easily the coolest robot ive
@ Sun, 2009-02-22 17:47
Download code?
@ Sun, 2009-02-22 20:44
At the very top of the page,
At the very top of the page, just below the main image :)
@ Sun, 2009-02-22 03:18
Awesome to see this guy on
Awesome to see this guy on the front page again, It's really what got me into this group!
And thanks btw for posting the code. It's interesting to compare how our code differs, I wasn't too far off from yours, so I guess that means I was doing something right! ^_^
@ Sun, 2009-02-22 00:48
SUPER COOL
@ Mon, 2008-11-17 17:36
L293D for the head
@ Mon, 2008-11-17 22:19
No, Portc, which are the
@ Mon, 2008-11-03 23:54
hey fristl are you ever
hey fristl are you ever going to continue this tutorial?
@ Sat, 2008-11-15 12:24
Yes!
@ Tue, 2008-11-04 01:10
Also, everybody I am asking
.
@ Sun, 2008-10-19 11:34
Since you asked...
You commented earlier you were not happy that we haven't appeased you with a video action shot.
I took your starter code for recording, turning the head, and whatnot, and upped it a notch just to see what I can do with the little programming knowledge I have. http://letsmakerobots.com/node/2528. Hope this helps! :)
@ Sun, 2008-10-19 14:07
Hmmmm, so you didnt need any
Hmmmm, so you didnt need any capacitors or any other component electronics soldered onto your L293D, interesting...
Can you tell me your connections percisely?
Maybe in a style like this: http://letsmakerobots.com/node/2074
if its not too much?
@ Mon, 2008-10-20 06:50
There aren't any connections
@ Wed, 2008-10-08 23:54
is it hard to macke it
@ Thu, 2008-10-09 09:15
Jarkz!
@ Sat, 2008-10-18 18:31
Since you are using a
@ Sat, 2008-10-04 21:17
FritsCode
In regards to your code on your YDMII
1. What output did you use for the playback of your Recording Board?
2. Same but what output for the record button?
3. For the Recording board, does it matter which V&G I connect to on the Picaxe? Would this affect the code i mean
4. For the spare L293D for the GM10s, you used four GM10s, all with one L293D, which GM10 did you use for which port on the 2nd L293D
5. And finally, which output/V&G did you use for the spare L293D (would you have a schematic of the L293D board you used?
@ Sat, 2008-10-04 21:37
A's :)
1: portc 3
2: portc 2
3: I do not know which I used. I just tried both, and used the one working.
4: I am not 100% sure I understand..? 2 L293D's: One in the main board, and one outside. The one in the main board takes care of the belt track. The one outside takes care of the "head", and has one in spare. On YDMII, that spare is used for the "tea-cup-thingey" on the long shiney stick at the back.
5: It was controllng "the head", with outputs portc 4 & portc 5. I do not have any schematics, but they are all over the net. Also see http://letsmakerobots.com/node/662
@ Sun, 2008-10-05 05:01
Well then what are the
And what I meant was how did you connect the spare chip to the board? (outputs, V,G, etc) (if ouputs then which pin)
And which pins on the spare chip did you connect to which GM10s/on the Picaxe board?
Also what did you use the digital inputs for?
Recording module working
http://www.youtube.com/watch?v=J0qE7YIf7FE
I am really confused about the drum sticks :/ (according to the pdf for the L293D only two motors can be controlled each chip) Yet how did you do it with four? O.o
@ Sun, 2008-10-05 07:03
Several one way drivers
@ Sun, 2008-10-05 09:47
Yeah, they have springs in
@ Thu, 2008-11-20 01:42
how do you turn to pager
@ Mon, 2008-10-06 01:16
So what you are saying is
So what you are saying is that the "Drumming GM10s" use the outputs on the Picaxe Board?
this is sooo confusing... why dont the drumming GM10s need to be on the L293D but the panning one does??
@ Tue, 2008-10-07 22:43
The motors have springs in
@ Wed, 2008-10-08 00:03
So in order to control the
@ Wed, 2008-10-08 07:35
As I wrote to you just about
As I wrote to you just about 200 times on mail; This would be so much easier if you would just follow the instructions.
The motors does not have black / red wires, but green / yellow.
Yes, I just hook them up to the picaxe. Which to which depends on how you turn each motor - you do not want it to hit backwards, it is just to be hooked up so that it is moving the right direction, hitting with the stick on the surface, not on itself.
@ Wed, 2008-10-08 12:25
I guess mine are different
I guess mine are different then:
@ Thu, 2008-10-09 09:14
OK, your wires are red /
@ Thu, 2008-10-02 12:31
I think theres been enough
@ Thu, 2008-10-02 13:40
I agree that there is a lot
@ Thu, 2008-10-02 23:11
Your right, I have just
Your right, I have just finished with the Recording Module, dam it was wierd because the playback button was on the PCB itself...
So how are you able to control three GM10s with one Motor Driver?@ Fri, 2008-10-03 22:50
Q: So how are you able to
Q: So how are you able to control three GM10s with one Motor Driver?
A: There are four GM10's, two motors for the belt tracks, and two motor drivers. If you read the instructions and follow them step by step you should get your answers. Thank you.
@ Sat, 2008-09-13 20:54
What is this: The white
What is this:
The white thing, the black box, and the clearish thing the yellow band is wrapped around?
Oh and the glued, round black bead, what is this? :P