Arduino controled PGA2310 Preamp
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.
It will be difficult to achieve all your goals especially if it is your first project.Learnig programming microcontrollers can take years.And you must know many things about the hardware.
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!
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,
Ps: I'll start my own thread when I actually get going with this.
Doesn't the application note have a typical circuit for output?
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.
maxw, could you provide us the schematics? I'm very interested too!
|All times are GMT. The time now is 01:23 PM.|
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2015 DragonByte Technologies Ltd.
Copyright ©1999-2015 diyAudio