Professional Documents
Culture Documents
How To Make An Electronic Drum
How To Make An Electronic Drum
Publish (/about/create.jsp)
(http://www.autodesk.com/)
Featured: Robots Class (/class/RobotsClass/) Gardening (/howto/gardening/) For Teachers (/teachers/)
Mother's Day (/howto/mothers+day+gifts+breakfast+flowers/)
HOW TO MAKE AN ELECTRONIC DRUM.(not a MIDI Sampler) Aka
KIDU by enjoyneer (/member/enjoyneer/) in arduino (/tag/typeid/categorytechnology/channelarduino/)
Download h (/id/ELECTRONICDRUMnotaMIDIsamplerakaKIDU/) 11 Steps .
About This Instructable
enjoyneer
(/member/enjoyneer/)
Follow 17
(/member/enjoyneer/)
More by enjoyneer:
(/id/ELECTRONIC
DRUMnotaMIDIsamplerakaKIDU/)
(/file/FNOHCHJHFONDD5H/)
Add instructable to:
; Group
This instructable is going to be
about building an electronic drumset(not a MIDI sampler.),using an Arduino Related
UNO R3.,
similar to a VDRUM.It is code named KIDU. Adapting electronic
percussion projects to
(Kompact Intelligent Drumming Unit).Some of the items used may be names
interact with my Lunetta
differently in your locality.ill try to put as open patch CMOS n...
many pictures as posible. (/id/Adapting (/id/Adaptingelectronic
Musical MIDI Shoes
I saw many instructables based on arduino and MIDI outputs.i thought of
(/id/MusicalMIDIShoes/)
making a completely independent instrument(ie with out a laptop). by thobson (/member/thobson/)
Advantages: (/id/Musical
Universal sound reactive
(unlike V DRUM); lights for drums / guitar
* Very portable and easy to assemble. (/id/UniversalSound
ReactiveLightsforDrums
(the whole structure fits in a guitar case :))
(/id/Universal Guitar/)
Homemade Electronic Drum
Kit (/id/Homemade
* The user can decide which sound each
ElectronicDrumKit/)
drum sounds like.One can even record by Hyoobaloinz
a sound and upload it into the device (/id/Homemade (/member/Hyoobaloinz/)
Arduino Controlled
and make that sound from a drum.
Animatronic Skeleton Rock
(sound quality16 MHz,16 bit mono) Band in progress
* You can use as much storage space for saving the sound files., (/id/AnimatronicSkeleton
RockBandinProgress/)
(/id/Animatronic
depending on the size of the SD card you use.
So a lot of sound styles can be included.For the sake of simplicity .,i used
5 styles of sound.
* There is no basedrum. Instead the kick pedal
contains a trigger.,that simulates a base kick.
* Total cost just a fraction of what the original
V DRUM will cost.I made it under 6000 rupees(~ $107).
* There are no unnecessary buttons and knobs for selecting the drum styles.
I have programmed it in such a way that.,
The drums themselves acts as the buttons.in this example.,i have used the
snare
drum to trigger the count,.and the tom1 drum as the select key.
* There is no LCD display to guide you through selecting the drum style and the
tones.
but KIDU will narrate every step.,and what style you have selected.
For example.,When KIDU startsup.,it asks you to enter the style count
using the snare drum.Then you hit the snare drum with the drum stick
less than 5 times,to select a drumming style,numbered from 15.
General Advantages :
(unlike acoustic drums)
*KIDU can play a large number of percussion styles.,depending on the
sounds that you have saved in it.
*You can directly record the audio output.,on to any device that can
record an audio signal,with out any ambient noise.for an acustic drum
you may need a studio to record it ambient free.
*You can practice it with out disturbing anyone.,by simply connecting
a 3.3mm headphone jack into the output socket.
*You can individually adjust the sensitivity of each of the drums through
program or a control knob.FSOS(for the sake of simplicity)i have excluded
the pots.I control their sensitivity by adjusting the threshold value in the
program
prior to upload.
Step 1: Stuff Needed
(/file/FRTOBI3HFONDD70/)
(/file/FWSUCSHHFONDD60/) (/file/FB7USWVHFONDD69/)
*ELECTRONIC STUFF
# Arduino UNO R3
# SD card shield
# USB cable
# 5 V adaptor
# Micro SD card
# Piezo electric transducer(aka piezo disk)
# ribbon wire
# single core shield wire.
# Hookup Wire.
# Parallel PCB.
# 2 contact jumpers.
# 3.5mm audio jack (male n female)
# Resistors 1M & 10K (around 10 each)
#
* HARDWARE STUFF
# PVC PIPE(3.5cm and desired thickness) 3 meters
# PVC Tjunctions
elbows
couplings
stopper
# Thermocoal(real thick).
# Rubber like material(honestly dont kno its fancy name.:)
any material which gives sum rigidity and bounce.i bounght it from a
footwear manufacturing place.they use it for making the shoes soul. )
# Rexin(this material will be the artificial membrane.i used a black cloth
like material.u can use anything to make it look cool.u can even use leather
.it wont affect the way your drum sounds.)
# sumthing that looks cool..,to put your circuitary in.(i used an old laptop
coolerpad.lot f room inside n looks awesome.)
#
* TOOLS NEEDED
# Soldering equipments.
# Cutting plier
# Wire Stripper
# Sissors (heavy duty thing)
# Thermocol cutter
# Hack saw
# Measureing instrament.
# Fevicol SR & SH(indian manufacturer for glue used for working with
wood and footwear industry.u can use what ever is used
for the same in your country :P )
# Insulation tape.
# Ducttape or cello tape or masking tape.
# sand paper(of variying grain size for metals.)
# Mseal(a material that can be molded in to any size and sticks)
# Spray paint.(Your choise.i used black.)
#
* SOFTWARES NEEDED.
# Arduino programming environment.
# SOX (command line format converter)
# FL Studio.
* OTHER STUFF NEEDED.
# A PC to program the Arduino.
# An amplifier to Hear the sound.
Step 2: WORKING
(/file/FQ2B63OHFPT9FWN/)
(/file/FY6AUP2HFPT9FXP/)
(/file/FMKOQ56HFPT9FWM/) (/file/FDG0X93HFPT9FWS/)
WORKING
In this step,ill try to explain the working of our E DRUM (or KIDU as i call
it) as simple as possible.Il just briefly talk about the steps for
making each subsystem.,and then ill detail them in the following steps.
Since we are working on an electronic drum.,the mechanical impulses(playin
the drum).,needs to be coverted to electric signals.this task is done by the piezo
discs.
Each of the drums that we are make will contain 1 such piezo sensor.
When ever a mechanical pressure is applied on the disks.,an electric signal
whose magnitude is proportional to the pressure is produced.
This signal is sent to the Arduinos analog pins(via pulldown resistors.,which i wil
explain later)
.Since there are only 6 anaog pins on an UNO.,the no of drums and cymbals
used wil be restricted to 6.
We use digital pins to trigger the base kick and the choke.
The arduino is also linked to the SD Card shield.,with the SPI pins.
(ie pins 13 to 10).
Now the program.As you might already know.,the arduino's analog pins.,convert
their
analog inputs to a value between 0 and 1024.We program it such that if this
value exeeds a particular thrush hold value.,then fetch the corresponding
audio file from the sd card and play it through a PWM enabled pin.This is
much easier said than done.There are some hurdles that we need to cross
if we need to play an audio file from the SD card directly with out any
audio decoder.(about which ill explain in detail later.)
Another advantage of KIDU is that it does not require any control buttons.
i have programmed it such that the drums themselves can be used to
select the drumming style.
Step 3: MAKING THE FRAME
(/file/FB3F80EHFPT8JPK/)
(/file/FBXLUA1HFPT8JPJ/)
MAKING THE FRAME
I am not very good at mechanical part of things..,but i tried my best.
for making the drums and the structure or frame.,it used some materials
(not the best materials i kno;)but i used them coz they are easy to work with
and are very cheap and lightweight.
But this step is pretty straight forward.Any one with little imaginatin
can make.Jus follow the structural frame diagram.
For making the frame of the KIDU.,i used PVC pipes with 3.5 cm diameter.
ul need about 3 meters of it.We need to convert this 3 meter pvc into a structure
as shown in the figure.
I could just give you the exact mesurement of the frame components.but
to tell u the truth.,i never had cut them to exact length.i just cut
1 meter pVC and checked if that is the length that i needed.wen i think its
too much i measured and marked a little.i measured the height that i found
comfortable to play.and i measured 4 such pillars.And found out the
lengths of all the components by this trial and error method.but surprisingly
nothing went to waste.Because all the components of the frame were small.
and a lot of connections were there.so i used up almost 2.7 meter.very little was
left
over.This was the method i used(the fun way).
But for those who dont like too much fun.,ill measure and mark the on another
diagram.
NAMING THE FRAME COMPONENTS.
This is important because.,this is very helpful when we are assembling
it together.It can be very confusing if we have alot of components and
no way to kno which one is which.So i have made up a Structural
frame assembly diagram.With each component a name.
BL2 BACK LEFT 2
BL1 BACK LEFT 1
SL1 SIDE LEFT 1
SL2 SIDE LEFT 2
FL2 FRONT LEFT 2
FL1 FRONT LEFT 1
GL GOINT LEFT
ML MIDDLE LEFT
M MIDDLE
MR MIDDLE RIGHT
GR GOINT RIGHT
FR1 FRONT RIGHT 1
FR2 FRONT RIGHT 2
SR1 SIDE RIGHT 1
SR2 SIDE RIGHT 2
BR1 BACK RIGHT 1
BR2 BACK RIGHT 2
(i kno joint is spelled wrong.but i am jus gonna go with it :P )
Now connect the whole thing together,without the drums.and
paint it using spray paint.
TIPS :# name the components on the inside of the pipe and out side.
in case it gets covered in paint.
# while painting remember to keep the spray at atleast 25 cm from the
workpice.contasntly move while spraying to get a fine finish.
# keep the work piece in a newspaper to prevent paint from ruining anything
else.
Step 4: MAKING THE DRUM
(/file/FEQV60KHFPT8JPW/)
(/file/FQTBUUDHFPT8JQ2/) (/file/FY3ZIZUHFPT8JQ3/)
(/file/FHHHY57HFPT8JQ4/) (/file/FDIM7HRHFPT8JQ5/)
MAKING THE DRUM
I am not very good at mechanical part of things..,but i tried my best.
for making the drums and the structure or frame.,it used some materials
(not the best materials i kno;)but i used them coz they are easy to work with
and are very cheap and lightweight.
As shown in the diagram.,the drum has 3 layers.Most of the drum is filled with
Thermocol or foam.i used thermocol(better rigidity).I googed the
drum sizes for a standard drum set.and cut 4 circles with these diameters
on a large slab of thermocol.The drum sizes are listed below.Cut the
rexin and boncy materials with the same diameters, as shown in the diagram.
Now at the center of the thermocol cut a cylindrical grove such that the
tail portion of the T junction fits tightly in the hole.Now mark 4 positions
on the Thermocol nearby the portion of the t junction.(keep in mind that this is
only for extra strengrth.the drums wudnt fall off even if the drummer drums it
hard.).
Now that you got an idea on were the t juction would be on the drum,
remove the junction.Now using the sandpaper.,sand the sides of the thermocol
.This is to getrid of any deformations that you may have while cutting.
Make a grove on the thermocoal along the axis.(axis is the imaginary line
on which the pvc pipe would lie on.)
Now apply fevicol (SH grade) on the walls of the grove on the thermocoal
and on the T junction.Do not use SR Grade coz it will melt the thermocol.
(fevicol is the name of the manufacturer in india for glue.ill put
up the picture also. u can use wat ever u have at your country.)And use a piece
of string to tie the T junction and thermocol.,loop the string throung
the groves that we jus cut on the thermocol.now tie it hard tie on the T
juncton.Apply the
SR fevicol on the string were it touches the PVC T junction.(bevare not to
tounch SR on the thermocol.)The SR would cause the PVC to melt parcialy
and the thermocol gets fixed on the t junction.
Now take a piezo disk and solder it with 2strand ribbon wire.(strip 2 from a 10
strand ribbon wire)
make sure to insulate the both leads with insulation tape.now solder the other
end of the wires to a female port 3.5mm audio jack.use a smal plastic piece to
screw
the jack in.Make sure that the length of the wire is equal to the radious
of the drum.(we dont want any extra wire sticking out of the drum.)
Using the SR glue.,glue the piezo disk on to the center of the
boncy material that we cut out earlier.Use insulation tape to stick the wire a
and the disk on to the circle.Now glue the side containing the piezo disk
onto the thermocol.Make sure that the 3.5jack is properly placed.and can be
pluged in from out side the drum.(Use only SH for sticking with thermocol.)
Now use the SR glue to stick the rexin on to the boncy material.Leave for drying.
Now for painting the drum.I used spray paint(paintinacan).The
problem is that you cannot use this paint dirctly on thermocol.since
it causes the same effect as the SR glue.it melts the whole thing.
So make a coating of ducttape on top of it before spraying it on.
I also made a coating of news paper and then a coat of duct tape.
(not necessary.)
Apply a coat of paint.Hold the can a good 25 cm from the drum and
spray it contantly moving,to get a good fine finish.or else.,it could be uneven.
Leave to dry.Repeat after 5 min.
This step covers making of the drums.but making the cymbals and the pedals
will be explained in another step.The problem is that i couldnt photograph
the making of the cymbals and foot pedals.I don have them with me at the
moment either.but ill take their photo as soon as i can and upload them too.
Il up load the steps for now.
Tips :# When ever you use a solvent(like fevicol SH or SR)u havnt
worked with before.,always test it on a sample before
applying it on the original.
(i am emphasising this cos i wasted 1 of ma drums by using
SR on thermocol.The whole thing melted into guie slimy slury :( )
# When u fix the jack (fixing the piezo) make sure that the jack would
be on the easily plugable area of the drum.(u don want it to be on the
left or right part of the drum.coz it may be difficuly wen another drum comes
on its side.)
# Always measure and mark the parameters on the drum by using sum
permannt
marker.
# We would be cutting the matterial for all the 4 drums together.
so its easy to mark them which drum they belong to.and their axis.
# Always check how it would be on the frame before gluing on anything.
note: standard drum size as per a website i googled up.
18 x 22 inch bass drum
9 x 12 and 10 x 13 inch rack toms
16 x 16 inch floor tom
5.5 x 14 inch snare drum
Step 5: Making the Console
(/file/FSRK3W5HFPT9FYM/)
(/file/FH5PWFFHFPT8JTU/) (/file/F4XRVDMHFPT8JTV/)
(/file/F6PLSBFHFPT8JUC/)
This is basicaly putting all the circuitary in a good looking box.
and neatly puting together a way to establish an easily removable connection
with the drums.
For the console i used an old usb powered laptopcoolerpad.I removed the
fan from the pad and gluedon a small piece of cardboard.I connected the
SD card shield on to the arduino and screwed it on to the cardboard.
Another important circuitary is the pulldown resistors.
As explained earlier.,a piezo disk produces electric signal correspondin to
the pressure applied on it.When we glued the drums together with the piezo
inside.,it produces a signal even if we donot play the drum.So
to over come this problem.,we put pull down resistors( 1M ~ 1.3M )
between the live and the ground leads of the piezo discs.
we could put it with in the dums.but i decided to bring together all the
pull down resistors needed onto a single pcb and put it in the console.
This config makes it easier to do any maintenace if necessarty.
The circuit diagram i very very simple.
I connected 6 female jumper leads to a parallel PCB and
used 6 resistors between each of the leads.Then i shorted 1 of the
leads of all the jumper male pins using hook up wire.Then took the live lead out
of each of the jumper pins and 1 of the shorted leads(for GND) and soldered
each to 1 end of the ribbonwire.i connected small pieces of hookup wire to
the end of ribbon wire(to make it easier for connecting to the Arduino).
and connected these wires to the analog pins and the ground.These pins
were exposed to the exterior so that we could make the connections from
outside.
Next we connect the output audio socket(3.5mm female audio) on to the
console.
then we solder 2 strand ribbon wire to the ground and live of the socket
and the other end to the hookup wire.(to make easy connection to the
arduino.)Now make another hole on the console to take the piwer line out.
I used the USB cable for programming the arduino for powering ther device.
This way i can use the same line for powering the device and also for
programming it.I connect the USB cable to a 5V USB adapter for powering.
This also reduces the weight in the console due to heavy transformers for
stepdown and more efficiency.
Next the cable system.The cable system that i used was made of
single core shield for best sound quality.Each of the drums,cymbals and the
pedals will
need a cable to be connected to the console.Cut approx 1.3 meters of
shield wire.now solder 1 end of the shiel wire to the 3.5mm male jack.
other end to the female part of the jumper wire.
Step 6: Preparing the Sd Card
(/file/F0E9II5HFPT9FVR/)
PREPARING THE SD CARD.
This was the most difficult and time consuming step for me.But ill upload all the
the link for all the audio files that i have prepared.so that those who
find it difficult to follow can use these files and skip this step.
But i must warn you that ull miss a hell lot of fun :) .
link is http://www.4shared.com/rar/AoDU14Vy/KIDU_files.html
(http://www.4shared.com/rar/AoDU14Vy/KIDU_files.html)
Before we touch the sd card,we need to select the sounds that we want our
drum
to sound like.For this i used Image line FL studio for making each of the
drum samples in wave format.For those who r not familier with Fl studio,
you can simply google for drum samples and download them.If even that is
too much.,ill upolad the link for the wav files that i have used as well :) .
Once you have decided on the sounds that you want to hear.,lets start
converting.
As i told you in the WORKING.,it is not easy to play an audio format
with out a dedicated audio decoder.If we had a WAV shield this would have been
easier.Now for playing the audio file direcly from sd card.,we use the arduino
library called the SimpleSDAudio.h .
For this,library to function, we need the audio files in the .RAW format
and the file name in 8.3 naming format,all present in the root directory of the
SD card.
For converting.,the wave files to raw.,i couldnt find any file converter
softwares that support wav to raw.(total video converter also no good.)
so i used a commmand line converter called SOX.You can Audacity as GUI.
but i used.,the commandline technique.
First you need to install SOX.Now bring all the files that you need to
convert to the same directory that contain the file SOX.exe .
Now open command prompt and direct it to the same directory as SOX.exe
(or create a notepad file in that directory and type command.com and save
it as anything.bat.if u open this file the command prompt opens up with
pointing to the same directory.).Now type in the following command.
cd %~dp0
mkdir converted
sox input.wav norm=1 e unsignedinteger b 8 r 62500 c 1 t raw
"converted\output.raw"
pause
replace input.wav in the above command with the filename that you are using.
& output.raw with the 8.3 file name.(8.3 simpy means an 8 letter name or
less,followed by
a '.' & a format in 3 letters eg numb.mp3).So if you have selected the snare
sound for conversion.
type.
cd %~dp0
mkdir converted
sox snare.wav norm=1 e unsignedinteger b 8 r 62500 c 1 t raw
"converted\1_snr.raw"
pause
As i have mentioned earlier there is no lcd display.All the selection of the
style and other necessary things are also narrated by the KIDU.So all those
audio files also need to be converted and transfered to the SD card.
For these audio files also i used the speech synthesiser functionality of
FL Studio.You can use any software and obtain the speech audio in wave
format.
and then convert to raw usin SOX.I will upload n link these audio files also.
NAMING THE FILES.
This is jus to make the programming a little easier.Be systematic in evrything
you do.
NOMENCLATURE
FORMAT <stylecount>_<drumname>.raw
names i have used : for style count 1
1_snr.raw
1_tom1.raw
1_tom2.raw
1_ft.raw
1_cy.raw
1_kick.raw
1_ohh.raw
1_chh.raw
For stylecount 2 replace all the above first letter
by 2.and so on for any number of styles.
The speech files you can name anything.
After you have all the files you need in the raw format.,we can transfer them to
the SD card.For this you can use the windows in built formatter but i recomend
the SD formatter.(do not do quick format.)For SD cards under 2GB format
it as FAT.All others format with FAT32.The library supports both file systems.
Now remove it safly from the PC and insert it inthe SD card shield.
CAUTION:Your computer running on any OS (other than MSDOS) will not be
able to
play these RAW files.but not to worry it will play fine in the arduino.if u
are not convinced of its genuinity.,u can convert these file back
to wav or mp3 and play it in your computer.
Step 7: SOURCE CODE
(/file/FFI0HFVHFPT9FVX/)
// variables and constants used.
int snare;
int tom1;
int tom2;
int floortom;
int cymbal;
int highhat;
int stylecount=0;
int select=0;
int snarecount;
int tom1choose;
//////////////////////
const int snarepin=A0;
const int tom1pin=A1;
const int tom2pin=A2;
const int floortompin=A3;
const int cymbalpin=A4;
const int highhatpin=A5;
#include <SimpleSDAudio.h>
void setup()
{
Serial.begin(9600);
SdPlay.setSDCSPin(10); // chip select
SdPlay.init(SSDA_MODE_FULLRATE | SSDA_MODE_MONO |
SSDA_MODE_AUTOWORKER);
Serial.println("sd ready");
SdPlay.setFile("startup.raw"); // plays the startup tone.
SdPlay.play();
}
void loop()
{
////////////////////////////////// reading the analog pins
snarecount=analogRead(snarepin);
tom1choose=analogRead(tom1pin);
tom2=analogRead(tom2pin);
floortom=analogRead(floortompin);
cymbal=analogRead(cymbalpin);
highhat=analogRead(highhatpin);
//////////////////////////////////drum style selection.
if (snarecount>100)
{
SdPlay.setFile("slctdrm.raw"); // KIDU says "select the drumming stye!"
SdPlay.play();
stylecount=stylecount+1;
}
if (stylecount>6)
{
stylecount=1;
}
///////////////////////////////////////play name of drum style.
if (stylecount==1)
{
SdPlay.setFile("1_stdstl.raw"); // KIDU says "standard drum set selected!"
SdPlay.play();
}
if (stylecount==2)
{
SdPlay.setFile("2_afrcon.raw"); // KIDU says "africancongo style selected!"
SdPlay.play();
}
if (stylecount==3)
{
SdPlay.setFile("3_hiho.raw"); // KIDU says "hiphop style selected"
SdPlay.play();
}
if (stylecount==4)
{
SdPlay.setFile("4_indian.raw"); // KIDU says "indian style selected"
SdPlay.play();
}
if (stylecount==5)
{
SdPlay.setFile("5_funny.raw"); // KIDU says "funny sounds selected"
SdPlay.play();
}
if (stylecount==6)
{
SdPlay.setFile("6_demo.raw"); // plays DEMO.
SdPlay.play();
}
///////____________________count to exit the drums from select pin mode.
if (tom1choose>50)
{
SdPlay.setFile("selected.raw");
SdPlay.play();
select=select+1;
}
Serial.println("stylecount=");
Serial.println(stylecount);
Serial.println("select=");
Serial.println(select);
while (select==1)
{
////////////////////////////////////redefning the variables to be drum sound triggers.
snare=analogRead(snarepin);
tom1=analogRead(tom1pin);
tom2=analogRead(tom2pin);
floortom=analogRead(floortompin);
cymbal=analogRead(cymbalpin);
highhat=analogRead(highhatpin);
if (snare>50 && stylecount==1)
{
SdPlay.setFile("1_snare.raw");
SdPlay.play();
Serial.println("snare");
}
if (tom1>50 && stylecount==1)
{
SdPlay.setFile("1_tom1.raw");
SdPlay.play();
Serial.println("tom1");
}
if (tom2>50 && stylecount ==1)
{
SdPlay.setFile("1_tom2.raw");
SdPlay.play();
Serial.println("tom2");
}
if (floortom>50 && stylecount==1)
{
SdPlay.setFile("1_ft.raw");
SdPlay.play();
Serial.println("floortom");
}
if (cymbal>50 && stylecount==1)
{
SdPlay.setFile("1_cy.raw");
SdPlay.play();
Serial.println("cymbal");
}
if (highhat>50 && stylecount==1)
{
SdPlay.setFile("1_ohh.raw");
SdPlay.play();
Serial.println("open highhat");
}
//////////////////////////////////////////style 2
if (snare>50 && stylecount==2)
{
SdPlay.setFile("2_snare.raw");
SdPlay.play();
Serial.println("2snare");
}
if (tom1>50 && stylecount==2)
{
SdPlay.setFile("2_tom1.raw");
SdPlay.play();
Serial.println("2tom1");
}
if (tom2>50 && stylecount ==2)
{
SdPlay.setFile("2_tom2.raw");
SdPlay.play();
Serial.println("2tom2");
}
if (floortom>50 && stylecount==2)
{
SdPlay.setFile("2_ft.raw");
SdPlay.play();
Serial.println("2floortom");
}
if (cymbal>50 && stylecount==2)
{
SdPlay.setFile("2_cy.raw");
SdPlay.play();
Serial.println("2cymbal");
}
if (highhat>50 && stylecount==2)
{
SdPlay.setFile("2_ohh.raw");
SdPlay.play();
Serial.println("2open highhat");
}
//////////////////////////////////////////////style3
if (snare>50 && stylecount==3)
{
SdPlay.setFile("3_snare.raw");
SdPlay.play();
Serial.println("3snare");
}
if (tom1>50 && stylecount==3)
{
SdPlay.setFile("3_tom1.raw");
SdPlay.play();
Serial.println("3tom1");
}
if (tom2>50 && stylecount ==3)
{
SdPlay.setFile("3_tom2.raw");
SdPlay.play();
Serial.println("3tom2");
}
if (floortom>50 && stylecount==3)
{
SdPlay.setFile("3_ft.raw");
SdPlay.play();
Serial.println("3floortom");
}
if (cymbal>50 && stylecount==3)
{
SdPlay.setFile("3_cy.raw");
SdPlay.play();
Serial.println("3cymbal");
}
if (highhat>50 && stylecount==3)
{
SdPlay.setFile("3_ohh.raw");
SdPlay.play();
Serial.println("3open highhat");
}
/////////////////////////////////////////indian style
if (snare>50 && stylecount==4)
{
SdPlay.setFile("4_snare.raw");
SdPlay.play();
Serial.println("4snare");
}
if (tom1>50 && stylecount==4)
{
SdPlay.setFile("4_tom1.raw");
SdPlay.play();
Serial.println("4tom1");
}
if (tom2>50 && stylecount ==4)
{
SdPlay.setFile("4_tom2.raw");
SdPlay.play();
Serial.println("4tom2");
}
if (floortom>50 && stylecount==4)
{
SdPlay.setFile("4_ft.raw");
SdPlay.play();
Serial.println("4floortom");
}
if (cymbal>50 && stylecount==4)
{
SdPlay.setFile("4_cy.raw");
SdPlay.play();
Serial.println("4cymbal");
}
if (highhat>50 && stylecount==4)
{
SdPlay.setFile("4_ohh.raw");
SdPlay.play();
Serial.println("4open highhat");
}
////////////STYLE 5 FUNNY
if (snare>50 && stylecount==5)
{
SdPlay.setFile("5_snare.raw");
SdPlay.play();
Serial.println("5snare");
}
if (tom1>50 && stylecount==5)
{
SdPlay.setFile("5_tom1.raw");
SdPlay.play();
Serial.println("5tom1");
}
if (tom2>50 && stylecount ==5)
{
SdPlay.setFile("5_tom2.raw");
SdPlay.play();
Serial.println("5tom2");
}
if (floortom>50 && stylecount==5)
{
SdPlay.setFile("5_ft.raw");
SdPlay.play();
Serial.println("5floortom");
}
if (cymbal>50 && stylecount==5)
{
SdPlay.setFile("5_cy.raw");
SdPlay.play();
Serial.println("5cymbal");
}
if (highhat>50 && stylecount==5)
{
SdPlay.setFile("5_ohh.raw");
SdPlay.play();
Serial.println("5open highhat");
}
if (stylecount==6)
{
SdPlay.setFile("demo.raw");
SdPlay.play();
}
}
}
Step 8: SOURCE CODE WORKING
(/file/FUSPAJIHFPT9FWF/)
SOURCE CODE WORKING
The library that we use to play the audio from the sd card is
SimpleSDAudio.h .,the details of which i have explained indetail in
the stem preparing the SD card.
Now in the sketch.,i have programmes only for 4 drums and a cymbal.
since i have not expained how to make the foot pedals.
i will try my maximum to upload it asap.But i have converted the sounds
for everything(8 components per drum style.)ie for 4 drums,1cymbal,
open highhat & closed high hat.and kick.
As mentioned earlier.,the program uses the drums for triggring aswell.
This was a bit of a chalenge for me.but i made it in the end.
You may notice in the source code that i have done the analog reading twice.,
with 2 drums having diferent variable names each time.
The first time.,we use the snare and tom1 drums for selecting the drum style.
The snare drum is used as the style count.the count goes from 1 to 6
and repeats from 1 again.You can add as much styles as the size of the
SD card you use.You just have to upload all the sounds you need.
There is another count to loop through the next set of analog readings.
this is the select count.wen ever you have set the count with
ypur snare drum,we confrm it by the tom1 drum.once the tom1 drum is hit.,
it would start a select count.When the select count is 1,(ie the first hit on
the tom1 drum),the loop for drum triggering starts.
The drum trigering loop is quite simple.If the analog reading exeeds a thushold
KIDU will sound the corresponding sound.And the loop continious.
eg :if analogread value > thrushold & if stylecount==1
then,play the audio file 1_snare.raw for snare drum.
prog eg:
if (snare>50 && stylecount==1)
{
SdPlay.setFile("1_snare.raw");
SdPlay.play();
Serial.println("snare");
}
Now for the program involving kick ahd highhat,its not very hard.
All we need to do is include part for digital reading a button.
We need to use a simple mono pulse switch and a debouncing function,for the
kick.
The debouncing function is present in the examples for
arduino programming environment.and for high hat.,the debouncing and switch
parts are the same.
The if loop will have an extra condition each for open anf closed.
ie
if (choke==HIGH && highat>thrushold && stylecount==1)
{
SdPlay.setFile("1_chh.raw");
SdPlay.play();
Serial.println("closed highhat");
}
if (choke==LOW && highat>thrushold && stylecount==1)
{
SdPlay.setFile("1_ohh.raw");
SdPlay.play();
Serial.println("open highhat");
}
Step 9: THANX a LOT....!
(/file/FOOQMUVHFPT9FYB/)
THANKS A LOT...!
> amandaghassaei. your instructable on an electronic xylaphone helped me.
> www.hackerspaceffm.de.This is the place were i learned about the
simpleSDaudio
library.
http://www.hackerspaceffm.de/wiki/index.php?title=SimpleSDAudio
>My uncle Dilip Panicker for helping me with conversions.
>My friends for helping and funding...:)..!
anu abhi n kusha.
Step 10: LINK FOR FILES
(/file/FFH1NBNHFPT9CCI/)
This is the link for the audio files in RAW and wav and the sox conversion
software and the SimpleSDAudio library.
http://www.4shared.com/rar/AoDU14Vy/KIDU_files.html
(http://www.4shared.com/rar/AoDU14Vy/KIDU_files.html)
Step 11: ABOUT ME
(/file/FYPW2DKHFPTRIYP/)
Hii.,,my name is Jishnu Menon.I am a
Btech (Electronics and Communication.,NSS Engineering college
Palakkad)student.,
from India(Kerala).I am new here.,but i used to surf alot
reading many instructables which has helped me do many of my hobby pros
This is my very first instructable.So if there are any mistakes or
if my explaining is not good enough,please excuse me and
correct me.,so that we all can learn together.After all that is what instructables
are all
about.This was my mini project for my previous
semester.So i dont have the project with me at the moment.
i am attempting to make the instructable.,
with the images and diagrams that i took a few months ago.It will contain
all the necessary steps.,but ill update the pictures as soon as i get
it back and try to upload a full working video of it.
the The basic concept is pretty simple.but It is not exactly easy to explain.
But ill do my best.
i would love to have the honor of winning the Epilog Zing 16 Laser cutter from
instractables.
In India it is very difficult to get such gadjets.And is very expensive too.There are
no
companies in India that produces electronic drums.so i am planing to start a
small sale setup for
its production.i have succusfully done the controller part without the arduino.now
i have to integrate the
SD card shield and the controller into one single chip.But it is not gonna be easy
to
make the mechanical parts.I intend to make it more stronger one than the
present version.so such a tool as the Epilog Zing 16 Laser cutter
would be very handy.winning comes second.participation comes first.
We have a be nice comment policy.
Please be positive and constructive. w I Made it! Add Images Post Comment
Ramasubramanian Aditya (/member/Ramasubramanian Aditya) Reply
4 months ago
I googled my problem and found this
Connect SD card to your Arduino board (using shield or whatever, SD card's
chip select should go to pin 4, all other to SPI pins).
Connect a speaker or headphone via 100 ohm resistor in series to audio output
pin (pin 9 on Arduinos with ATmega328, pin 44 on Arduinos with
ATmega1280/2560). Connect other end of speaker to GND.
I was simply getting confused by the TMRpcm.h library. That has different
functions.:(
Flag
Ramasubramanian Aditya (/member/Ramasubramanian Aditya) Reply
4 months ago
Please tell which pin for audio output!!! Quick please!!!
Flag
X George Rufato (/member/George Rufato) . Ramasubramanian Aditya
(/member/Ramasubramanian Aditya) 4 months ago Reply
I think he answered somewhere below:
"Pin 9 for uno and 53 for mega"
Flag
Ramasubramanian Aditya (/member/Ramasubramanian Aditya) . George
Rufato (/member/George Rufato) 4 months ago Reply
Hmm... but what 'bout an Amplifier with the big lead. (the one which we
connect to guitars)
Flag
Ramasubramanian Aditya (/member/Ramasubramanian Aditya) .
And that's where the enable (CS or SCK) of the SD Card Reader goes!!!
Flag
after reading all, i still trting to find what pin to use for audio output.
Flag
Ramasubramanian Aditya (/member/Ramasubramanian Aditya) .
EXACTLY! Me too!
Flag
just updated the instructable with the links for the files that you may need,.
Flag
would u give me the updated link please
Flag
I amazed by your great project , i just need the diagram of connection between
arduino mega and the sd reader , and if it's possible to adjust velocity So when i
trigger in low velocity the file play in low volume and so on ?
Flag
And what shield would be recommended for Arduino Mega?
Flag
If I am using a Guitar Amp, then on an Arduino Mega, I should connect the
positive of the amp lead to pin 53 and negative to ground? The sound shall then
come?
Flag
i am very new to arduino
Flag
can you use a guitar hero drum kit as the frame
Flag
can i build it with no wave shield and with just one sample into arduino's
memory? i have a sample with 15kb 16bit and 16mhz or a converted sample w
6kb 8bit 24mhz
Flag
8 enjoyneer (/member/enjoyneer) (author) . fcarouche (/member/fcarouche)
2 years ago Reply
Yes, its possible. There is an ardhino library for it. You
need to encode the audio sample into PCM format and store it the arduino
memory. And use the library toplay it. I think the library s name was PCM .
I must say that the audio quality was very bad. I dont think the PCM library
could play an audio sample above a particular quality. And the tempo and
pitch were all wrong too. The arduino memory is another huge constrain .
I could use only an audio clip which is about 2 seconds long on arduino
uno. Bottom line is it works . but i couldnt get thr required quality or
number of clips out of it. If you try it out, do let us know how it worked for
you.
Flag
Flag
2 years ago
Oh, yes That did cross my mind, I Don't know if the library I use
supports real time amplitude adjustment . But I could store sound samples
with different amplitudes and play them with respect to the trigger peak
amplitude. I also thought of doing that to get different sounds when I hit
different parts of the drum by using 2 piezos in 1 drum and different
sounds for different piezo value combinations. I also though of doing
amplitude adjustment with a digital potentiometer connected to the output
of the sound out and adjusting that value in accordance to the peak
amplitude value. I don't know if any of thee will even work. And I am so
busy with the job and other stuff that I cant even try out any of these. :(
Thanks for the Suggestion though... :)
Flag
Hi Jishnu, nice instructible, have just one question: you have any delay to play
the sounds??? thx (sorry my english, im Brazilian)
Flag
2 years ago
Nope, No delay. But if a drum hit is sensed before the other sound is over,
the new sound over rides the previous one. So the first one sounds
incomplete. This happens only if the drummer is very fast. or hits 2 drums
at the same time.
Flag
Flag
8 enjoyneer (/member/enjoyneer) (author) . RowanCant (/member/RowanCant)
2 years ago Reply
I am sorry., but the library doesn't support that. And
also I don't think that is doable with the limited muscle we have on the
arduino. The samples need to be synthesized to do what you ask. I am no
expert but I don't think we can do that on arduino. Here we just play from
the stored audio file. I think it would need an FPGA.
Flag
from which pin of arduino do you take the output?
Flag
8 enjoyneer (/member/enjoyneer) (author) . FedericoZ (/member/FedericoZ)
2 years ago Reply
Pin 9 for uno and 53 for mega
Flag
Hey Bro I Am Parnab I am 13 yrs old i want to ask u that can u build it with 2
drums,3 tom toms and 3 cymbals so i can pratice my drum lessons at home
Flag
2 years ago
Hey pranab, that is possible but I wouldn't recommend this for
practice. This is only ment as a learning exercise for those interested in
electronics. To learn drumming as a soft skill I think you should practice on
a real drum
Flag
Hellou this is amazing...! I want to make this but . Cant find scheme or how to
connect output tu guitar amp or any amp or i missted somhwere.. :) can you
help somhow..? This is so cool! Thank you!!
Flag
2 years ago
Sort about not having any schematic. The audio out is
connected between pin 9 and gnd
Flag
justin.serfontein (/member/justin.serfontein)
Hey Bro, would it be possible to replace the SD card with a 2 years ago Reply
device say a tablet and have the Arduino read the SD that is
in the Tablet?
Flag
8 enjoyneer (/member/enjoyneer) (author) . justin.serfontein
(/member/justin.serfontein) 2 years ago Reply
Definitely possible. I am not good at android coding. But there probably
will be some library in android for serial communication. We can code the
arduino to send the the sensor readings to the android device via USB
Serial or Bluetooth or some thing and take the output from the android
device. The output will be even clearer than that is now. But I can't cant
say anything about the fidility since there might be considerable delay. If
you are relying on an android device then I suggest you try making a midi
kit. There are tutorials that will help you with it. Its much more easier too.
And just use a VST program like flstudio or something that runs in
android. Cheers.
Flag
i'm sorry mr, may i have the schematic or wiring diagram. thx so much
Flag
Hey thanks for replying. I was wondering what the connections would look like if
I had the arduino connected to the shield and placed all the things on a
breadboard instead. So I have the piezos and the resistors and one female
audio jack on the bread board. Would I be able to get a proper sound using
your source code?
Flag
8 enjoyneer (/member/enjoyneer) (author) . That.cool.guy.over.there
(/member/That.cool.guy.over.there) 2 years ago Reply
Hey sorry i couldnt reply sooner., a while ago someone did this on a
breadboard when and it worked just fine.It sounded fine..Here is the link to
his work.https://www.facebook.com/video.php?v=7993323901072...
(https://www.facebook.com/video.php?v=799332390107231&pnref=story)
Flag
That.cool.guy.over.there (/member/That.cool.guy.over.there) . enjoyneer
(/member/enjoyneer) 2 years ago Reply
Hey thanks! I also got it to work and transferred it over to a pcb. Thanks
anyway though.
Flag
Hello, we were there at the KCSTE event when you presented this. Do you feed
the PWM signal directly to the speaker or do you smooth it with an RC circuit.
What values did you use?
Flag
8 enjoyneer (/member/enjoyneer) (author) . SREEDEV (/member/SREEDEV)
2 years ago Reply
Hey Sreedev,Glad to see you again., We need a
Lowpass filter to smoothen out the PWM Signal. But i had an amplifier
with an equalizer to Do that. So i had only to decrease all treble (the HIGH
freq component )and increase the Bass(The low freq component ). This
way i had more control over the output signal. but after a little
experimentation, i did a small passive Lowpass filter with some capacitors
and resistors and got a much better result, So i would strongly
recommend using a LOWpass filter with a cutoff close to the fundamental
frequency of the PWM signal of the Arduino.
Flag
Hi great project, this is what i am looking for along time , o wonder if its possible
to ad more pads and hi hat pedal ,
sorry i am just beginning to learn about arduino
my idea its make my one drum module or use arduino to receive midi notes and
transform to audio output.
thanks
Flag
8 enjoyneer (/member/enjoyneer) (author) . EduardoS6 (/member/EduardoS6)
2 years ago Reply
Hi.., Your idea is totally doable.In fact there are a lot of
instructable to get the midi out from the arduino. check this out
https://www.instructables.com/id/ArduinoXylophone/
(https://www.instructables.com/id/ArduinoXylophone/)
With a little research you can make a hybrid of KIDU and this MIDI
xylophone.
Flag
Hey are you still checking these comments for this project? I have a couple
questions if you wouldn't mind. Thanks!
Flag
8 enjoyneer (/member/enjoyneer) (author) . That.cool.guy.over.there
(/member/That.cool.guy.over.there) 2 years ago Reply
Sure whats up..?
Flag
That.cool.guy.over.there (/member/That.cool.guy.over.there) . enjoyneer
(/member/enjoyneer) 2 years ago Reply
Hey thanks for replying. I was wondering what the connections would look
like if I had the arduino connected to the shield and placed all the things
on a breadboard instead. So I have the piezos and the resistors and one
female audio jack on the bread board. Would I be able to get a proper
sound using your source code?
Flag
can i hit 2 pad at the same time :3 im just curious
Flag
8 enjoyneer (/member/enjoyneer) (author) . mghazali1 (/member/mghazali1)
3 years ago Reply
technically no. the latest hit will over write the previous
sound. but i made my drumsounds so small in size and duration that one
hardly notice that.I am currently working ona drum that can play 4 sounds
simultaniously..
Flag
Neurotic (/member/Neurotic) . enjoyneer (/member/enjoyneer) Reply
3 years ago
Any progress on the polyphonic drums? :)
Flag
is this a stand alone unit or do you need to hook it up to a computer? also is the
schematic available?
Flag
Yes,it is a stand alone unit
Flag
Hello enjoyneer, Thanks for this instructable and congratulations, it is great.
I have a question. Is there any noticeable delay from the moment you hit a pad
until you expect to hear its result?
Thanks in advance!
Flag
3 years ago
Hello..thank you too.there is no delay at all.I was quite
surprised by the response time it had.i reason was that the audio format is
raw,which the arduino is capable of decoding quite well on its own.If it
were some onther format like mp3 or wav then maybe there would have
been some delay from the dedicated decoder hardware that may be
required.but still.,at 16MHz clock speed i doubt even that.In this case the
rendering is quite robust.the only problem that you may face is that if you
hit two pads at once then,only that first soundwill be heard.because the
sound files are fetched from the sdcard via the SPI protocol.which can
only fetch 1 file at a time.but still you would barely notice it.i could not
notice it.but in theory there is such a possibility.
Flag
I dont think you can do that with todays keyboards. i am not sure of the
thing.What people usually do is that they connect the electric drum to a
computer via a MIDI interface and use a VST like flstudio or cubase or logic or
garageband to make any sound on the VST to play on the drum.The keyboard
itself is a MIDI device.i am not sure if you can connect another MIDI into it.I am
not sure you may want to do some additional research on this.
Flag
using piezo electric drum pad how to connect to organ keyboard to use its drum
sound source
Flag
I More Comments
FEATURED CHANNELS
Find Us Resources
Facebook (http://www.facebook.com/instructables) For Teachers (/teachers/)
Youtube (http://www.youtube.com/user/instructablestv) Residency Program (/pier9residency)
Twitter (http://www.twitter.com/instructables) Gift Premium Account (/account/give?sourcea=footer)
Forums (/community/)
Pinterest (http://www.pinterest.com/instructables)
Answers (/tag/typequestion/?sort=RECENT)
Google+ (https://plus.google.com/+instructables)
Sitemap (/sitemap/)
Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legalnoticestrademarks/) | Mobile Site (https://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
© 2016 Autodesk, Inc.