Driving a powered speaker using a microcontroller

snitishiitk

Jan 5, 2012
5
Joined
Jan 5, 2012
Messages
5
I want to drive a powered subwoofer system using the PWM of a microcontroller (Atmega32). Will that be enough or should I use an amplifier?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
What input level is required?

The PWM output (if producing sine waves) will give you an RMS voltage (max) of approx the supply voltage divided by 2.8.

edit: I better explain that. I'm assuming you're wanting to use PWM and vary the duty cycle to generate the approximation of a low frequency (possibly complex) waveform. Note that you'd have to filter the output to remove the high frequency stuff, and depending on the cutoff frequency and the input impedance of your amplifier this could further reduce your available amplitude.
 
Last edited:

snitishiitk

Jan 5, 2012
5
Joined
Jan 5, 2012
Messages
5
What input level is required?

The PWM output (if producing sine waves) will give you an RMS voltage (max) of approx the supply voltage divided by 2.8.

edit: I better explain that. I'm assuming you're wanting to use PWM and vary the duty cycle to generate the approximation of a low frequency (possibly complex) waveform. Note that you'd have to filter the output to remove the high frequency stuff, and depending on the cutoff frequency and the input impedance of your amplifier this could further reduce your available amplitude.

I dont need to sound to be pleasing and clear. I just wanna produce some sort of sound. The quality doesn't really matter. So will directly connecting the microcontroller to the speaker work?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Well, you may get *some* sound. But I thought you said it was a powered subwoofer? That means it has an amp.

It may also have its own low pass filter (which is a good thing).

Do you have the specs on this device? Do you know what sort of input levels it expects?
 

snitishiitk

Jan 5, 2012
5
Joined
Jan 5, 2012
Messages
5
Well, you may get *some* sound. But I thought you said it was a powered subwoofer? That means it has an amp.

It may also have its own low pass filter (which is a good thing).

Do you have the specs on this device? Do you know what sort of input levels it expects?

It takes the input that we normally provide from the output jack of a computer. And yes, it has an amplifier.
 

snitishiitk

Jan 5, 2012
5
Joined
Jan 5, 2012
Messages
5
I just have 2 questions:
1. Will it produce any sound?
2. Will it damage my microcontroller?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1) probably

2) probably not
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
PWM output from a micontroller should go through a simple RC low-pass filter, then it is suitable to put into a line-level audio input.

Bob
 
Top