Piezo Sounder Frequency

RexLan

Senior Member
The resonant frequency of the device is ~ 2900 Hz.

I am using an 8M and the lowest freq. I can get with the PWMOUT command is 3900. I also tried the TUNE command.

I want it as loud as possible and it is running at 12v already. How to get the correct frequency?
 

eclectic

Moderator
Something like

#picaxe 08M

;PWMOUT PWMDIV4,pin, period, duty cycles

; Latest Manual 2, page 158

PWMOUT PWMDIV4,2, 85, 172

; Wizard frequency = 11900 Hz

Ec
 

boriz

Senior Member
“Loud as possible”

Ok. Go to the pound shop and buy a personal attack alarm. Break it open and use the sounder in that complete with its resonance chamber. There will also be a flyback inductor. Use that (or make your own) like this:

One end of inductor connected to 12v, the other end connected to power transistor collector. Transistors emitter to ground (common with Picaxe), and base to Picaxe through 330R resistor. Connect the Piezo from ground to collector.

When the Picaxe signal goes high, the collector goes low and 12v is put across the inductor, charging it’s magnetic field. When the Picaxe signal goes low, the transistor switches off and the back EMF on the inductor shoots the voltage on the collector to many times 12v. Keep the duty cycle low, maybe 10% or so. A ‘scope will help you tune that.

Use a transistor that can cope with high collector voltages. There will probably be one inside the personal alarm.

It will be very loud.
 

BeanieBots

Moderator
Agree with Boriz, particularly the bit about using the resonance chamber.
If you take the self build inductive route, I'd strongly suggest a high voltage zener to protect the transistor. Go for about 30v (or whatever your peizo is rated at) and tune the pulses to give that voltage but fit the zener (even if only during setup) to save any tears. 100v is easy to achieve that way!
 
Top