Arduino controled PGA2310 Preamp

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello one and all,
I have been dreaming about a Digitally controlled Preamp for some time now, but lacked the know how to build one. Over the past few weeks I have been playing with a Arduino Mega board, trying to get the hang of programming them. I started off with big ideas, but as this is my first real Micro project I’m going to take baby steps.

Basically im doing something very similar to MaxW but using the PGA 2310 volume controller IC from TI/Burr Brown, The input section will be very similar to maxw's.

Any advice or help along the way would be really appreciated.

To start with, I would like,

-2x Output to existing 100w Amp
-5x unbalanced input selection
-4x20 LCD for menu/input selection and volume bar graph
-Rotary Encoder control for input selection and volume adjustment
-PGA2310 volume IC Volume Control
-Remote controlled Volume and input select

I think that’s going to be enough to keep my busy for awhile. Eventually I would like to have 7.1 ch output for a home theatre system similar to 5 channel power amplifier as well as Digital/optical input, Arduino controlled DAC, but all that’s bit over my head at this stage.

I am on a tight budget (i'm a poor student) so will most likely be buying parts bit at a time. I have a heap of pga2310’s given to me by a work colleague so I thought I would start off with getting them up and running.

MaxW kindly sent me to a post in the arduino forum that had code to test these out. This worked great.

My next step will be getting my Rotary encoder working when it arrives tomorrow, I ordered LCD and a cheapo $3 rotary encoder this morning. Are these any good ? BOURNS|PEC11-4220K-S0024|INCREMENTAL ENCODER | element14 Australia I am going to try GLT's great code from this blog.

ill keep you posted with my progress. Hope someone finds it helpful ;)
 
Having done something similar myself recently, I think the only bit of good advice I can give is to make sure you understand exactly what your code is doing. It is all very well copy and pasting code from somewhere else, but this has the least educational benefit.

Remote control could possibly be the hardest thing you will have to implement and this is an area where copy/paste does come in handy. But finding a decoder that works for your family of micro and remote control protocol could be a challenge.

In fact I recommend you don't copy code from anywhere (except for an RC decoder). Create your own code for the project, this way you'll know exactly what it does and how to modify it for any future application you might have.
 
Well I knew nothing about micros and programming 1 month ago and I've managed to control a CS3318 via I2C and remote control(although I had a little bit of help with the RC part). I've also managed to program an ADAU1445 DSP chip from analog devices too (I've also used the micros A/D converter as an input, the timers/output compare/PWM controller and interrupts. For the internal operations that the micro can perform you really have to study the datasheet in detail. Everything is there, even if the language they try and explain things in sometimes seems Martian in nature. If you stick at it you will get it to work, it can just take time, especially if the hardware is finicky and needs coaxing into operation, like the PIC24s I2C controller :eek: having to add tons of line capacitance to get it work should NOT be necessary!). From my point of view it all seems pretty straight forward. You just have to take your time going through it all methodically and sometimes the answer to 'how' you want do something might not be immediately apparent, but give your mind some time to ponder and you will end up figuring it out.

By the way I found this guys C tutorials on youtube extremely helpful. In such a way that after certain tutorials I was like, oh! I can use this to do this! And I'd program something simple to test it out, that way you put into practice what you've just seen/heard and you learn it properly, rather then watching them all and forgetting it 5 mins later.:rolleyes:

Reading the data sheet also lets you know what the micro can do. It's pointless trying to think of neat ways to handle certain problems if you're not aware of most of the micro controllers capabilities. Also don't hesitate to experiment with something, if you read that an internal peripheral can do something and you think it sounds neat, but you have no use for it, so what! Program the thing and learn exactly how to use that peripheral (even if it's just configuring a timer to output a certain frequency on an output pin). Your experience will only help you in using other features later on.
 
Thanks for your helpful replies,

I've been going through the C videos on youtube, thanks for the link. I did a computer programing module at uni (mostly visual basic) so have a basic understanding of program structure but never used C before and never with embedded devices. intend to write as much of my own code as I can for this project, As you say, this is best way to learn. The great thing about arduino is, its relatively simple to use and the amount of support from the community. Can anyone recommend a good book on the Arduino?
 
I only just found this thread. How did you get on ialpha?

I made a PGA2310 Module for use with an Arduino. With input/output buffers (opa2132s) and integrated analog power supply. I have some PCBs if you want.

Here is some pics and also my simple code for controlling the PGA with an encoder. Hope it helps!
 

Attachments

  • IMG_0206.jpg
    IMG_0206.jpg
    139.8 KB · Views: 2,617
  • IMG_0208.jpg
    IMG_0208.jpg
    118.7 KB · Views: 2,426
  • IMG_0213.jpg
    IMG_0213.jpg
    83.6 KB · Views: 2,411
  • PGA2310_Encoder.txt
    1.9 KB · Views: 1,133
Hi,

I don't mean to hijack the thread, but I just have a quick question. I'm currently trying to do the same thing, but I'm a bit unsure of how to connect the PGA2311 to the existing amp. I just want to replace the volume pot for a arduino controlled solution for starters, but I can't find any info on the hardware part. Is it as simple as just connecting it to the lines, or does it involve additional hardware?

maxw: I posted the same question on a blog post which had the same pictures as your post, so I gather it's yours?

Thanks in advance,

Øyvind

Ps: I'll start my own thread when I actually get going with this.
 
It might have, but I haven't received the amp yet so I'm not sure. Being new to this I just imagined it to be some kind of standard. Trying to learn and prepare as much as possible, but I understand it's a bit hard without having the actual hardware.

Thanks anyway!
 
maxw, could you provide us the schematics? I'm very interested too!
Sure, here is my schematic:
An externally hosted image should be here but it was not working when we last tested it.


add me to the list maxw! Do you sell the board?
I still have that one in the photo if you want to buy it, I don't think I'm using it. I also have a few spare boards if people are interested :)
 
Hi Fellow Melboune arduino hackers...

ialpha, did you ever get this working?

I want to make a networked pre-amp volume control for my house audio sysystem and this fits the bill. will feed some sure tk2050 amps.

I would really appreciate it if you could let me know where you got and share any of your code/circuits.

I am also in Melb. so happy to catch up in person if that suits....and buy you a beer or 3 :)

cheers.
 
Sure, here is my schematic:
An externally hosted image should be here but it was not working when we last tested it.



I still have that one in the photo if you want to buy it, I don't think I'm using it. I also have a few spare boards if people are interested :)

MAXW - Couple follow up questions. First, do you have any more spare boards? Second, is there a reason you chose the PGA2310 over the PGA2311? 11 looks to be almost identical except instead of requiring +/-15V analog volts, it only requires +/-5V, which seems easier to come by since Arduino is powered by +5V and the digital voltage of the PGA231X is +5V. If the 2311 would work, would it be possible to drop it in the socket instead of the PGA2310 on your board, with a few modifications to the power supply?
 
MAXW - Couple follow up questions. First, do you have any more spare boards? Second, is there a reason you chose the PGA2310 over the PGA2311? 11 looks to be almost identical except instead of requiring +/-15V analog volts, it only requires +/-5V, which seems easier to come by since Arduino is powered by +5V and the digital voltage of the PGA231X is +5V. If the 2311 would work, would it be possible to drop it in the socket instead of the PGA2310 on your board, with a few modifications to the power supply?

Yes I have many spare boards, I can send you some for the cost of postage if you wish.

I chose PGA2310 as due to having high supply rails and therefore greater voltage swing or headroom. It is the more popular chip. But to be honest I don't think it makes much difference in reality. The board would be easily adapted to use the PGA2311 if you join a few links but you would still need to supply the negative rail :)
 
Hi guys.

First post on an old post, hope you dont mind.
I came a cross this post while searching arduino pga2310 on google.
Im into a7.1 channels project and i need help.
MaxW can i get the arduino and the pga2310 connection scheme please?
Would it be rude to ask the code as well please?
Or of any of you guys have any inputs ill be happy to hear.
Thanks in advance
Isak.
 
hi maxw.

thank you for your reply.
this code is only for the encoder or for the whole project?
may i ask the scheme of the project please, maybe in PM is its ok?

thanks again :)

I don't think I ever complete an Arduino PGA2310 project.

I made another preamp, details are here:
http://www.diyaudio.com/forums/anal...eamp-arduino-remote-volume-input-control.html
And you can find the code here:
https://github.com/FutureSharks/preamp-v1

Or a passive one here:
http://www.diyaudio.com/forums/anal...remote-control-relay-r2r-input-selection.html
And you can find the code here:
https://github.com/FutureSharks/preamp-passive

Maybe you can find some useful code in there :)
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.