r/AskElectronics • u/OhFuknut314 • 2d ago
Are we talking buzzers or speakers?
I’ve been messing about with piezo buzzers and just generally trying to get my head around some basic bits of bobs with various components that tend to come in a kit… but they all seem to make a kinda nasty whistle sound. Y’know when you turn on something and it plays a little tune of some description? What is going on there? And how to you influence what “tune” it plays? I’m googling/youtubing every phrase I can think of to understand the difference or whether it possible to generate multiple notes from a standard buzzer? Or is it more of a micro-speaker that’s capable of that?
1
u/tech-tx 1d ago
Here's one way: https://www.adafruit.com/product/5791 That's the basic piezo amplifier, but you'd still need something to produce the 'tune'. Many microcontrollers should be able to handle that, especially since that Adafruit board can be set for either a 3.3V or 5V microcontroller. Here's an inexpensive way to do that, albeit with an 8 ohm speaker that you could replace with the piezo amplifier & piezo element: https://www.hackster.io/news/building-a-simple-audio-player-with-an-attiny85-a6b6bf635c21
1
u/Real-Entrepreneur-31 2d ago
Buzzers usually just play one note/frequency often high pitch. Speakers can play the whole sound frequency band.
3
u/PartyScratch 2d ago
There are buzzers with integrated drivers which makes the ac waveform internaly so you only need constant voltage to power them and it beeps but it only produces one tone (mostly on the resonant frequency of the sound chamber so it is as load as possible). There are also buzzers which are passive and you need to drive them with AC. These types can produce tunes as you can vary the frequency as you wish, but requires a driver that produces these frequencies (eg. A simple square wave from microcontroller will do... Many micros have hardware timers which can be configured as frequency generators and you can control the frequency by just changing a value in one register, this is how it's done in many products that play a 'boot jingle' tune or other melodies).