Stereo Amplifier With Digital Volume Control

A regular Hack A Day reader sent in a tip about an LM386 stero amplifier with digital volume control. The resulting build is very professional and could easily be adapted into a slick iPod dock build.

We’ve seen a few LM386-based amplifiers over the years including one that fits inside a 9V battery, but this is the first implementation of digitally controlled volume we’ve seen. The volume control of this amp uses the DS1868 dual digital pot IC in place of the usual 10K pot providing 256 steps between zero and full volume. The DS1868 is controlled by a PIC μC with a 3-wire serial connection, although this could be implemented on any microcontroller.

Although the code provided with this build outputs volume as a linear function, it would be trivial to implement a logarithmic volume output. Because the ear perceives loudness on a logarithmic scale, this would be a great way to adjust audio volume and provide a more fine-grained control. Of course this could be implemented with a logarithmic pot, but where’s the fun in that?

Check out a video of the amp after the break.

Continue reading “Stereo Amplifier With Digital Volume Control”