Go Down

Topic: peizo knock Example (Read 2 times) previous topic - next topic

Chagrin

Some piezo buzzers have circuits in them to make them "buzz" when voltage is applied (they're "self oscillating"). That's what yours is, JimboZA, and those (apparently) don't work as knock sensors.

JimboZA

Quote
those (apparently) don't work as knock sensors.


Aha!

So, next question then, is how does one specify to the shop that one wants one as a sensor not as a buzzer? (Hmmmm, probably answered my own question there  ;) )
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Aarwhy

JIM,  Thanks for putting in the time & effort to do that,

I have it working of sorts.  Nothing like the sensitivity I want, but working.
Look at this for sensitivity:   https://www.youtube.com/embed/8ZVFKvgJQtA?feature=player_detailpage

I have changed
1) const int threshold =1;  // threshold value to decide when the detected sound is a knock or not
2) int sensorReading = 1.2;      // variable to store the value read from the sensor pin
3) delay(2);  // delay to avoid overloading the serial port buffer

I also read somewhere that if you increase the size of resister, it will increase sensitivity,  any body know anything about that?

afremont

I'm afraid this circuit screams for an op-amp.  Allot of those piezo buzzers are very narrow banded, but they all pretty much should be able to "hear" something; it just might be extremely weak signal especially the further it is from the centre frequency of the piezo element. I've used one of the cheap rad shack ones that look like the picture for listening to a ticking watch, but it took an op-amp and a comparator to clean it up enough for a micro to really process.  That video with the ants is certainly using large amounts of amplification to get that kind of sensitivity.
Experience, it's what you get when you were expecting something else.

JimboZA

Rod your 2) and 3) won't make any difference... in 2) that just sets the initial value, which gets overridden first time thru the loop, and 3) is just how fast it goes thru the program.

Regarding the resistor, well I'm going to try that now with a bunch of 1M resistors in series and see what happens
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Go Up