Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › Arduino amp control
New Posts  All Forums:Forum Nav:

Arduino amp control

post #1 of 5
Thread Starter 

 

I started working on a digital POT system for amp control. The idea is to use digital potentiometers (dpots) in place of standard volume controls and trim pots in an amp.

 

As can be seen in the photo, I have an arduino, a CmoyBB amp and a breadboard with an AD5206 chip on it. My ultimate goal for this particular system is to be able to control the volume (with balance control), bass boost and gain with one AD5206, and possibly control bias settings with another dpot. All these would be controlled from a single rotary encoder, with a push button for mode selection.

 

I am still working on the code, and as I am fairly new to coding this is taking some time. But I am making pretty good progress.

 

I have a pretty solid button read code, it will ignore very short button presses, but any button press longer than .1 second but less than 1 second will cycle a mode counter (this will eventually be volume>bass boost>balance>volume...etc), any press longer than 1 second will bring up a special mode(s), these will be used for gain and possibly bias settings.

 

The code is getting fairly complex, and I have the volume section working at the moment, I had the BB working as well, but needed work as it would transfer settings from BB to volume and vise-versa, once I added code to split everything up i broke it somewhere. But  that's the fun part of doing this.

 

As can be seen in the pic, I have it attenuating the input signal into a Cmoy, once I get the code working the way I want, I will remove the BB resistors and the gain resistors and wire those to the AD5206 as well.

Then I will start on adding code to control a small OLED display.

 

The current code could talk with a serial LCD i have, but it is too big for the intended application.

 

Not seen in the pic is the rotary encoder attached to the three wires coming off the lower left hand corner of the breadboard.

 

I may eventually build a system to install on some of my amps, I have a PPAv2 and a Mosfet-MAX that would be cool to mod. 

For those applications,  a muti-pot single chip would not be ideal, the best bet would probably be individual IC's on small boards that could directly replace the on board pots.

 

Joe

post #2 of 5

The AD5204/6 are pretty good, but they are linear pots. You really need logarithmic for volume controls. They also have THD ~0.004%, whereas you can get devices like the PGA2310, 11, 20 etc. chips from TI which are intended as volume controls and have THD better by about a factor of 10. Or look at the Cirrus CS3318 if you need 8 channels in a single package.

 

You can run linear digipots as fake logarithmic pots by skipping values, but everybody who's into digital audio design knows you can get an order of magnitude better distortion...

 

w

post #3 of 5
Thread Starter 
Quote:

The AD5204/6 are pretty good, but they are linear pots. You really need logarithmic for volume controls. They also have THD ~0.004%, whereas you can get devices like the PGA2310, 11, 20 etc. chips from TI which are intended as volume controls and have THD better by about a factor of 10. Or look at the Cirrus CS3318 if you need 8 channels in a single package.

 

You can run linear digipots as fake logarithmic pots by skipping values, but everybody who's into digital audio design knows you can get an order of magnitude better distortion...

 

w

Wow, thank you for the info.

 

I was aware that the AD520x was a run of the mill dpot, I chose it because there was already an arduino library written for it, and the fact that it offered 6 pots in a single IC fit my project very well.

 

My plan was to do a fake logarithmic in software. Once I had that all sorted i though i would ask around for a better suited IC. However, you have answered my questions and then some before I even asked. 

 

As it turned out i had to re-write 90% of the arduino ad520x code anyway, so there really isn't much to gain by sticking with it.

 

Aside form the distortion difference (witch is a huge deal), a logarithmic IC would make the code that much easier to write.

 

Thanks again.

post #4 of 5
The PGA23xx is really nice. Working flawlessly in some of my amps.
post #5 of 5
Thread Starter 
Quote:
The PGA23xx is really nice. Working flawlessly in some of my amps.

Looked into those, they do look like very nice units.

 

They would be a great fit for any of my desktop amps, but for a battery powered portable they are way too power hungry.

New Posts  All Forums:Forum Nav:
  Return Home
Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › Arduino amp control