I'm using a cheap Piezo buzzer that came in a sensor kit to buzz using tone(). I ordered about 10 more of them, and sometimes some of them sound bad. (I'm not sure of the reason at this point)
Is there a buzzer/beeper out there that's functionally pretty similar, but more reliable?
I would imagine with most components, as you spend more on them you get better specifications. Looking at Mouser, there are tons of options from about $0.50 to $7.00.
Good point. I will surely have another order at Digikey or Mouser at some point in the future, so I'll try a few of them out.
So it sounds like I ought to just stay with the same sort of component, but focus on spending a bit more. Surely spending $1 each would buy better piezos than the ones I have (which were far cheaper)
What I have is a piezo disc in a little black enclosure. It works with tone() and can go up and down in scale with the tone() options. I don't believe it's a "DC buzzer" that can't be used with tone().
It works most of the time (say, 98% of the time). Periodically, it sounds like a critter is inside there preventing it from flapping. Sometimes if I put pressure on it, it sounds normal again. Then sometimes, it sounds normal again without doing anything. It seems like maybe something physically wrong with the disc or the attachment to the case.
Maybe the piezo is fine, but if these cost $0.10 each, I'll try some $1/each ones before I spend time messing with this piezo.