Can hear Piezo at frequency where I shouldn't

I'm trying to build dog anti barking device using piezo buzzer and tone() function.
When I set the frequency lets say to 40kHz I can still heare the buzz, but humans hearing level should end around 20kHz. What am I missing?

Thanks

Assuming it's really 40kHz... The piezo transducer is "imperfect". It's resonating/vibrating. You might be over-driving it... At lower levels that probably won't happen.

As you may know, a square or rectangular wave contains harmonics (higher frequencies) but there are no sub-harmonics (lower frequencies) so anything lower than 40kHz has to be a mechanical artifact.

actually the I hear it all the way. from 1Hz- 65000-ish Hz.
I expected that somewhere around 20kHz it will start fading for me.

65000? Hard to fathom that.

You might need a better transducer... Maybe one designed to be a [u]hi-fi tweeter[/u].

Or, maybe you can live with it as long as it's less annoying than the dog barking.

I'm using this one: LINK

Board Min frequency (Hz) Max frequency (Hz)
Uno 31 65535

Maybe I understand how piezos work wrong. I assume they vibrate on wide spectrum but their resonant frequency is simply the most effective section, right?

Maybe I understand how piezos work wrong. I assume they vibrate on wide spectrum but their resonant frequency is simply the most effective section, right?

Not quite.

You are putting the energy out from the sensor at an ultrasonic frequency. This is energising other things like the housing and the mountings of the transducer. These have their own resonant frequencies and are oscillating at these, some of these are in the audio range. That is what you are hearing.

[EDIT] It think I found it... It says "built-in circuit", so it's not just a transducer.

BPT-24X
BPT: Bestar Piezo Transducer
24 : Buzzer Size - diameter=24mm
X : with built-in circuit

I'm using this one: LINK

Just for fun... Connect 5VDC and see if it makes a tone. If it does, it's a buzzer/beeper and NOT a simple speaker/transducer.

It's normal to hear a "click" when you apply and remove DC power, but a transducer won't make any sound with pure DC applied.... You may hear a little power supply noise.

The specs say "buzzer", which would have a tone-generation circuit built-in, but it also says "transducer" which means it would work like a regular speaker, converting the applied electrical signal into sound.

It's also a bit strange that they specify a "resonance" frequency, rather than a frequency range. So, it might be a buzzer.

I gave it 12VDC and it output constant tone.
It means it has some tone-generation circuit built in, right?
Now I need to figure out where and if I can buy tweeter in my market.

See post#4.
Maybe Jameco.
http://www.jameco.com/Jameco/Products/ProdDS/2099702.pdf

Edit
Maybe this one:
http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?search_type=jamecoall&catalogId=10001&freeText=PKM13EPYH4002&langId=-1&productId=1874543&storeId=10001&ddkey=http:StoreCatalogDrillDownView

.

will this one do?:LINK

Frequency response 3kHz - 29kHz

will this one do?:LINK

It should work, but it's meant to be attached to a [u]horn[/u] and it won't be as efficient (as loud) without the horn.

Of course, you can't use it at 40kHz. :wink:

I removed the circuit from one siren, so only transducer should be left.
I applied 12VDC again (but don't know which wire is plus and which is minus).
It makes a short tone and if it try to repeat it, nothing happens. I need to switch polarity to get the click again. Piesos shouldn't be bi-stable, should they?

Ok, now with pure transducer I can still hear it clearly at 60kHz on tone() function.
I got the pieso element from this type of siren: LINK

wjaceh:
Ok, now with pureI can still hear it clearly at 60kHz on tone() function.

No you can't that is way outside the range of human hearing. Unless you are a bat you are not hearing this. I have already explained what you are hearing.

wjaceh:
I'm trying to build dog anti barking device using piezo buzzer and tone() function.
When I set the frequency lets say to 40kHz I can still heare the buzz, but humans hearing level should end around 20kHz. What am I missing?

Thanks

There must be some intermodulation happening somewhere, generating lower frequencies.
It could be parametric driving of some mechanical resonance at a submultiple of the nominal
tone frequency for example.

I know that I shouldn't hear it but there is sound present.
another thing is that this sound changes "linearly" when I raise frequency.
If it were only housing resonance then it shouldn't come along "linearly"?!

I know that I shouldn't hear it but there is sound present.

Yes there is sound present but you are not hearing that frequency.

another thing is that this sound changes "linearly" when I raise frequency.

So your ears work linearly now. It might come as some surprise to know that everyone other human on the planet has ears that work logarithmicly.

If it were only housing resonance then it shouldn't come along "linearly"?!

Just no that is wrong.

You are only hearing the piezo top out. You could tell it to go 100,000,000 and you'd probably still hear it struggling.
You are not 'hearing' what you are putting in. Soz.

is it then impossible to put it working the way that it only works on expected frequency (lets say 40kHz) and would be silent/unnoticable in the human hearing range?