Am having a small animal problem (dogs) and looking the create a device to generate a 20 kHz tone when a sensor is tripped.
The sensor is an easy part (using a PIR), but I can't seem to find out how to run the Piezo transducer from my Arduino.
Was thinking of something like this :http://docs-europe.electrocomponents.com/webdocs/068f/0900766b8068f2a3.pdf
Specs from the ordering page are :
Dimensions 13Ø x 2.5mm
Frequency 0.2 → 20kHz
Lead Length 35mm
Operating Temperature -30 → +85°C
Sound Level 80dB
Supply Current 10mA
Supply Voltage 30Vac
Tone Type External drive
Type Round flying leads
I also read : External circuitry required for operation.
I need to run this in the 18kHz to 20kHz range, so how do I get the Arduino to make it produce sound at this end of its scale (0.2 → 20kHz).
Should I be using something like a 2N2222A from the Arduino output pin using PWM, which would then connect the Piezo to it's required 30Vac with ( I am assuming here ) the PWM turning it on and off at a specific speed / frequency to produce the 20kHz tone ? Can anyone please tell me how to wire this up correctly.