
Overview
I’ve spent quite a while looking for a cheap volume control IC that actually sounds decent.
The TI PGA23xx series are excellent, but they are priced accordingly. I also tried the NJW1195, but I could never get it working properly. Digital potentiometers are another option, but they are not ideal for audio, especially as most of them do not include zero-crossing detection.
The projects I had in mind were all mono, so after a bit of research I ordered five LM1971s from DigiKey. The LM1971 is only an attenuator, so it does not provide any gain, but for this project that is exactly what I needed.
At the time of writing, they were £1.61 each excluding VAT, or £1.19 each if buying 10, so they are not going to break the bank.
To control the LM1971, I wanted a small and cheap microcontroller that could read a standard potentiometer and convert that into the serial data the LM1971 expects. The ATtiny412 seemed ideal for this, and at around 43p each it keeps the whole project nice and inexpensive.
TI recommends using a dual op-amp with the LM1971. One half is used as a voltage follower for the reference voltage, and the other half is used as an output buffer. I used a TLV9362, although other dual op-amps should also be suitable as long as they can run from the supply voltage you choose. In my case, the analogue side of the circuit runs from 12V.
The TLV9362 is around £1.24 each, so still not silly money, and it is perfectly suitable for this kind of audio circuit.
Schematic

The first section of the schematic is the power supply. The LM1971 and op-amp run from 12V, while the ATtiny412 needs 5V.
As always, remember to place 100nF decoupling capacitors close to the LM1971 and the op-amp.

The next section is the voltage divider and buffer for the LM1971’s VREF pin. This provides a reference voltage at half the supply voltage, so in this case around 6V.
You can omit the op-amp buffer here, but TI recommends using one. Since we already need a dual op-amp for the output buffer, it makes sense to use the spare half for VREF.

The LM1971 itself is fairly simple to use. The audio signal passes through the attenuator and then into the output buffer. There are 1uF capacitors on both the input and output.
The input capacitor can be omitted if you are completely sure there is no DC bias on the incoming signal. The output capacitor should be included, as it removes the 6V bias created by the VREF input.
For these 1uF capacitors I used film types. I would avoid ceramic capacitors in the audio path.

The final part of the schematic is the connector for the volume control potentiometer and the programming header for the ATtiny412. I used a 10K potentiometer, which worked fine.
The programming header allows the ATtiny to be flashed from the Arduino IDE using a UPDI programmer.

Programming
The ATtiny412 is programmed using UPDI. I used a UPDI Friend, but any suitable UPDI programmer should work. The code was written and uploaded using the Arduino IDE. When flashing the ATtiny, set the UPDI programmer to 5V.
One important thing to remember: do not power the ATtiny from both the circuit’s own 5V supply and the UPDI programmer at the same time. Use one or the other.
Thanks for looking
Leave a Reply