Tag Archives: ds1868


LM386 based stereo audio amplifier with digital volume control

Due to its simplicity (requires minimum external components) and high availability, LM386 is very popular among hobbyists for use in low-voltage audio amplification applications. Most of the time a potentiometer is used at the input side of LM386 to provide a volume control in the outputĀ speaker. The potentiometer does not control the gain of the amplifier itself, but it creates a voltage divider network at the input, which in fact controls the fraction of the audio signal that is fed to the amplifier. This project is about a stereo audio amplifier using two LM386 ICs with digital volume controlĀ for both left and right speakers. So, how would you control the volume digitally? You are right, by replacing the traditional electro-mechanical form of potentiometers with digital potentiometer chips. This project uses MAXIM’s DS1868 dual digital potentiometer chip and a PIC microcontroller to control the volume of a stereo output from two LM386 ICs.

Stereo audio amplifier with digital volume control

Read more

How to interface MAXIM’s DS1868 digital potentiometer with a PIC microcontroller

Potentiometers find applications in many electrical devices. For example, a light dimmer uses a potentiometer to control the brightness of lamps. In amplifiers, they are used to control the output volume of the music, or change the bass level. In an adjustable power supply we see potentiometers to vary the output voltage and current. In a frequency generator, they are used to control the duty cycle and frequency of the output signal. These potentiometers are electro-mechanical transducers that convert the rotary or linear displacement into a change in resistance. This change in resistance can be used to control anything from the brightness of a lamp to the direction of a rocket. But things have been changed lately. You can now vary the brightness of the lamp with touch switches. The volume of an amplifier can be controlled through a remote, and the frequency of an oscillator can be varied with tact switches. There are still potentiometers in these devices but in the form of silicon chips and not in the conventional electro-mechanical form. These are called digital potentiometers and today we will discuss about MAXIM’s DS1868 chip, which has two digitally controlled potentiometers. We will interface it to a PIC16F1827 microcontroller and vary the position of the wiper terminals from one end to the other.

Controlling the wiper position of DS1868 digital potentiometer

Read more