This has already been done and I followed the instructions from the C.H.I.P blog, to essentially build this
Upon connecting the
L/G signal from the C.H.I.P. and without streaming anything, the loudspeaker was issuing a continous hiss, sort of white noise, rather high-frequency.
When sending some audio signal, the signal was very distorded.
Plugging the spekaers directly on the audio outputs of the C.H.I.P. gave a nice sound, although very weak (this is the reason I wanted to amplify it in the first place).
I assume therefore that something is wrong in the way this output signal is processed by the amplifier chip.
I went on reading and articles about how to deal with such nuisances revolve around a low-pass filter. So I added one.
When turning the potentiometer (high resistance to low) I get an almost inaudible sound (I have to put the loudspeaker to my ear) and then suddenly the signal is all distorted again. But the hissing sound is gone.
Sioce I find these hind of hardware hacks fascinating I am ready to jump in to understand everything, and my main question would be: is the approach I have correct, that is: is the output signal of GPIO pins of devices such as the C.H.I.P. or a RPi intended to be used with amplifiers such as the
Another possibility would be a faulty element - I will look for another
PAM8403 amplifier to discard that as the article I was basing my hack on is clear with the the connections.