Table of Contents

DIY Capacitive Touch Drum Machine using PictoBlox

Capacitive-Touch-Drums
Project Description

Introduction

You can play drums with sticks. But can you play them with code? Well, now you can! Presenting to the DIY Capacitive Drum Machine – drums, when played, generates the music from your computer. They’re easy to make, easy to code, and super fun to play! All you need is evive, few alligator pins, some jumper cables, PictoBlox – a graphical programming software based on Scratch – and loads of DIY-ing.

You can download PictoBlox from HERE.

Ready for some air drumming? Let’s go!

Taking the Cutouts for the Drum

Before we start making the drums, we will first take the cutouts, thus making the entire process simple and easy to complete.

Top and Bottom Side

  1. We are going to use a cardboard/ plastic sheet for the top and bottom side of the drums. You can make as many drums as you want. 
  2. We are going to make three drums and we need two circles for each drum, thus we will be designing 6 circles on the sheet.
  3. The radius of our drum is 3.5cm. Thus, measure 3.5cm on your compass using a ruler and draw 6 circles. Also, you can vary the size of the drums if you want to make it look attractive.Drawing Top and Bottom Sides

    evive Notes Icon
    The change in size won’t affect the sound of the drums.
  4. Once done, cut the circles out using scissors.Cut outs

The Drum Shell

  1. The drum shell is nothing but the side covering or the periphery of the drum. We are going to use the colored chart paper for the same.
  2. Take your favorite colored chart paper and cut out a strip whose length is 20cm and width is 4cm. Make sure that the shell is not entirely covered, some space should be left between the start and the end of the shell (Whose reason will be discussed in the latter part of the project).
  3. The length of the strip will depend on the size of the drum. You can change the width if you want.

    evive Notes Icon
    Again, the height will not affect the sound of the drum.
  4. Once done, keep the cutouts aside. Drum Sheels

Making the top Conductive

We want Tobi the sprite in PictoBlox, reflect our actions on the screen and play the sound accordingly. 

How will it detect our touch on the drum? Well if we make it conductive, it will send the signal whenever the drum is being touched. 

  1. Thus, take a square piece of aluminum foil and cover the top circles of all the drums using it.
  2. Make sure that the outer side remains smooth.Conductive Tops

Once done, keep them all aside.

Completing the Drum Machine

Once, we have all the parts or components of the drum ready, its time to assemble the drum.

  1. Take one strip, one conductive top circle, and one base circle.
  2. Wrap the shell to the top and the bottom side using the Hot Glue.
  3. Repeat the above step for all the other drums. Make Drums

With this, your drums are ready. Now, all we need to do is connect it to the brain.

Connecting drums to evive

  1. Take three alligator clips one for each drum and remove the outer insulations.
  2. Take one male-to-male jumper cable and attach it to the alligator clip using solder iron and the solder wire.Alligator CLip
  3. Again put back the insulation onto the clips.
  4. Repeat the above step for all the alligator clips.
  5. Next, bring the drums back into the picture. Now, if you remember, we have left a small space into the shell, it was to attach the alligator clip to the drum. 
  6. Attach the alligator clips to all the drums. Attaching wires to drums
  7. Now, its to bring in the brain, evive.
  8. As we need to detect the touch, we will be attaching the drums to the touch pins of evive. 
  9. Connect the male ends of the jumper cables to the Touch Pin 1, 2, and 3 respectively on evive.Capacative Drums circuit of the drums

Testing the Drums

Before we begin with the coding part, let’s first test the drums.

evive Tips and Tricks
evive has inbuilt touch tunes to detect the touch on the respective pin.

Thus, switch evive ON, go to the firmware, select Touch Sensors. Once the menu has been selected, as soon as you touch the drums, evive buzzers start to play, corresponding to the pin connected. We also can see the number of the pin touched on evive’s TFT display.

Making the Code Play the Tune

Now, to work within real-time, we need to connect evive to PictoBlox either using a USB cable or by directly installing Bluetooth module on evive and connecting it. 

You need different costumes of Tobi so that it looks like he is playing the drums. You need to tinker the main costumes and create the sub costumes. You can edit them by clicking on the costume button and directly edit them. The stick in the sprite’s hand is been taken from the drum sprite.Sprite Playing Drum

Once done, make the sprites of drum too. We have edited the sprite and colored it blue.

Once done, write the following code in PictoBlox.Capacitive-Touch-Drums PictoBlox Code

Now, as we are going to interact with the sprite we do not need to upload the code, directly click on the green flag and start playing.

Conclusion

With this, your DIY air drums are ready! Happy Badum Tss-ing!

Project Downloads - Code and Files

Code LabelCode File
PictoBlox Code for Capacitive Touch Drumshttps://ai.thestempedia.com/wp-content/uploads/2023/05/Capactive-Touch-Drum-2.sb3

Explore Related Projects by STEMpedia

Level up your robot control skills by learning how to control a 2-Wheel Drive Robot with hand gestures using PictoBlox AI's Machine Learning extension. Get ready to channel your inner Jean Grey!
Learn how to make a two-wheel-drive robot and code on the go with PictoBlox's mobile app. Control your robot in real-time with your smartphone!
Learn how to make an automatic chocolate dispenser to delight Santa this Christmas. All components can be found in the evive Starter Kit. Let's begin!

Explore Community Projects