Readers: If you'd like to build the DS1881 experimenter's board featured in this post, please go to PCBWAY's Community pages--gerber file; KiCAD 10 project/pcb/schematic/library files, a link to github repo with Proof of Concept sketches, an assembly B.O.M., and more, are here.
You can also help out this blog immensely by checking out PCBWAY using the link here. Thanks!
=============
Hello again!
I've breadboarded digital potentiometers before, only to find they make an ugly, audible "click" when changing resistance values inside 30hz-20Khz AC circuits.
I recently stumbled upon an IC that purportedly does away with the click--Analog Device's DS1881--dual pots, I2C, log response--everything needed for an MCU controlled audio attenuator--but also sporting onboard hardware to detect AC zero crossings (like an old Akai sampler?) and change its resistance values quietly.
TLDR: Does the DS1881 work as advertised? Yep.
Datasheet here.
![]() |
PCB DESIGN
| What I don't want.... |
AI was both a huge help (coding the test sketches) and also a huge burden (being out to lunch about why the device was producing audible clicks when it shouldn't have).
The circuit fragment the experimenters' PCB was stolen from the DS1881 datasheet; my test PCB offers additional circuit protection.
For the op amps I used an MCP6004--DIP version--because I had a whole tube of them.
It's a rail-to-rail quad op amp, affordable and easy to use, but can only withstand 6VDC max at its rails without blowing up.....good choice for this application, the 6004 buffers the incoming signal (I added schottky diodes as well) to clamp input to about 0-5V.
Since I had an extra op amp stage I inverted and cap coupled one of the outputs, because, why not?
Power can be from wirepads (PWR-IN) or from a Eurorack style power 2x5 100mil header (don't put power to both!!!).
PWR-OUT is +5 from the regulator, I mostly added it as a test point.
Audio ins and outs are on the top left, "EYE-OH", on 100mil posts.
from the top:
- output for channel 1, 2.5V DC offset
- output for channel 0, Cap coupled
- output for channel 0, 2.5V DC offset
- input 1: used 4V P/P with 2V offset (worked for me--you might want to experiment with P/P and DC offsets)
- input 0: ditto but for input 0.
For the 12V to 5V conversion, I added both a 7805 (I have a whole box of the damn things) and a low dropout, more "modern" choice: SOT-23-5 LP2895. NOTE! If you build this board, please use one regulator or the other--don't use both!
USELESS BUILD PHOTOS
![]() |
| Always: happiness is new PCB's from this blog's patient sponsor, PCBWAY. |
![]() |
| I used both THT and SMD for this one. what do you want for next to nothing? Grab the Kicad files (here) and modify away if you want....MIT license, baby! |
![]() |
| built a bit, powered it up, and saw if there was a short. In this case, no short (yet). Kept going. |
![]() |
| Still no short! Getting the I2C address, I had an ancient UNO-R3 for getting I2C addresses. Worked! Default with A0-1-2 pins grounded is 0x28 |
![]() |
| For firmware upload I used a new Arduino R4--worked great for loading I2C into the test board quickly, then seeing serial output through the Arduino IDE. |
![]() |
| "seems working"--used a siglent function generator for the test waves (4V P/P) and a Eurorack patch cable to the bench BT mixer (here) to hear output. |
THE SKETCHES
- DS1881-diag.ino Run this first, the basic g/no go tool for the experimenter's board. Reveals if I2C can reach the DS1881, tells you via RS232 the IC's I2C address, does basic reads and writes to the DS1881's registers. Nothing for you to enter into serial monitor; the serial monitor's output tells you if your build works or is butt.
- DS1881-enter-db-attenuation-value.ino Entering a value 0 to 64 in serial monitor attenates 0 and 1 channels by said DB.
- DS1886-30ms-steps-100ms-hold.ino Rapid attenation followed by gain increase for both channels. So, a sort of poor man's tremelo. I wanted to see if fast fades caused clicking--so far, none heard. Suggestion: Mess with the ms values in the sketch to experiment with how fast I2C can control the pots and what sounds good to you.
- DS1886-choose-zero-cross.ino The DS1881 fades inputs to -64db then the signal is gradually brought back to unity. Enter z into the serial terminal to toggle on and off the declicking algo inside the chip. This will give you a rough idea of how the DS1881 will sound vs. a digital pot that does not have a zero cross detection algorithm built-in.
HOW DID IT SOUND?
THE SHAMELESS PROMO
WHAT'S NEXT?
digital potentiometers


























