Electronic Drums: Fatema Nassar &Ingy

General Idea:

After a lot of thinking and research we decided we wanted to try something and we honestly didn’t know if it would work or not. Our initial Idea was to created some sort of drum set. We felt like it would be a cool challenge to take on! The idea is to have 6 pads attached to a board, and each pad creates a different sound or tone when you press on it.

First attempt:

In our first attempt we started trying to create the “drums” using piezo buzzers. We assembled together a foam board with 6 pads, each with an piezo buzzer attached to it. We think we got a bit to courageous and we put together the whole instrument and it did not end up fully working. We believe the conceptualization and idea could work (it did work to a certain extent).

We think the reason why it didn’t work is because we wanted each pad to create a sound when we press on it. However, we believe the vibrations created by pressing on one of the pads to create the sound was also picked up by the other pads which made the buzzer go crazy. The serial monitor is what helped us get to that conclusion. We tried to fix it however, we did not have enough time to do so. Hence, we decided to switch it up a bit.

The piezo buzzers we had to remove 🙁

Attempt 2 (This one actually worked :))

We met again, and decided to use force sensitive resistors instead. We reassembled the board and substituted the piezo buzzer with force sensitive resistors, we also added a layer of sponge in the middle between the board and the separate tabs. Each pad has a different tune when pressed on.

We then decided to use a button as our digital read, as a switch for Led lights that we added. The Leds only light up when you press on the pads. So the button switches the LEDS on and off but they only light up when we press on the tabs, if we press on the tabs when the button is off the LEDS won’t light up we we press on the tabs.

This video shows how the button is used:

Final touches:

Just to add some visual appeal to the board we decided to print out pictures off different drums to complete a drum set and stick them on each pad. Even thought the tunes don’t really sound like drums lol 🙂

Finally this our result!

#include "pitches.h"

const int inputPins[] = { A0, A1, 2, A3, A4, A5};
int inputs[6];
int threshold[] = {250, 900, 940, 960, 900, 750};
int leds[] = {2, 3, 4, 5, 6, 7};
bool flag = HIGH;
bool prev, curr;
const int buzzerPin = 13, button = 12;
long timer[6];

int notes[10] = {NOTE_C4, NOTE_D4, NOTE_E4, NOTE_F4, NOTE_G4, NOTE_A4, NOTE_B4, NOTE_C5, NOTE_D5, NOTE_E5};

void setup() {
  // put your setup code here, to run once:
  for (int i = 0; i < sizeof(inputPins); i++) {
    pinMode(inputPins[i], INPUT);
  pinMode(button, INPUT);
  for (int i = 0; i < sizeof(leds); i++) {
    pinMode(leds[i], OUTPUT);
  pinMode(buzzerPin, OUTPUT);


void loop() {
  if (curr == 1 && curr != prev) {
    flag = !flag;
  curr = digitalRead(button);
  for (int i = 1; i < 6; i++) {
    inputs[i] = analogRead(inputPins[i]);

    Serial.print(i + 1);
    Serial.print(" : ");

    Serial.print(" ");

    if (inputs[i] > threshold[i]) {
      tone(buzzerPin, notes[i * 2], 500);
      if (flag) {
        digitalWrite(leds[i], HIGH);
      else {
        digitalWrite(leds[i], LOW);

    else {
      digitalWrite(leds[i], LOW);


  for (int j = 0; j < 6; j++) {

  prev = digitalRead(button);



Leave a Reply