I had been looking to create a little monitoring amplifier for the Raspberry Pi for a while, as well as creating an amplifier which our phones could plug into for listening to music. After trawling that well-known internet auction site, I came across these little boards for an absolute bargain price of 99 pence each with free postage and packaging.
The power supply requirements are around 2.5v to 5.5v, which means it is suitable for powering from a USB power supply.
The module is described as a “PAM8403 5V DC Audio Amplifier 2 Channel 3W*2 Volume Control USB Power New Board”. There are a bunch of connections on one side, and a volume control/on-off switch on the other.
The connections (0.1″ spacing) are:
- Left and right speaker connections (8Ω)
- Power (2.5v to 5.5v)
- Stereo audio input (Left/Right/Ground)
I hunted around the parts bins and soon came across an old usb cable and a 3.5mm stereo audio cable. These took a while to strip and tin as the usb cable had really fine wires. I needed a voltmeter to determine which of the connections would give me 5v. To make things more awkward, the colour codes used didn’t match with any of my internet research.
On to the CAM router to produce a case. The first one would be for my wife while she goes into labour, so I opted for something a little more interesting than a black box.
The template was generated from some earlier work (It’s the same size as the servo robot) but equally it could be created from the Automatic Case Designer
I use a lot of foamed PVC sheet with the router as its easy on the cutters, gives a little and makes a case that looks professional. The tabs fit the slots perfectly if a 3mm cutter is used. The case tends to hold itself together purely by friction although a glue gun can be used to permanently join the sides together.
The amplifier module comes without a knob, but searching around I found a 6mm splined shaft soft-touch knob which does the job perfectly.
Here we have the finished case. The speaker grilles are drilled using the router into a heart pattern. The cables are USB power and a stereo jack.
One advantage of USB power was that the amplifier can also be used with a USB backup battery to make a portable amplifier. Alternatively, I found that the USB sockets on the Raspberry Pi can also be used.
Eventually, I’ll make a similar circuit for the Dalek so that it’s self-contained.
In conclusion, this little amplifier board is a perfect little problem solver. It might be possible to drive it direct from the 5v supply on the GPIO connector, although a pretty beefy power supply might be needed if the full 3w x 2 is required, given that this equates to over 1Amp. I suspect that the Raspberry Pi might crash if the amplifier is driven at high volumes with a particularly weak power supply.
Another alternative might be to create an internet/network media player. Couple one of these to a Raspberry Pi running Kodi, stick in a USB WiFi dongle to pick up network attached storage, and use a mobile phone app such as Yatse (Android) as a remote control.