Mini amplifier – 5v powered stereo modules

PAM8403 stereo amplifier board

PAM8403 stereo amplifier board

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.

The internal layout. The amplifier module sits between the two speakers.

The internal layout. The amplifier module sits between the two speakers.

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.

Finished amplifier in its case

The finished product!

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.

Advertisements

RaspBMC

Here we see the basic display showing the title and time. Just a few connections between the LCD and the GPIO connector.

Here we see the basic display showing the title and time. Just a few connections between the LCD and the GPIO connector.

Isn’t it great when you uncover even more depths. I know that people have been to this point way ahead of me, but what a pleasant surprise to discover just how feature packed and useful RaspBMC is.

Our Freeview recorder stopped recording to the built-in hard-drive and so it seemed a good time to try out RaspBMC with iPlayer etc. We’d been given a NAS housing which we could put all our photos and music on, and with a little bit of work it was possible to connect the lot together. Incidentally, it was easier to add in the NAS drive to RaspBMC than it was to map it into Windows 7 – I still haven’t succeeded with that yet…
Tonight I’ve tried adding an LCD display to the GPIO ports – an easy job and might mean that I turn on of the Raspberry Pi’s here into a media centre. I had a spare LCD lying around and got the instructions at AndiPi

Remote control interfacing is handled by a Flirc USB key which can simulate keyboard presses from any remote control. It has to be configured on a Windows PC first (which only takes a matter of a few seconds) and then it’s ready to plug into the Pi. I’ve also got Yatse running on an Android tablet.

Lots of success in a very short time – just the way I like it!