Moderators: Dave Moll, Andrew Davie, Steve Anderson
Steve Anderson wrote:You could use any small amplifier but ideally you should filter off the PWM component so the amp and loudspeaker don't have to handle it. A simple RC filter of say 1k in series with the PWM signal, then a 10nF cap to ground will do that. Feed the signal from the junction of the R and C into the amp. This will suppress your 187.5kHz PWM component by about 60db. (1000).
Steve A.
Steve Anderson wrote:Well, the expression 'ideally' was to infer that the loudspeaker is inductive - a coil within a magnetic field. At 180kHz (or whatever) it's not going to pass much current, current in a loudspeaker = volume. It is a way of averaging things out, but it's not that efficient. Average out the PWM with a simple RC filter in this case and you should have bags of noise.
For LEDs driven with PWM our eyes do the averaging as the LEDs respond quickly to the PWM, loudspeakers do not, they're mechanical.
Steve A.
Steve Anderson wrote:Sorry Andrew I have no idea why this isn't working. What audio amp are you using?
Steve A.
Klaas Robers wrote:Andrew, I would definetely use an analogue potentiometer for volume control and let the Arduino output a PWM signal as loud as possible. Then you use the full 8 bits range and you get a certain signal to noise ratio.
If you are going to make a lower volume in a digital way, the sound will be less loud, but the noise will have the same amplitude. Then you go from 8 bits quantisation to 7 bits, 6 bits, 5 bits. With an analogue volume control the quantisation will remain 8 bits and sound and noise will decrease in the same ratio. Don't let it get worse than it is already.
Andrew Davie wrote:I am wondering if I just put too much juice to the speaker this time and basically just fried it.
Return to Andrew Davie's Arduino Televisor
Users browsing this forum: No registered users and 4 guests