High Frequency Piezo Driver (Deterrent)

Hi,

I am looking for some advice on a project:

I am trying to build a High Frequency Piezo Driver circuit that will allow me to output somewhere between 15Khz and 20Khz at high gain and i would like the circuit to be adjustable both with the frequency and gain.

I have chosen to use Piezo speakers and have a few questions, I am looking for someone to point me in the right direction:

Correct me if i am wrong but I am assuming that i can use an arduino to generate the signal (square wave, sawtooth wave and possibly sine wave), not sure if you can acheive this range with the PWM, please confirm, then this signal would need to be amplified, so i am looking for an amplifier circuit capable of around 100dB (but this is a guess), i would like it to be adjustable and then someway of driving an array of piezo speakers. I have a few Uno's, Mega's, ESP8266 and i think a Due (ARM) lying around somewhere, what would be best?

Questions:

  • When i look online for piezo speakers in this range they seem to spec ~4Khz - +20Khz but i have read that piezo's are specifically designed to operate in a much shorter range, so will these commonly available one-size-fits all piezo's tap out at certain frequencies. Is there something i need to add to the circuit to make these smoother at the frequencies i want?

  • I have been given a KSB1 SoundBomb speaker (photos attached) with 2x piezo's, these are usually wired into security alarms systems into the main external sounder circuit to go off internally and are quite loud but it simply takes 12V and everything is handled on-board, is there anyway to tap into this circuit and drive the piezo's at a higher frequency using the components already on the board? Also what specifically are the inductors doing, are they producing a sine wave?

• components on board seem to be:

  • Hex Invertor (TC4069UBP)
  • 2x Inductors
  • ceramic cap
  • 2x (what seem like) film caps
  • 3x HF331 Transistors (MOSFET's?)

Extra images of the KSB1:
Photos (KSB1)

  • Does the "size" of a Piezo disc affect the frequencies it can perform at, i have an SR04 transducer which are about 1/5 of the size of the ones in the KSB1 and have seen people playing music through these?

Are there any suggestions for a BOM that could work for what i want to acheive?

Thanks (i have been away from the arduino world for about 10 years so any advice would be appreciated)

I'd pick an ESP32.

Hi Idahowalker,

wow, that was quick, i didn't think these could be driven with any kind of volume from the digital pins at 5V, a review on there seems to think so.

Do you (or anyone else) know if these can be directional (like a parametric setup)?

thanks

A speaker can be used to receive sounds.

There are signal amp modules for an Arduino that are available. Get one and use it for development.

sorry i am not following, i realise a speaker can be a microphone also (maybe i have the terminology incorrect), i have seen setups online that direct the sound from the piezo's (i think they were using the SR04 transducers) that you can only hear it when inside that 30 degree range, i'm just wondering if these would work the same way? or would they need to be en-cased? Thanks

I've not used those things in the way you described. Let me know how it works out when you try.

would something like this work?
Arduino Signal Amplifier
I would like to be able to go loud with it if needed (especially in development)

Try it and see.

will do, thanks - great info

Idahowalker, any reasons for choosing the ESP32 over the other boards suggested?

This will probably work as "teenager repelant"

As a general rule smaller things make higher frequencies but the larger transducer might put-out more at 15-20kHz.

An inverter with some capacitors & resistors can make an oscillator. You should be able to research how that's done and then modify the circuit to increase the frequency (probably by lowering the capacitor value).

An oscilloscope would be nice for checking the frequency, but since it should be in the "audio range" you could record it and check the frequency with Audacity.

The transistors probably boost the current and the transformers probably boost voltage. (A step-up transformer boosts the voltage but that means you need to feed more current into the transformer than you are getting out.)
You should be able to research that but you are probably OK at the upper-audio range.

It's not the transducer. It's the nature of high and ultrasonic frequencies in the air. If you've heard a live band at a distance you may have noticed that the bass comes-through the strongest.

...As a "deterrent" this shouldn't be an issue but it's something to be aware of - With an array of high frequency transducers, the soundwaves will be in or out of phase depending on the distance-difference between the speaker/transducers and your ears. If you play a high frequency tone (maybe 5kHz or above) from a pair of stereo speakers, you'll notice this as you move your head.

At 5kHz the wavelength is a little less than 3 inches so if one transducer is 1.5 inches closer to your ear than the other, that's 1/2 wavelength and they are out-pf-phase and they will cancel. At a full-wavelength they are back in-phase and they will add instead of subtract, etc. Of course you have two ears so that makes things more "interesting", and if you are in a room the reflected soundwaves will also add & subtract in unpredictable ways. We don't usually notice this with music because there are many simultaneous frequencies and they are always changing, and we are used to it.

1 Like

Hi DVDdoug,

Thanks for the detailed response, I appreciate it!

It sounds like it's worth trying some generic transducers and the two i have in the SoundBomb.

Regarding the current circuit in the KSB1, am i right in thinking that the Hex Invertor along with the capacitors and resistors are proving the main pulse/frequency then? Lowering the value of the capacitor will make it charge and discharge faster therefore raising the frequency of the signal? Do i have that right? if so, how would i calculate a value and type of capacitor and could an adjustable/trim capacitor be used to find that value? (i do have audacity, good idea - poor man's scope..) also how do i know which is the main capacitor to change or do i change all 3x? I am asuming it's the larger capacitor, seems to connect across pins 13 and 10 on the datasheet: datasheet

The transformers and transistors make sense for increasing the voltage and current (thanks)

Blockquote
At 5kHz the wavelength is a little less than 3 inches so if one transducer is 1.5 inches closer to your ear than the other, that's 1/2 wavelength and they are out-pf-phase and they will cancel. At a full-wavelength they are back in-phase and they will add instead of subtract, etc.

I am not sure i totally understand this, sorry, when you say they cancel, do you mean they cancel each other out being out of phase and therefore you would hear neither of the speakers output (is this like how noise cancelling earphones work?) unless both ears are within the same distance from each speaker (and within the 3" wavelength) - or do i have this totally wrong?

If i wanted to play with this KSB1 circuit, how could i decrease the volume, so i dont blow my head off? would adjusting the input voltage to the board to say 5V stop it operating or damage anything if it's designed for 12V?

Thanks

Outside of the Portentia's and the BeagleBone's and a few others, for the price the ESP32 has a rich feature set for a micro-controller.

Yes, i agree, just looked up the specs, it might be overkill for what i am after but i might upgrade later down the line, bluetooth and wifi control would be handy, thanks

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/index.html

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.