Audio System Controller - 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 3rd September 2012, 10:33 AM   #1
diyAudio Member
 
Join Date: Jul 2004
Location: -
Default Audio System Controller

Hi Everyone,

First of all, I appologise if I'm not posting in the right section cause I am really clueless under what category should my DIY be considered and I've looked through every category and this category seemed most suitable.

So anw, for the past few months, I have been working on a project and thought I might share it with you.

Motivation
I have been DIYing since a young age and I was getting a little tired with the usual DIYing of amps, speakers, preamps etc. Furthermore, ever since I upgraded my speakers, the process of turning on the system got a little more complicated as there was more equipment to turn on in a particular sequence. I wanted to make my system user friendly so my family members could use it too, after all, my speakers took up quite some space in the living room and for that, I am very thankful for them for putting up with my hobby.

Introduction
My quest for this project began as a simple power on sequencer. It consisted of a microcontroller, 3 relays and a power supply. It was a very hasty design with no much thought put into the mechanical design. The project was put in a corner of my room for close to a year without any utilisation.

Click the image to open in full size.

I thought I shouldn't waste the microcontroller that I had earlier bought. So I rethought about this project that I abandoned and came up with the idea of integrating as much things as I could into one box. I also wanted something that would be challenging for me to DIY, something different from the usual DIY that I have done for many years. I came up with a list of things that I wanted to be within this box:
  • FM Radio
  • Power Sequencer
  • DAC
  • Selector
  • Volume Control
  • LCD Display with Touchscreen
  • IR Remote Control
  • Wireless Network Control

The Brains
The heart of the entire system is a microcontroller. I chose to use Arduino as a microcontroller as it was easy to learn the platform, open source and the development platform is free. All you needed to do is purchase the hardware. Furthermore, there was a very active community of people sharing ideas and sample codes to use with Arduino and also providing technical support for it.

In particular, I chose to use the Arduino Mega 2560 board as it had a lot of outputs, I2C bus, SPI, Serial ports for communication and most importantly, large SRAM.
Arduino - ArduinoBoardMega2560

FM Radio
FM radio function is achieved with the Si4703 module purchased from Sparkfun (https://www.sparkfun.com/products/10344). It operates on 3.3V and communicates on the I2C bus, which is easily handled by the Arduino microcontroller. The module has an on board headphone amplifier, thus the output signal requires no additional conditioning before it is fed into the volume control stage.

Power Sequencer
My entire system has 4 amplifiers, 2 per side. Turning them on was troublesome to me as the amps were located near the speakers and not at a common location. Furthermore, there was a particular turn on/ off sequence which I had to follow to avoid damaging the speakers. To achieve this, 3 10A DPDT relay were used for switching the 240Vac. The turn on/off sequence is programmable and can be changed to suit different speaker systems allowing for future upgrades.

DAC
The DAC is the ODAC from nwavguy (NwAvGuy: ODAC Released). Though there were very very mixed reviews about the products from this guy, I decided to give it a try since it was really value for money. The power supply powering this module is fed by a dedicated linear regulator which only turns on when the DAC is connected to a laptop/PC.

Selector
I had 6 sources. DAC, PS3, CDP, Spare, TV and FM. The selection of the source is done through 7 DPDT relays, each source with 1 relay except for the FM module which has 2 as I did not like the idea of the FM ground being always connected to the signal ground. Control of the relays is managed by the microcontroller.

Volume Control
From the selector, the signal is passed to the volume control. I was contemplating between using a DACT motorised stepped attenuator or a digital solution to perform this function. Eventually I decided to adopt a digital solution as it offered a lot more steps although the distortion figure is slightly higher. The PGA2310 Stereo Volume Control IC was chosen. The analog section of the IC operates at +/- 12V while the digital section operates on 5V. This preserves the dynamic range of the audio signal. The IC communicates through Serial Interface, which is also easily handled by the Arduino Microcontroller. Initially, there was an input and output buffer working together with this IC but they were removed as they did not contribute to an increase in performance/ listening pleasure.

An illuminated encoder is used to provide a form of control for the user to set the volume. The encoder's output is wired to hardware interrupt pins on the Arduino microcontroller such that the volume control portion of the software will run whenever there is a change in the encoder's state. Pushing down the encoder will mute the system and the knob will be illuminated red.

LCD Display with Touchscreen
One very important aspect of a technology related product is its user interface. In my opinion, the reason why apple made it so big was because they made their user interface very intuitive. Adopting this principle, a LCD touchscreen was added for the user to control the system. The LCD display is rather primitive but still does the job well. The touchscreen is a 4wire resistive touchscreen where its resistance changes when pressure is applied on the screen. The LCD display communicates with the microcontroller through Serial Peripheral Interface (SPI) and an 8 bit data bus. I had to modify the library provided with this LCD display as the pins that the library used were not ideal.

Click the image to open in full size.

The sources available are drawn as square boxes and touching it would enable the source. The current source selected is shown on the bottom left corner of the screen while the volume is shown on the bottom right corner of the screen. For FM tuning, selecting the FM source will bring the user into a FM display page where the user can tune into the selected radio station.

Click the image to open in full size.

Touching the top right button would make the FM module seek up while the left top button would seek down.

On hindsight, a SD card can be added to this system to allow display of bitmap graphics making the user interface more pleasant looking.

IR Remote Control
An IR receiver is integrated into the system. The IR receiver signal goes through a comparator to minimise errors while reading the remote control signals. Timer interrupt is used to constantly read the IR input for data. Only through using timer interrupts then will there be minimal errors and instant response when a command is sent by the remote control.

At the moment, the IR function is not very sensitive. Still working on it and the main suspect is the comparator's resistor values.

Wireless Network Control
With all the hype about network music players, having a network ready audio system controller seemed like a very fun idea. To provide a wifi connection, the RN-XV WiFly Module was used (https://www.sparkfun.com/products/11048). It communicates with the Arduino microcontroller through serial interface and is able to connect to my home's wireless network. The module is programmed first to connect to my home's network upon turn on and thereafter to host a web server. At the moment, the web interface is very simple consisting only of buttons and status displays.

Click the image to open in full size.

There are still some bugs on the wireless portion of the system as sometimes the data packets get lost and the connection hangs. Still lots of room for improvement.

The final machine looks like this..
Click the image to open in full size.

Finally, here is a video showing how the system operates:
Audio System Controller - YouTube
Sorry for the very amateurish video :P

Thanks for reading!

Last edited by happyboy; 3rd September 2012 at 10:39 AM.
  Reply With Quote
Old 4th September 2012, 05:27 AM   #2
xaker66 is offline xaker66  Russian Federation
diyAudio Member
 
Join Date: Aug 2012
You can see the scheme, preferably in PDF, description of modules and where to get the firmware, and the approximate cost of the exact same
  Reply With Quote
Old 5th September 2012, 06:49 PM   #3
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
Awesome! Got any pics of the insides? Would you share your code?
  Reply With Quote
Old 6th September 2012, 09:40 AM   #4
diyAudio Member
 
Join Date: Jul 2004
Location: -
Quote:
Originally Posted by maxw View Post
Awesome! Got any pics of the insides? Would you share your code?
Hi maxw,
you can go to this FB album for pictures of the build process:
https://www.facebook.com/media/set/?...1777573&type=3

Part of the code actually originates from you, the PGA2310 portion, and I am very thankful for the open source community, thus I am more than willing to share the code (: But I need some time to do some touch up first cause there's bits and pieces of debug code everywhere :S So hang on while the code gets tidied up.
  Reply With Quote
Old 6th September 2012, 10:21 PM   #5
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
Wicked. I love the colour changing encoder!

Do you find the PGA2310 silent or do you get some noise?
  Reply With Quote
Old 7th September 2012, 03:28 AM   #6
diyAudio Member
 
Join Date: Jul 2004
Location: -
I do get some noise but its not audible from my listening position. It could be due to poor layout cause I'm only using a breadboard for the circuit.
  Reply With Quote
Old 10th September 2012, 04:19 AM   #7
diyAudio Member
 
Join Date: Jul 2004
Location: -
Here's the code
Attached Files
File Type: txt ASC_Tidied_Up.txt (26.1 KB, 43 views)
File Type: txt httpserver.txt (10.5 KB, 18 views)
File Type: txt Si4703_zning.txt (9.9 KB, 23 views)
  Reply With Quote
Old 10th September 2012, 04:28 AM   #8
xaker66 is offline xaker66  Russian Federation
diyAudio Member
 
Join Date: Aug 2012
Default 1

Den.Est good and you have a circuit board and firmware to be able to do as you
  Reply With Quote
Old 11th September 2012, 12:56 PM   #9
diyAudio Member
 
Join Date: Sep 2012
wow! thankyou so much.

this is brilliant and just what I am after for my whole house audio system...I am familiar with the arduino (at a basic level) never even thought to look for an FM radio shield!

I love the video, it looks so easy to use.

mine will all be in a rack, and controlled via tcp so no need for a display or remote so that will simplify it for me.

can you provide details of the circuits you are driving please? (particularly the volume control using the pga2310).

thanks so much for posting this.
  Reply With Quote
Old 12th September 2012, 09:12 AM   #10
diyAudio Member
 
Join Date: Jul 2004
Location: -
The PGA2310 circuit that I used is the basic circuit that can be found inside the datasheet. I did not include any input or output buffers as I found that it did not lead to an improvement in performance.

From the output of PGA2310, the signal is split into 2 through a parallel configuration. One signal is fed to my subwoofer amp and the other is fed to the amp driving my fullrange drivers.
  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
Audio Controller 2 peterpan188 Twisted Pear 5 20th January 2012 04:35 PM
New USB 2.0 Audio controller from VIA mikechai PC Based 12 22nd February 2010 08:49 PM
need 5.1 Channel Audio Volume Controller halod Analog Line Level 2 5th March 2008 12:37 AM
I2C controller for Audio DSP elnec Digital Source 6 15th February 2008 10:58 AM


New To Site? Need Help?

All times are GMT. The time now is 06:30 PM.


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