Arduino controled PGA2310 Preamp - diyAudio
Go Back   Home > Forums > Source & Line > Analog Line Level

Analog Line Level Preamplifiers , Passive Pre-amps, Crossovers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 24th February 2011, 01:35 AM   #1
ialpha is offline ialpha  Australia
diyAudio Member
 
Join Date: Sep 2009
Location: Melbourne
Default 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
  Reply With Quote
Old 24th February 2011, 12:39 PM   #2
diyAudio Member
 
5th element's Avatar
 
Join Date: Oct 2002
Location: England
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.
__________________
What the hell are you screamin' for? Every five minutes there's a bomb or somethin'! I'm leavin! bzzzz!
  Reply With Quote
Old 24th February 2011, 03:47 PM   #3
Leon08 is offline Leon08  Germany
Banned
 
Join Date: Sep 2010
Location: at Home
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.
  Reply With Quote
Old 25th February 2011, 12:10 AM   #4
diyAudio Member
 
5th element's Avatar
 
Join Date: Oct 2002
Location: England
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 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.

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.
__________________
What the hell are you screamin' for? Every five minutes there's a bomb or somethin'! I'm leavin! bzzzz!
  Reply With Quote
Old 25th February 2011, 04:55 AM   #5
ialpha is offline ialpha  Australia
diyAudio Member
 
Join Date: Sep 2009
Location: Melbourne
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?
  Reply With Quote
Old 19th March 2011, 03:46 PM   #6
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
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!
Attached Images
File Type: jpg IMG_0206.jpg (139.8 KB, 1349 views)
File Type: jpg IMG_0208.jpg (118.7 KB, 1257 views)
File Type: jpg IMG_0213.jpg (83.6 KB, 1242 views)
Attached Files
File Type: txt PGA2310_Encoder.txt (1.9 KB, 495 views)
  Reply With Quote
Old 20th March 2011, 01:26 PM   #7
opet is offline opet  Norway
diyAudio Member
 
Join Date: Mar 2011
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.
  Reply With Quote
Old 23rd March 2011, 02:12 AM   #8
Francec is offline Francec  Australia
Banned
 
Join Date: Jul 2006
Location: Port Melbourne, Australia
opet,
Doesn't the application note have a typical circuit for output?

Frank
  Reply With Quote
Old 23rd March 2011, 07:18 AM   #9
opet is offline opet  Norway
diyAudio Member
 
Join Date: Mar 2011
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!
  Reply With Quote
Old 23rd March 2011, 05:45 PM   #10
diyAudio Member
 
Join Date: Mar 2011
maxw, could you provide us the schematics? I'm very interested too!
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino controled HIFI Preamp ialpha Parts 20 27th November 2012 10:08 AM
My Preamp Project: Arduino, I2C, relay selector+attenuator, tube stage maxw Analog Line Level 57 30th December 2011 12:26 AM
Sylonex and Arduino preamp oenboek Analog Line Level 17 12th March 2011 12:50 AM
PGA2310 based preamp finished bostjancek Chip Amps 24 19th July 2010 08:59 PM
Arduino based Input Selector for preamp _atari_ Analog Line Level 5 30th June 2010 02:42 PM


New To Site? Need Help?

All times are GMT. The time now is 08:48 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2