Piezoelectric signal to pulse

Sensacell

Joined Jun 19, 2012
3,786
I cropped the schematic parts closer together then enlarged the schematic in post #30.
Beware of a very high voltage from a piezo that has a strong vibration. That voltage must be limited.
The inbuilt input protection diodes clamp the voltage to the negative rail, two more diodes as shown in the data sheet would clamp the positive swings.
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,874
The concern has not been about having enough gain to assure reliable triggering, but rather that multiple triggers happen on a single pulse. THAT is the reason for doing a bit of pulse stretching, which is to avoid those multiple triggers. With the pulses to be counted being at least 50 milliseconds apart, stretching the output to 5 or even ten milliseconds would avoid over-counting.
The application requires counting the hits, not simply detecting them. Sensitivity is not the issue, multiple triggers is the problem.
 

MisterBill2

Joined Jan 23, 2018
27,874
A drum vibrates at a booming frequency and the piezo resonnates at a higher frequency that a CD4017 clock input can easily count.
That resonance is the reason that stretching the pulse long enough for all of the vibrations to drop below the trigger level is the reason for my suggesting a pulse stretcher, several times, in fact..
 

BobTPH

Joined Jun 5, 2013
11,593
It's easy enough to suppress the signal from the piezo to one pulse but it requires a delay before the next pulse arrives. So the new problem is the 4017 will miss some of the hits from the drums because of the duration of those multiple spikes and how fast the drums are hit.
That is why I posted the record for drum hits. A 20ms delay would not lose pulses, not even close in normal drumming where 100 would likely be okay. Would it miss all the bounce? Need more data.
 

MisterBill2

Joined Jan 23, 2018
27,874
That is why I posted the record for drum hits. A 20ms delay would not lose pulses, not even close in normal drumming where 100 would likely be okay. Would it miss all the bounce? Need more data.
The pulse vibration lasts several milliseconds stretching the pulse to between 20 and 50 milliseconds will be adequate. Consider that with a 50 millisecond stretch time, it would miss counts faster than 20 beats per second. Probably not possible for most folks to achieve. and certainly hard to dance to.
A 20 Hz shimmy??????? I doubt it.
 

BobTPH

Joined Jun 5, 2013
11,593
Rock and roll drummers typically will make 8 hits on a cymbal (not drum) per measure as the time base (1&2&3&4& as we count it.)The fastest music anyone dances to is about 180 beats per minute, 2 hits per beat. So that would be 2 x 180 per minute, which is 6 per second. That gives you 167 msec between hits. Some non-danceable music might well be faster, but certainly not twice as fast. I would try a 25ms delay after detecting a hit and see what happens, upping it to over 100 if it is still getting double counts.

Edited to correct math, I was conflating beats and measures. In my defense, music tempo is given either in bpm ( beats per minute) or BPM (bars (measures) per minute.)
 
Last edited:

Thread Starter

spokenwurds

Joined Aug 6, 2023
43
Just so everyone knows i have been jotting down everyone’s recommendations and am already give a few of them a try.

i will report back as soon as i have some results.

thanks for everyone’s help, i’m really hoping to get this pup functional by the end of Aug ;)
 

BobTPH

Joined Jun 5, 2013
11,593
My drummer math was wrong! 180 beats per minute with 8 hits per measure is only 6 hits per second, not 24. So, for that speed the delay could be up to 167 msec.
 

MisterBill2

Joined Jan 23, 2018
27,874
OK, I knew that the required delay was much less than the shortest time between beats.
And whatever the ultimate creation is, I would hope for at least some pictures. I visualize drums with LEDs providing some really cool visual effects. and marching drums could be crowd pleasers indeed.
 

Alec_t

Joined Sep 17, 2013
15,134
Flashing lights at >20Hz is pointless, as the flashing won't be noticable to the eyes of most people.
 
Last edited:

Thread Starter

spokenwurds

Joined Aug 6, 2023
43
Hey Everyone,

In the event that i didn’t explain it properly before.

The circuit is intended to provided channel switching to 5 LED stage lights made of LED strips.

The intention of the piezo is to be a trigger from the drums. Therefore lights controlled by the drum strikes.
 

BobTPH

Joined Jun 5, 2013
11,593
Be aware that light flashes at a frequency in the ~5-10 Hz range can trigger epileptic seizures in susceptible people.
Saw the Blue Man Group last year. Before the performance they warned that there would be loud sounds and flashing lights.
 

Thread Starter

spokenwurds

Joined Aug 6, 2023
43
One thing i have been pondering a bit that i haven’t seen recommended is converting the AC to DC. That could square the waves no?
 

MisterBill2

Joined Jan 23, 2018
27,874
One thing i have been pondering a bit that i haven’t seen recommended is converting the AC to DC. That could square the waves no?
Driving the digital input with the piezo signal does square it up, at least in most buffered CMOS devices. That is the nature of digital logic. But because the rising and falling thresholds are not the same, and ARE dependent on rate of change, to some extent, normal practice is to use binary states rather than analog voltages.
And that is exactly what I suggested doing in my first response, was converting the piezo device burst into a controlled width DC pulse. Evidently not everybody understood that was what it was doing.
And I did get, quite early, that drum beats into LED display of some kind, was the goal.
 

BobTPH

Joined Jun 5, 2013
11,593
One thing i have been pondering a bit that i haven’t seen recommended is converting the AC to DC. That could square the waves no?
Not necessary. You just want the first positive peak to trigger a monostable. A pair of diodes should go (reversed) from the input to V+ and one to ground to suppress any negative or high positive voltage.
 

Thread Starter

spokenwurds

Joined Aug 6, 2023
43
Because of all of our very insightful comments some pretty significant hurdles have been identified for this project. Nothing in a bad way but very important to have realized.

1. if functional the constant flashing could be a concern or overwhelming for any audience member.

a. I may need to add a secondary controller that i can switch to that would simply fade in and out two or three channels at a time for some relief.

i) this may require that i add a control input from a variable resistor that would allow for adjusting the speed of the alternating fading of the LED channels.

ii) being able to control paired light displays in a way that two could link to a fading circuit and the other remain on the flashing circuit would definitely make this optimal.

2. Triggering the flashing switcher via the drums strikes via Snare drum and Bass drum will be too fast.

a. Either the strike will happen to quickly and we’ll end up with horrible flickers.

i) being able to control the speed(sensitivity) of the clk signal would be optimal. Whether that’s by being able to bypass one of the sensors via a manual relay switch or somehow using the same variable resistor to reduce the received pulses to the clk input

b. If each piezo controls a separate flashing circuit on the 5 light channels we could end up with current doubling where the output pins send a signal to the same channel at the same time.

i. I could separate the snare and bass drum sensors and assign them to control dedicated channels ie, snare controls 3 channels(light strip displays) and bass drum controls 2 channels(light strip displays).

Summary of project goals:

1. Design a light chasing circuit that steps up a counting IC via clock pulses generated by a piezoelectric sensor detecting single strike vibrations(pressure flux).

i) the addition of a way to control the rate of pulses sent to the IC clk would be an optimal addition. Essentially a way to omit every second, third, or forth pulse generated by the piezo and sent to the clk.

2. Secondary circuit that can be flipped to which provides manual control over the pulse rate of a fader or counting circuit not controlled by the sensors.

3. The ability to split the two circuits in a way that each controls selected light displays would need to be achieve via a manual push switch. Like those you find on guitar fx pedal stomp boxes.

how does this sound?
 

Thread Starter

spokenwurds

Joined Aug 6, 2023
43
Not necessary. You just want the first positive peak to trigger a monostable. A pair of diodes should go (reversed) from the input to V+ and one to ground to suppress any negative or high positive voltage.
Any chance you could show me this in a very simply diagram. It helps me learn the lingo haha
 

Audioguru again

Joined Oct 21, 2019
6,826
Flashing lights at >20Hz is pointless, as the flashing won't be noticable to the eyes of most people.
I agree because old fashioned film movies stepped at 24 frames per second and the blinking was not noticeable.
Now, I played a 20Hz squarewave on Audacity and it sounded like a buzzer, not like a drum roll.
 

MisterBill2

Joined Jan 23, 2018
27,874
There do notneed to be FLASHING LIGHTS. If the drum lit up with every hit, that alone would be quite an effect. If the lighted spots insidet he kick bass drum moved around, that would be a bit of a show. More creativity and a bit less flash.
 
Top