Hi all,
I'm attempting to make a drumset with piezos and a teensy 3.2, using the piezo-wiring diagram that kpc posted here: https://forum.pjrc.com/threads/2779...puts-explanation?p=65150&viewfull=1#post65150 Instead of diodes going to 3V3 I have them going to AGND. I am a total newb and this is my first major electronics project, though I have been working at it a while (my first approach was using a 555 timer before I learned about the joys of polyphony...long story ) so I understand some of the basics, just not many.
Wiring things up as kpc diagramed (as well as in several other ways) have all worked pretty well for one piezo. I'm able to pick up the signals using analogRead, and to translate that signal into a midi signal that I pick up in Reaper w/VSTi and make drum sounds with. I do get a somewhat noisy signal, of a constant "30" reported by analogRead(), which just appears to be a function of the strength of the resistor (1M) I put in parallel to the piezo, but it's pretty easy to work around just by setting a minimum-reading constant in my code. So basically, my drumset works great for one piezo/drum.
However, once I wire up a second piezo (so now I have one on A0 and one on A3) and connect it to the same AGND like the first one, I start getting weird readings from my piezos. They're not terribly consistent readings... usually striking a piezo causes the value reported by analogRead() to drop to 0 from the "noise value" of 30, though occasionally I get positive readings up closer to 1000. It seems like they must be interfering with each other over AGND, because disconnecting one of the piezos from AGND makes the second piezo work perfectly, and vice versa. (As I was writing this I decided to try with a 10k resistor in parallel instead of a 1M resistor. There still seems to be interference, though instead of going from 30 [noise] to 0 it's usually going from 3 [noise with less resistance/sensitivity] to 30, but still inconsistently, and unplugging one piezo makes the other much more sensitive and consistent still)
Can anyone help me wire up multiple piezos? For what it's worth, I am using "switching diodes" instead of zeners, does that matter? (again I'm a total newb sorry haha)
Thanks in advance!
I'm attempting to make a drumset with piezos and a teensy 3.2, using the piezo-wiring diagram that kpc posted here: https://forum.pjrc.com/threads/2779...puts-explanation?p=65150&viewfull=1#post65150 Instead of diodes going to 3V3 I have them going to AGND. I am a total newb and this is my first major electronics project, though I have been working at it a while (my first approach was using a 555 timer before I learned about the joys of polyphony...long story ) so I understand some of the basics, just not many.
Wiring things up as kpc diagramed (as well as in several other ways) have all worked pretty well for one piezo. I'm able to pick up the signals using analogRead, and to translate that signal into a midi signal that I pick up in Reaper w/VSTi and make drum sounds with. I do get a somewhat noisy signal, of a constant "30" reported by analogRead(), which just appears to be a function of the strength of the resistor (1M) I put in parallel to the piezo, but it's pretty easy to work around just by setting a minimum-reading constant in my code. So basically, my drumset works great for one piezo/drum.
However, once I wire up a second piezo (so now I have one on A0 and one on A3) and connect it to the same AGND like the first one, I start getting weird readings from my piezos. They're not terribly consistent readings... usually striking a piezo causes the value reported by analogRead() to drop to 0 from the "noise value" of 30, though occasionally I get positive readings up closer to 1000. It seems like they must be interfering with each other over AGND, because disconnecting one of the piezos from AGND makes the second piezo work perfectly, and vice versa. (As I was writing this I decided to try with a 10k resistor in parallel instead of a 1M resistor. There still seems to be interference, though instead of going from 30 [noise] to 0 it's usually going from 3 [noise with less resistance/sensitivity] to 30, but still inconsistently, and unplugging one piezo makes the other much more sensitive and consistent still)
Can anyone help me wire up multiple piezos? For what it's worth, I am using "switching diodes" instead of zeners, does that matter? (again I'm a total newb sorry haha)
Thanks in advance!