Jump to content

Audio System Controller - A different take on DIY


zning4

Recommended Posts

Hi Everyone,

 

For the past few months, I have been working on a project and thought I might share it with you. Though it is quite a different kind of DIY, I hope you will enjoy reading about my experience while building this machine.

 

Motivation

I have been DIYing since a young age and honestly speaking, 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.

 

556092_10150687017332574_448095122_n.jpg

 

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.

http://arduino.cc/en/Main/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 (http://nwavguy.blogspot.sg/2012/04/odac-released.html). 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.

 

538984_10150963434517574_565675708_n.jpg

 

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.

 

6070_10150954840317574_24514743_n.jpg

 

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.

 

295132_10150963877967574_1962677581_n.jpg

 

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..

404068_10150971080837574_1378901534_n.jpg

 

Finally, here is a video showing how the system operates:

[embed=425,349]<iframe width="560" height="315" src="http://www.youtube.com/embed/HRHaDTseBO4" frameborder="0" allowfullscreen></iframe>[/embed]

Sorry for the very amateurish video :P

 

Thanks for reading!

 

Link to comment
Share on other sites



  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

Bro I am rather impressed. I have been thinking of doing something like this myself but sadly missed the queue for programming brains when I was born.

 

I have played with basic stamp in the past and did do some coding in C many years ago...but I'm more of a hardware guy.

Link to comment
Share on other sites



Thumbs Up!!  :o

Thanks!

 

Bro I am rather impressed. I have been thinking of doing something like this myself but sadly missed the queue for programming brains when I was born.

 

I have played with basic stamp in the past and did do some coding in C many years ago...but I'm more of a hardware guy.

I am also mainly a hardware person and only started picking up programming last year. It really isn't that difficult to learn, main thing is that you've got to keep practising and get the logics right. Give it a try wizard!

 

Be nice to set a -20db mute option too when you want to down the volume but not miss anything like when  the phone rings :D

This sounds like a good idea!

Link to comment
Share on other sites



Zning....tatz a good one! young and talented , always hang around quietly in some corners during NoIsing.....now its your time to shine! u shd not be just a non-participant year after year!

...wow finally up and running. i can see you put some effort into this and killing some brain cells along the way :) impressive job but i have to agree with gaga that it's a shame to not share it at NoiSING.

K la, I shall bring this to NoiSing this year (: Still have space for me to participate as a participant Johari?

 

wow this is very interesting. wonder if they sell in single units...

Link to comment
Share on other sites



Zning... where did you source all the different parts? Locally?

 

a list of links would be helpful for those of us wanting to dabble in the digital DIY realm.

 

There are 2 main suppliers for robotic/ digital electronics related parts in Singapore:

 

1) Robot R Us: http://robot-r-us.com/

2) Sgbotic: http://www.sgbotic.com/index.php

 

Main bulk of the items I got from them. There is a overseas company that produces modules for the Arduino platform too:

 

1) Sparkfun: http://www.sparkfun.com/

 

Only catch is that shipping is expensive..

Link to comment
Share on other sites



  • 2 months later...
  • 3 weeks later...

Prefer to stick with the mega for now due to...

 

 

Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board.

 

Link to comment
Share on other sites



  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...
To Top