A buzzer is a coil with a mechanical interrupter. When you apply a voltage, the coil energises, mechanically moves a core (usually soft iron) which in turn breaks a contact. The core moves back, contact is made once again and the process starts all over again. The core is usually connected to a sounding board (in better buzzers) to produce the noise, or in cheaper buzzers they just let the core movement produce the noise.
The upside of the buzzer is you just apply volts and it works. The downside is that you have a COIL which is being switched on/off by it's own integral interruptor. This means (a) it's relatively power hungry, usually more than the 25mA maximum a PIC can drive, (b) in most cases requires more than 5v to drive to make a decent noise, but more importantly (c) the crappy ones can produce a significant back-emf which can easily destroy a transistor (or PIC pin) if you don't put a suppression diode across them. Connect a junk Buzzer (or use a Relay cross-connected in series with it's own contacts) to a Battery, and put your fingers across the Battery - the result is the kind of thing you use in prisoner interrogation (or job interviews) where they don't have handy AC volts comming out of the wall (you get the best tips and tricks on this forum - mention it in your Resume when you're applying for your next CIA job).
A piezo sounder is a piece of crystal which changes shape (moves) when you apply a voltage across it (kinda like when you get strapped into old sparky). The movement is constant depending on the mechanical properties of the crystal.
The upside of the piezo sounder is (a) low power, they have an impedance of meghoms therefore require next to no current to drive them, (b) they DO require a voltage to excite the piezo material but it can be as low as 1.5v, (c) they make a hell of a noise when you hit their resonant frequency. The downside is (a) they require being pulsed AT their resonant frequency (ie if it's a 4kHz piezo, they need to be driven at 4kHz), and (b) if you don't feed them with their desired frequency as a drive signal, the noise they produce is quite miserable.
I never use buzzers with PICs because they're mechanically large, need suppression, and are power hungry so require additional circuitry to drive them.
However with piezo's, the secret is you MUST hit that resonant frequency. In one application I used to drive a piezo sounder at 35v in order to get the sound output I desired. Only later I discovered my drive was off by some 300Hz, and by adjusting the software and hitting the right frequency I can now get the same output from the sounder at 5v direct from the PIC only going through a 100nF Capacitor.
Bookmarks