I have been trying various things with a piezo buzzer. I am using the attached schematic, and added a pot before the piezo for volume control. The sound, however, is rather harsh. Would anyone please let me know how to make a more smooth sound?
Square waves are "harsh" and you may have a non-square rectangle wave which is even more harsh. And, piezo speakers are basically tweeters so they don't reproduce low frequencies.
If you want to get an idea of what square and sine waves sound like [u]Audacity[/u] can generate sine & square waves at the frequency of your choice, that you can play back on your computer speakers or headphones.
From my experience, you will never get a 'nice' sound out of a piezo.
They are made for volume and usually have a narrow band.
Lowering the drive amplitude will help.
Most are designed with resonance in mind.
Filtering for some center frequency may help as mentioned.
You should probably look for a different chip and build a sine wave generator (if that's what you want) instead of trying to "fake it" with a 555...
But first, it wouldn't hurt to play around with Audacity and connect the piezo to your soundcard so you can diagnose your problems and decide where you want to go with this.
I tried it. Not much change. I was using 1k resistor and 0.1uF cap. The volume decreased, but not much else
Did you make a low-pass filter or a high-pass filter?
Of course, when you filter-out the harmonics you are filtering-out some of the sound so it won't be as loud. Plus, a simple RC filter is far from perfect...
Those values are probably in the ballpark, but of course it depends on the frequency. Did you calculate the frequency of the 555 oscillator? (I didn't.)
Did you calculate the duty cycle? (I didn't.) A square wave has a 50% duty cycle and will sound the "least-harsh" of any rectangle wave. It's been several years since I used a 555 but from what I recall, it's not easy to get a square wave. And if you adjust the pot, you're probably adjusting the duty cycle so you no longer have a square wave. A type-T flip-flop will convert a rectangle wave to a square wave at half the frequency, but if you want a "pure tone" you want a sine wave.
P.S.
About a million years ago the company I was working for was designing a new product and they wanted a "beep" for feedback when you pushed the buttons on a membrane keyboard. At first they were trying to get a pleasant sound, and the joke was that they were trying to get the least-annoying sound.
Feddar:
I've tried several speakers on the circuit. Seems to be the circuit, not the piezo.
Any suggestions for circuits I could try
Try creating sound with the Arduino "tone() function!
Try out playing different frequencies and compare!
Although the tone() ifunction is creating square wave output, the sound sounds rather nice with my piezo and magnetic speakers, except with very low fequencies. Frequencies of 440 Hz or above sound clean, especially when used in playing melodies.
What's the frequency of your circuit?
What's the resonance frequency of your piezo speaker?
I think that that square wave output sounds better/cleaner if the output frequency is higher than the speakers resonance frequency.
Thanks. Looks good, but rather complicated. Other than the basic LC circuit, it is way beyond my understanding. Do you know of a very simple circuit that would work? I'm trying to keep it as simple as possible.
jurs:
Try creating sound with the Arduino "tone() function!
I'll give it a try. The problem if that I have a distant circuit connected by Cat5, and all the wires are being used. Using the Arduino to generate the tone will require more wires. I'd prefer to avoid that.
Looks good. But I can't find on Digikey or eBay. Seems to be only available in the UK, where shipping charges to Canada are prohibitive. Also, looks like using the smc0608s, my preference, involves quite a circuit anyhow (from the datasheet).
Thanks anyhow. Any further suggestions?
How about using a small microcontroller like attiny or pic?
Then you can't begin to design a filter for it. Sorry it looks like you are going to have to give up. Their are only a limited number of options. Maybe some one else can think of one.
Feddar:
I've tried several permutations with the above 555 circuit, at 12V, but I cannot get the output to be greater than 8V. Any idea why that would be?