MiniVol - Simple DIY PGA2320 Volume Control
Dec 31, 2007 at 7:15 AM Thread Starter Post #1 of 37

error401

1000+ Head-Fier
Joined
Oct 11, 2006
Posts
1,244
Likes
11
After receiving a request some time ago from theAnonymous1 over at that other board to write simple firmware to control a PGA2320 (or PGA2310), I found that I needed prototype hardware to test my code on. So I present to the community my board & schematic for critique. It seems like a simple volume control of this type is somewhat in demand around here, and hopefully my efforts will be useful to others.

The design is simple, just a small microcontroller and the PGA2320 chip, plus the necessary connectors (button headers, audio i/o, isp header and power). It is designed so that it can work with either up/down pushbuttons or a rotary encoder, with a configuration jumper to select. A mute button header is provided, with an indicator LED. EEPROM on the micro will allow the state to be saved between power cycles. The only other functionality provided is room for a 5V regulator so only +/- inputs are needed.

If you're not familiar with the PGA2320/PGA2310, they are TI's volume control parts (Burr-Brown division), based around digitally-controlled opamp gain stages. This allows a gain range from -95.5dB to 31.5dB (yes, you can add gain). For those applications that need it, a jumper is provided that will prevent the gain settings from being enabled (0dB cap).

On the specsheet, these chips are impressive, but there are some caveats when using them. This board addresses all of the datasheet notes on proper implementation but for one: no input buffer is provided. The IC should be driven by a source impedance of 600R or less, and analog performance will degrade if that's not satisfied, so if the source is the least bit weak, you'll need a buffer stage between the source and the volume control. I don't personally feel that an output buffer is necessary - PGA2320 can drive 600R loads quite well.

Firmware isn't done yet, but my prototype with a PGA2311, pushbuttons and no mute seems to work fine. It should not be difficult to extend the firmware to the planned state. When it's done and tested, the code will be released under an open source license (probably BSD).

Unfortunately, PGA2320 seems to be difficult to source right now, though TI does seem to be offering samples as usual.

BOM cost without the volume control is about $10.

I have put in a fab order for 6 of the boards below. They should arrive in a couple weeks. I have 4 spares to let go to the first takers. Price is $10/board plus $1.50 shipping (US/Canada), just enough to recover my cost.

I have also designed a small (2.5" x 1.4"), all SMD +/-15V power supply based on LM317/337 and the various datasheet/internet recommendations for clean power. I ordered only one of these, but will give full documentation to anyone who asks for it. BOM cost for that is about $20.

Edit Jan 18, 2008: - I have put up a website for the project at MiniVol PGA2320 Volume Control - error404's Audio DIY Endeavours more details can be found there.

Board/Schematic PDF
Complete BOM

minivol_schematic_sized.png

minivol_pcb_sized.png
 
Jan 1, 2008 at 12:18 PM Post #3 of 37
Quote:

Originally Posted by glt /img/forum/go_quote.gif
Can two boards be controlled by a single controller for a balanced volume control?
thanks



no, the board hasn't been designed for balanced application


nice little board, error401 !
I guess size is one of the major goals. Nice work. This tiny board can be easily installed in an amp to replace the vol control. While driven by a modern CDP and directly connected to an amp with decent input impedance it should work without input and output buffers.

I'm going to try the PGA23xx sometime in 2008 too, but I'm planning a larger board with frills like LCD display support.
 
Jan 1, 2008 at 12:50 PM Post #4 of 37
Quote:

It is designed so that it can work with either up/down pushbuttons or a rotary encoder


There are no mounting holes in your image so I have to wonder....

How are you planning on mounting it if you use pushbuttons?
 
Jan 2, 2008 at 9:13 PM Post #6 of 37
Quote:

Originally Posted by glt /img/forum/go_quote.gif
Can two boards be controlled by a single controller for a balanced volume control?
thanks



You could actually use a second board, without a uC, and tap the SPI from the first board to use them balanced.
 
Jan 2, 2008 at 11:39 PM Post #7 of 37
Quote:

Originally Posted by MisterX /img/forum/go_quote.gif
There are no mounting holes in your image so I have to wonder....

How are you planning on mounting it if you use pushbuttons?



I was planning on using my favourite mounting method: zipties, and keeping the buttons off-board (the PCB isn't really set up for onboard ones anyway). I think there's room for 2 mounting holes though, so I may as well add them.

Quote:

no, the board hasn't been designed for balanced application


nice little board, error401 !
I guess size is one of the major goals. Nice work. This tiny board can be easily installed in an amp to replace the vol control. While driven by a modern CDP and directly connected to an amp with decent input impedance it should work without input and output buffers.

I'm going to try the PGA23xx sometime in 2008 too, but I'm planning a larger board with frills like LCD display support.


You could do balanced by tapping the SPI as mentioned. Shouldn't be too difficult - if you just extended the relevant uC pins and stacked the boards it should work well.

Size was a major goal for this one - I'm going to try a design with the SOIC version of the uC and see how much smaller I can make it, but I have a bunch of DIP ATtiny44 on hand so I'll probably go with that design unless it really saves me on board cost.

I'm also planning a much more ambitious full-on preamp (relay selectors, VFD, nice amp stages, lots of digital IO for fun stuff..), but I find it easier to develop in little bits. If I get this working well and the code works well I can integrate it when I get around to doing the bigger project. In the meantime, I need a volume control for my power amp :p.

One more question for you folks: I have 2 free GPIO pins - any ideas for features that could use them? I was thinking of adding a jumper to turn on/off gain in the PGA (ie. limit the range from -128dB to 0dB instead of going to +32dB) and maybe to select between 1dB and 2dB steps or some such. Anyone else?
 
Jan 2, 2008 at 11:45 PM Post #8 of 37
Quote:

One more question for you folks: I have 2 free GPIO pins - any ideas for features that could use them? I was thinking of adding a jumper to turn on/off gain in the PGA (ie. limit the range from -128dB to 0dB instead of going to +32dB) and maybe to select between 1dB and 2dB steps or some such. Anyone else?


I have versions of our Kookaburra code that do this (stop at 0dB) and I get lots of requests for it. It would be nice to be able to switch quickly to that mode. I don't think changing the step sizes will get you much. Maybe add acceleration to the rotary encoder (faster you spin it, bigger the step sizes). That's what we will be doing.
 
Jan 3, 2008 at 1:59 AM Post #9 of 37
I have updated the images in the original post to reflect these changes. There are now two mounting holes and a jumper for turning gain on and off. Please refresh the images.

I could also potentially gain one more GPIO by ignoring the PGA's mute pin and doing that control via SPI. It's pretty redundant...
 
Jan 4, 2008 at 9:22 AM Post #10 of 37
I have just ordered 6 copies of the PGA board (and a bipolar 15V supply for myself
wink.gif
), basically as pictured above, from BatchPCB. They should be here in a couple weeks.

Total cost was $45 for the 6 boards, plus $15.56 S&H. If anyone is interested, I'll give up 4 boards for $10 each plus $1.50 shipping. If you choose to take one of the boards, no promises on the code coming from me. There's a chance I'll abandon this without finishing...

I will post a complete BOM shortly, and if anyone's interested, information on my MiniPow supply board/schematic - but I have not ordered any of these for others since I just slapped it together. LM317/337 +/-15V supply in 1.4"x2.5" (dense double-sided SMD). It looks like this:

pga2320_power_board.png
 
Feb 12, 2008 at 12:31 AM Post #11 of 37
Boards arrived today (finally!) and they seem well constructed. Build quality from BatchPCB is definitely quite good. As I mentioned in my last post, but never followed up on, I put up all the details on my web site:

MiniVol PGA2320 Volume Control - error404's Audio DIY Endeavours
MiniPow LM317/337 Bipolar Power Supply - error404's Audio DIY Endeavours

I built up the power supply first, and after a few scary minutes of diagnosis, I realized that all the diode silkscreens were reversed, so they were all in backwards. After reversing all the diodes, the supply fired up like a champ. Output voltage is within 2% of spec, which isn't bad at all, not regretting the choice to forego a trimmer at all.

Overall it was a pretty easy build. The SOD-323 diodes are a lot smaller than I thought, but manageable. Because they're leaded, unlike say 0805, the bodies are a lot smaller and they're a bit tricky.

If there's interest, I could do a fab run and sell boards, but I don't have any extras of this, only ordered one.

Now to do the volume control board and write up some firmware
biggrin.gif


Pretty small eh:
minipow_complete.jpg
 
Feb 12, 2008 at 2:14 PM Post #13 of 37
I'm pretty interested too. Any chance it'll be remote controlled in the future with LCD display?
 
Feb 12, 2008 at 5:56 PM Post #14 of 37
Quote:

Originally Posted by Polaris111688 /img/forum/go_quote.gif
I'm pretty interested too. Any chance it'll be remote controlled in the future with LCD display?


Not for this project I'm afraid. In the longer term I'm working on a full, totally over the top preamp that'll have all that, but not just for the volume control.

And I still need to write and test the firmware, so it might be a bit before the volume control is ready...but the power supply seems fine now
smily_headphones1.gif
.
 
Feb 15, 2008 at 12:51 AM Post #15 of 37
The first prototype is up and running and playing music! It sounds good, the SPI firmware is working and I've got some nice ramping for mutes.

Still need to do the up/down handlers, switch debounce and rotary encoder decoding though.

Anyway, the design and board seem sound, it all sounds great and works properly. I'll post updates as I get the firmware more complete.
 

Users who are viewing this thread

Back
Top