Hi all,
I've got a small 4-ohm speaker and I've been looking up how to safely play wav files with an Uno (+sd card) without any shields. Eventually I've came across this PCMAudio library: Arduino Playground - PCMAudio
I don't understand the code entirely yet but after reading the comments in the code I conclude it essentially sends PWM signals to the speaker. After intensive reading about speakers I have few concerns about this:
- Only positive voltage. PWM signals (output by UNO) have a range of 0V - 5V, so this would drive the cone of the speaker in one direction. It will probably be enough to make sounds but wouldn't this damage the speaker in the long run? Also this doesn't allow the speaker to operate optimally.
- Power dissipation. Real life sound signals are for the most part continuous signals, and in comparison pwm signals have a higher power output for 'the same' audio signal.
- Constant DC voltage for a short moment on every pulse which supposedly is bad for the speaker (it stalls on the cone in one position?)
- Sound quality. PWM signals have a lot of harmonics distortion causing distorted and kind of 'robotic' sound.
Are these real shortcomings or did I miss some important information? Before reading up I knew not much about speakers and I kindly hope you guys can clear these points up either by reconfirming or pointing out why it's not something to worry about.
TLDR; is PCMAudio a viable and responsible way to drive a 4-ohm speaker with an Uno without any shields?

