Piezo-sensors via 6,3mm input socket not working

Hello,

I decided to try build a "drums brains unit" when the original one broke for my electronic drums. I've used this guide as reference.

However, I can't get really started. What I've done is the following:

  • Arduino A0 port -> 1M Ohm resistor + -> Input socket +
  • Arduino GND -> 1M Ohm resistor - -> Input socket -

(Using here one 1M Ohm resistor in front of the input socket)

My code:

void setup() {
  Serial.begin(9600);
}

void loop() {
  int value = analogRead(A0);
  Serial.println(value);
  delay(100);
}

In the serial monitor I can see zeroes, expect every 5 seconds or so I see values ranging from 0-200 approx. and then it's zeroes again. Banging the "drum" connected to the input socket doesn't seem to have any effect.

It seems you didn't read the part of that "instructable" that said you need one 1M resistor between the input (A0) and GND. NOT one inline with GND and another inline with the input.

Steve

It seems you didn't read the part of that "instructable" that said you need one 1M resistor between the input (A0) and GND. NOT one inline with GND and another inline with the input.

No, I only use one but my "graphic" was indeed misleading. Added a comment for that.

Also, the delay() isn't helping. Most of the time your program is sitting there delaying and it can't read the piezo during the delay so you could miss a hit.

There is always some "dead time" during your loop and (it only reads of an instant once per loop. Print statements also introduce some delay. You need to print for now to "see" what's happening, but once you get it working take-out the print statement.

Also, the delay() isn't helping. Most of the time your program is sitting there delaying and it can't read the piezo during the delay so you could miss a hit.

There is always some "dead time" during your loop and (it only reads of an instant once per loop. Print statements also introduce some delay. You need to print for now to "see" what's happening, but once you get it working take-out the print statement.

Yes, but I'm banging the drum like crazy so it would surely input something :slight_smile:

My socket looks a bit like this. It has four terminals and I've detected the correct two by testing continuity between them.

At this point I'm guessing the socket if faulty. I've tried two though, but they're both desoldered from an old board.

Do you have a link to the specs for the piezo transducer you used? Maybe you have a buzzer instead of a transducer. (A "raw" piezo transducer should measure open (infinite resistance) or with the resistor connected, you should measure that resistance. An active buzzer will measure much lower resistance. (Don't try to measure it when it's connected to the Arduino).

Are you sure about the resistor value? It should be 1M or more.

The [u]Knock Tutorial[/u] shows you how to wire the piezo and resistor.

My socket looks a bit like this. It has four terminals and I've detected the correct two by testing continuity between them.

At this point I'm guessing the socket if faulty.

You should be able to conform direct connections between the piezo terminals and the Arduino input/ground. And make sure you don't have a short between the Arduino input and ground. It shouldn't be too hard to confirm the connections through the plug & jack.

Yes, but I'm banging the drum like crazy so it would surely input something :slight_smile:

I agree. You should be seeing something.

Maybe you have a buzzer instead of a transducer.

They're not buzzers...I'm using the drum pads of an electronic drum set.

You should be able to conform direct connections between the piezo terminals and the Arduino input/ground.

I "ripped" one pad open and tried connecting the piezo sensor's wires with Arduino via the 1M OHM resistor and it worked (Tapping the drum pad generates values). But again connecting with 6,3mm cable doesn't work.

To clarify, the pad has a 6,3mm input socket which is soldered to a circuit board to which the sensor's cables are in turn soldered to. Then I attach 6,3mm cable to that socket and plug the other end to another 6,3mm input socket which I connect to the resistor.

O.k. so when you connect a piezo sensor directly to the Arduino it works fine. But when you try to connect a drum pad which has an unknown electronics circuit between the piezo and the connector it doesn't.

Sounds like you have two options 1) find out what output the drum pad normally produces (it may be MIDI or anything else but it's obviously not a plain piezo signal) or 2) get into all the drum pads and connect direct to the piezo sensors.

What make/type are the drum pads? It may be possible to find out what output they produce.

Steve

What make/type are the drum pads? It may be possible to find out what output they produce.

They are Millennium MPS-100. A quick glance into the docs didn't reveal anything of use. The unit has a built-in synthesizer with 6,3mm out and MIDI out.

O.k. so when you connect a piezo sensor directly to the Arduino it works fine. But when you try to connect a drum pad which has an unknown electronics circuit between the piezo and the connector it doesn't.

The circuit board seems to be very simple but it has two resistors. Here's photos of it: