# Multiple Piezo discs thru Mux to make E-drum

**URL:** <https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142>\
**Category:** General Electronics\
**Created:** [January 19, 2026, 5:23pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142 "2026-01-19T17:23:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 19, 2026, 5:23pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/1 "2026-01-19T17:23:09Z")

</div>

I'm using 2 Piezo discs to start making an E-drum with Arduino Pro Micro. In the end I want to have 11 Piezo discs so I'm using a 16-Channel Analog Multiplexer. Now I have 2 Piezo discs wired-up with each a resister and connected my Arduino with MIDIUSB plugin to a Logic Pro drumset and gave each Piezo it's own note. But when I tap Piezo disc 1 it plays both notes, the same for Piezo disc 2. Is it possible that the 16 inputs in the Analog Multiplexer are always read together?

This is my Arduino code:

```arduino
#include "MIDIUSB.h"

const int muxAnalogPin = A0;

const int s0 = 2;
const int s1 = 3;
const int s2 = 4;
const int s3 = 5;

const byte SNARE_CH = 11;
const byte KICK_CH = 3;

const int snareNote = 34;
const int kickNote = 42;

const int threshold = 70;

int peakSnare = 0;
int peakKick = 0;

bool snareHit = false;
bool kickHit = false;

void setup() {
  pinMode(s0, OUTPUT);
  pinMode(s1, OUTPUT);
  pinMode(s2, OUTPUT);
  pinMode(s3, OUTPUT);
}

void loop() {
  handleSnare();
  handleKick();
  delay(2);M
}

void handleSnare() {
  selectMuxChannel(SNARE_CH);
  delayMicroseconds(5);
  handlePiezo(muxAnalogPin, snareNote, peakSnare, snareHit);
}

void handleKick() {
  selectMuxChannel(KICK_CH);
  delayMicroseconds(5);
  handlePiezo(muxAnalogPin, kickNote, peakKick, kickHit);
}

void selectMuxChannel(byte channel) {
  digitalWrite(s0, channel & 0x01);
  digitalWrite(s1, (channel >> 1) & 0x01);
  digitalWrite(s2, (channel >> 2) & 0x01);
  digitalWrite(s3, (channel >> 3) & 0x01);
}

void handlePiezo(int pin, int note, int &peak, bool &isHit) {
  int value = analogRead(pin);

  if (value > peak) {
    peak = value;
  }

  if (value > threshold && !isHit) {
    isHit = true;
    peak = value;
  }

  if (isHit && value < threshold / 2) {
    int velocity = map(peak, threshold, 900, 40, 127);
    velocity = constrain(velocity, 40, 127);

    noteOn(note, velocity);
    delay(5);
    noteOff(note);

    isHit = false;
    peak = 0;
  }
}

void noteOn(byte pitch, byte velocity) {
  midiEventPacket_t event = {0x09, 0x90, pitch, velocity};
  MidiUSB.sendMIDI(event);
  MidiUSB.flush();
}

void noteOff(byte pitch) {
  midiEventPacket_t event = {0x08, 0x80, pitch, 0};
  MidiUSB.sendMIDI(event);
  MidiUSB.flush();
} 

```

This is my setup:

 ![IMG_0452.HEIC](https://europe1.discourse-cdn.com/arduino/original/4X/a/5/c/a5c9a38e5016ded42493f4bf7440c0980137da22.jpeg)

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [January 19, 2026, 5:29pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/2 "2026-01-19T17:29:42Z")

</div>

![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/1/7/1177d2cbb43e3e9466f04e9caadebe31548643d2.jpeg)  
Please tell me you haven't simply stuck those Dupont connectors through the holes and expected the electrons to magically jump over the air gap between the pin and the side of the hole.

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 19, 2026, 5:32pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/3 "2026-01-19T17:32:02Z")

</div>

Maybe I did, i'm not the best at Arduino and it's my first time using an Analog Multiplexer, so any tips would help..

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [January 19, 2026, 5:37pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/4 "2026-01-19T17:37:56Z")

</div>

> [@iebewithouck](#):
>
> Maybe I did

Excuse me?

Did you, or didn't you?

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 19, 2026, 5:41pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/5 "2026-01-19T17:41:31Z")

</div>

I've read on other topics that there are other people with the same problem as me, and they most likely connected their multiplexer correctly, so the real problem probably doesn't lie there, because mine works, it only reads all the 16 channels at once (i think..) and not the channel with the piezo that is being hit.

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [January 19, 2026, 5:43pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/6 "2026-01-19T17:43:44Z")

</div>

> [@iebewithouck](#):
>
> so the real problem probably doesn't lie there

Since you are so knowledgeable on the subject, I'll leave you to it.

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [January 19, 2026, 6:19pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/7 "2026-01-19T18:19:03Z")

</div>

> [@iebewithouck](#):
>
> But when I tap Piezo disc 1 it plays both notes, the same for Piezo disc 2.

This is known as cross-talk, and to be expected when using high impedance sensors  
(I assume you have a 1Megohm resistor across each piezo).

The only way to fix this is by buffering each piezo with an opamp.  
Use a general purpose quad opamp like the LM324.  
Leo..

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [January 19, 2026, 6:38pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/8 "2026-01-19T18:38:12Z")

</div>

> [@iebewithouck](#):
>
> any tips would help..

[Solder](https://learn.sparkfun.com/tutorials/how-to-solder-through-hole-soldering/all) the header pins to the board.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [January 20, 2026, 8:22pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/9 "2026-01-20T20:22:39Z")

</div>

> [@iebewithouck](#):
>
> the real problem probably doesn't lie there

Yes, one problem is lack of soldering the connectors.

> [@iebewithouck](#):
>
> mine works

No, it does not...

> [@iebewithouck](#):
>
> reads all the 16 channels at once (i think..) and not the channel with the piezo that is being hit.

Solder your pin headers.

---

<div class="post-metadata">

**Author:** ![dougp](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dougp/32/238908_2.png) [@dougp](https://forum.arduino.cc/u/dougp)\
**Post date:** [January 20, 2026, 9:37pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/10 "2026-01-20T21:37:07Z")

</div>

Did your board even come with pin headers?

(The three spiky looking things in the photo.)

> **[Amazon.com: hiBCTR PCA9548A TCA9548A I2C IIC 8-Channel Multiplexer Breakout...](https://www.amazon.com/hiBCTR-PCA9548A-TCA9548A-8-Channel-Multiplexer/dp/B0FBGC5BRP)**
>
> Amazon.com: hiBCTR PCA9548A TCA9548A I2C IIC 8-Channel Multiplexer Breakout Board - 1.65-5.5V 400KHz for Arduino, Address 0x70-0x77 : Electronics

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 20, 2026, 10:59pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/11 "2026-01-20T22:59:04Z")

</div>

> [@dougp](#):
>
> pin headers

No it did not, but i have some laying around i think

Should it be soldered like this?

 ![Screenshot 2026-01-20 at 23.58.16](https://europe1.discourse-cdn.com/arduino/original/4X/f/4/5/f457a05ef53faaf28a72cfdc7eb30561b5d3bb4d.jpeg)

---

<div class="post-metadata">

**Author:** ![dougp](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dougp/32/238908_2.png) [@dougp](https://forum.arduino.cc/u/dougp)\
**Post date:** [January 20, 2026, 11:59pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/12 "2026-01-20T23:59:10Z")

</div>

Yep. Then plugged into the breadboard and connections made from there.

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 21, 2026, 9:55am UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/13 "2026-01-21T09:55:57Z")

</div>

thank you guys for all the tips and help! much appreciated! I soldered the header pins to the Mux. Now Piezo 1 has a clearly snare sound and piezo 2 has a clearly kick sound, but there is still some cross-talk. sometimes piezo 2 gives also some snare and piezo 1 sometimes some kick.

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [January 21, 2026, 11:41am UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/14 "2026-01-21T11:41:35Z")

</div>

> [@iebewithouck](#):
>
> but there is still some cross-talk.

The disadvantage of using piezo sensors. Have you tried to lay them on a bit of foam so they don't vibrate together ?

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [January 21, 2026, 7:26pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/15 "2026-01-21T19:26:19Z")

</div>

What value bleed resistor did you use across the piezo.  
1Meg is common when used as microphone, but you can lower sensitivity and cross-talk with lower values. Try 100k or even 10k.  
Leo..

Edit: I think I see resistors in series with the piezo. They must be in parallel.

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 22, 2026, 9:32am UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/16 "2026-01-22T09:32:23Z")

</div>

resistor is connected to the GND with one leg and the other leg to the piezo. other leg from the piezo goes to a channel on the Mux.

---

<div class="post-metadata">

**Author:** ![dougp](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dougp/32/238908_2.png) [@dougp](https://forum.arduino.cc/u/dougp)\
**Post date:** [January 22, 2026, 3:35pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/17 "2026-01-22T15:35:50Z")

</div>

> [@Wawa](#):
>
> They must be in parallel.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/c/6/7/c672752661610c0952a862a0511a1c3896a3c02d.png)

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 26, 2026, 1:29pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/18 "2026-01-26T13:29:29Z")

</div>

> [@Wawa](#):
>
> 1Mego

Now I connected the piezo's with each a 1Meg-ohm in parallel. When tapping the snare piezo soft it gives only snare sound, but when I tap it normal it gives also kick with it. The same for the kick piezo. I tried blocking out the weak signal and only giving the strongest thru but that still doesn't solve the problem

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [January 26, 2026, 7:30pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/19 "2026-01-26T19:30:30Z")

</div>

Did you try lowering those resistor values? (post#15)

---

<div class="post-metadata">

**Author:** ![iebewithouck](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@iebewithouck](https://forum.arduino.cc/u/iebewithouck)\
**Post date:** [January 26, 2026, 7:42pm UTC](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142/20 "2026-01-26T19:42:55Z")

</div>

> [@Wawa](#):
>
> sensitivity and cross-talk

Yess. I lowered the resistor values to 100k resistors and when 2 piezo's were wired up the so-called cross-talk was gone, but when i wire up all the 11 piezo's there is back cross-talk.

[Next page](https://forum.arduino.cc/t/multiple-piezo-discs-thru-mux-to-make-e-drum/1426142.md?page=2)
