I'm trying to produce bird tweet on piezo-buzzer using atmega8l timer1 pwm and i'm also get succeeded in that but the problem is the amount of sound i'm getting is very low. I want to sound it bigger. how can i amplify square wave coming from pwm channel A ? My PWM freq is 31.250khz.
I think you can try impedance matching to provide maximum amplitude. and if you are using microcontroller output pin directly to run your piezo, instead use a mosfet as amplifier
I'm trying to produce bird tweet on piezo-buzzer using atmega8l timer1 pwm and i'm also get succeeded in that but the problem is the amount of sound i'm getting is very low. I want to sound it bigger. how can i amplify square wave coming from pwm channel A ? My PWM freq is 31.250khz.
put one RC filter it will change your PWM into sine wave and you can amplify sound with inductive load to drive buzzer you can get very high quality sound
I'm not clear on your question. Are you applying 31Khz to the buzzer , or are you modulating the 31Khz with the audio you want.
If it's the first one , then you must be a bat if you can hear anything :0)
If it's the second , a low pass filter (LC) and an audio amp (LM386 comes to mind) should do the job. It's basically a class D amp.
Cheers
Neddie
Ok but search about generating sine wave with PWM. there is a paper about this and u can write a simple matlab file to generate your file ( write a sine wave and one tooth wave cross point is your PWM but there is a relation between sine wave and tooth wave frequency) save pwm into buffer and send out from micro pin bit byy bit. putting one rc filter will result to desired sine wave. but about LC drive let me to find better circuit for you I implemented several years ago. ;-)
- - - Updated - - -
Hi buddy
Ok but search about generating sine wave with PWM. there is a paper about this and u can write a simple matlab file to generate your file ( write a sine wave and one tooth wave cross point is your PWM but there is a relation between sine wave and tooth wave frequency) save pwm into buffer and send out from micro pin bit byy bit. putting one rc filter will result to desired sine wave. but about LC drive let me to find better circuit for you I implemented several years ago. ;-)