Let's Make Robots!

How to make a Yellow Drum Machine

fritsl's picture
Learn how to make a "Yellow Drum Machine"
Time to build: 
50 hours
Cost to build: 
$175
AttachmentSize
YDMIIDIY.wav3.75 MB
YDMIIcode.bas21.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.


This instruction is made with what ever pictures and other material I had available - I have not made a new machine and taken pictures of it. Therefor you will find different robots posing as models - and the guide will be kind of rough, as I cannot show you every detail.

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)

2 x L293D Motor Driver

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..

4 x Small geared pager Motors

 

(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.
IMG_3438.JPG?imgmax=512IMG_3441.JPG?imgmax=512

 

 


What we want to build is this:

 

IMG_3446.JPG?imgmax=512

- 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.

IMG_3444.JPG?imgmax=512

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:

IMG_3628.JPG?imgmax=512

if you start by making a frame of 4 pieces of wood, it may be easier to estimate everything.

IMG_3625.JPG?imgmax=512

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:

IMG_3629.JPG?imgmax=512

You want your tracks to be firm & tight. But not so they cannot easily flex. Too lose is better than too tight.

IMG_3631.JPG?imgmax=512

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:

IMG_3449.JPG?imgmax=512

 


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:

Billede_4.png

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!

IMG_3643.JPG?imgmax=512

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 :)

IMG_3490.JPG?imgmax=512

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:
main:
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!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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

fritsl's picture

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

:)

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.

Rudolph's picture

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).

nuumio's picture

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.

robo_038_lmr.jpg

 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

 

fritsl's picture
Sweet!! You should post this as a robot (see front page, top left)
where have you connected the three geared pager motors.
fritsl's picture

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.

where have you connected the A and B of picaxe.
fritsl's picture
To the belt tracks

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

fritsl's picture

Hi, and thanks for asking in here ;)

I got them from Solarbitics:

http://www.solarbotics.com/motors_accessories/treads/

where to connect the small motor wires
fritsl's picture

Which wires? There are many!

Look in the code for specific info.

tom_jones's picture

brilliant robot fritsl.

this was the robot that brought me to letsmake robots.

keep building them as good as this

Tom J 

Semicton's picture
I think this has to be one of the coolest robots I've seen since I started viewing other peoples project and attempting to make my own.  What a great idea:  A drummer bot.  You're on the top of my 'most admired' list for this.
fritsl's picture

Now that just might get to my head :D

(Thanks!) :)

Ironman420's picture
Easily the coolest robot ive ever seen!
Mattman's picture
I must be blind from working 16 hours straight yesterday - I don't see the link to download the code... Sorry :-(
fritsl's picture

At the very top of the page, just below the main image :)

Zanthess's picture

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! ^_^

McDuino's picture
first ive seen of the YDM, must say its a better drummer than me :P
Vansu's picture
So the pager motor hook up to a  set of L293D and another set from L293D to the output 0,1 right?
MaltiK's picture
No, Portc, which are the inputs. Ya see, the outputs on the Picaxe 28x1 are supplied by the transistor array, and the transistor cannot be connected to the L293D, as this H-Bridge is somewhat of a transistor, and they will conflict. You either need to connect the L293D to inputs on the board, or if you wanna use outputs, use the TTL ports (between the PIC and the Transistor Array)

 

TofuRobot's picture

hey fristl are you ever going to continue this tutorial?

fritsl's picture
Yes!
MaltiK's picture

.

Zanthess's picture

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! :)

MaltiK's picture

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?

Zanthess's picture
There aren't any connections yet because I haven't gotten around to soldering them. It was all set up on the breadboard to make sure I knew what I was doing before I mangled everything with my soldering iron.
how do u macke an drum machine its do locks hard and i dont know what parts im gona use and how to build so can u help me to macke wit an video and picture of the parts plz
fritsl's picture
Jarkz!
MaltiK's picture
Since you are using a Darlington Transistor, according to the datasheet, it would interfere with any chips connected via digital outputs, why does yours work? It states that you are to use the TTL connections (Chip to Chip talk)?

 

MaltiK's picture

 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?

 

 


 

fritsl's picture

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

 

MaltiK's picture
Well then what are the drumming GM10's using for control? if only the head you say uses the L293D?

 

 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

robologist's picture
Don't have Fritsl's code for YDM, but I think the PICAxe 28 board has line drivers or some such, a darlington transistor array driven by PIC pins. Those little gearmotors have a spring return on them so to strike something, you'd activate that pin (guessing a high) to turn on the transistor, to "pull current down" through the motor. The other lead of the motor is attached to +5 (or wahatever) volts.  Then make the PIC pin low again to shut off the transistor, to allow the spring to return the motor (stick) back to drum again. So if you don't have to drive the motor both directions, just use one transistor (advisable flyback diode across the motor, but probably ok here without) to switch it on. The drivers in the L293D can also drive a motor each, probably on high side or low side. The motor with one lead attached to power, other to driver is called "low side" drive where the motor is "pelled down" to turn on. The "high side" drive is with one motor lead attached to ground, the other to the driver, and the motor is given current from the driver. THe L293 has both high and low transitors, so can do either high or low side drive.
fritsl's picture
Yeah, they have springs in them, the little motors. That makes the stick go back :)
Vansu's picture
how do you turn to pager motor on and off when I connect them to output 1?
MaltiK's picture

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??

 

fritsl's picture
The motors have springs in them. They bounce back. But in order to make them turn to the other side before bouncing back (the "head") - you need a motor controller. The sticks do not need one.
MaltiK's picture
So in order to control the Drumsticks, can you just hook them up to an output? (red-output, black-ground? or no?), will i need transistors?

 

fritsl's picture

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.

MaltiK's picture

I guess mine are different then:

 

Photo0160.jpg

 

fritsl's picture
OK, your wires are red / black. But the colors does not matter, they could be blue and purple :)
MaltiK's picture
I think theres been enough User made Drum Machines for you to continue this tutorial, dont'cha think? :)
fritsl's picture
I agree that there is a lot of people starting the project - but I am yet to see anyone who finished with the instructions, and showed the video as asked for.. I think it is reasonable to see if anyone actually goes all the way before I spend more hours on the rest, dont'cha think? :)
MaltiK's picture

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?
fritsl's picture

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.

MaltiK's picture

What is this:

 

Untitled-3.jpg

 

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