Adjusting volume of speaker using switch and N-channel enhancement MOSFET
I am using PWM on AVR for audio generation. In order to control volume of speaker I want to use N-channel enhancement MOSFET and with the help of single switch I want to control volume as lowest --> lowish -->medium --> highish --> highest --> highish --> medium --> lowish --> lowest ... etc. And for different volume levels I want to use individual MOSFET. Is it possible to do so?
In case where no volume control is required it can be done by connecting Gate of MOSFET to PWM o/p pin through resistor, Source to speaker and Drain to Vcc. But when it comes to volume control I don't get how to do it with more than one MOSFET? What will be the connections then?
In case where no volume control is required it can be done by connecting Gate of MOSFET to PWM o/p pin through resistor, Source to speaker and Drain to Vcc.
Really? Looks like a very limited audio DAC and amplifier design. Does your speaker tolerate DC current? Which pwm frequency? How many bits resolution?
You can of course control the volume by multiplying the audio signal with a constant, without additional hardware, unfortunately further reducing the resolution. No idea if it matters at all for this design.
You can of course control the volume by multiplying the audio signal with a constant, without additional hardware, unfortunately further reducing the resolution. No idea if it matters at all for this design.