HydraSonic - Arduino Controlled Whole House Matrix Audio System

Discussion in 'Electronics & Electrics' started by davros123, Oct 27, 2012.

  1. davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Hi guys,
    First post in this part of the forums (I think) but no doubt not my last as I embark upon this next project...and most will be asking for help!

    Not content to network my Giotto coffee machine via an Arduino (still not complete and 3 years in the making..but oh so close!), I have embarked upon another project.

    I have decided to create my own whole house audio system. It is a centralised system with existing speaker wires to the zones.

    The basic functionality of the system is:
    * at least six stereo sources
    * web interface
    * ethernet controled
    * at least 4 zones
    * at least 25w per zone
    * goodquality audio, but not audiophile...it's mostly background music after all
    * all the usual zone controls (link/separate source for zones, sep/linked volume, smart/soft mute for doorbell/phone etc.)
    * provide stateful information to my home automation platform (Command Fusion as the GUI and opensourceautomation as the back-end.
    * smart power management
    * is cost-effective (<$300 all up)

    Unfortunately after an extensive search and attempts to jury rig various components together, it was clear that this was not going to be possible with any of the commercial systems available today. I had to build my own. Strangely, there don't seem to be too many people who have created a system like the above. Well at least not those who have published it on the web.

    There are a few bits out there though and I will post references and sources in a later posts. I have the basics designed and there are really five building blocks
    1) Matrix audio switch ($15 MT8816)
    2) Pre-amp ($3 Brown BurrPGA2310)
    3) power amp ($20Sure 25w Class-T...well class D Very nice little unit actually!)
    4) Controler (free from a mate :) Freetronics LeoStick (Arduino) + RasberyPi for web duties)
    5) Power is via a $47 +15v RS-150w MeanWell from power-supplies-australia and various regulators and a couple of $3 TC7662B charge pumps for creating -ve voltages.

    Sad how the PSU is the most expensive part by far...and is a bit noisy if you ask me so may look at that...(or not).

    I have the parts for 2, 3 and 4...and am awaiting 1) in the next few days.

    It all (seems) pretty straight forward stuff when you break it down...but will be a hoot once I get it all together. Once I get the basics done, I'll create a schematic and get some PCB's made. I already have the case for it.

    This guy has done some good research into the PGA2310..incl. this pre/post op amp. circuit.

    Click to view full size!


    Here's the desk at the moment...

    Click to view full size!

    and the arduino controlled pre-amp./volume control. yes messy, but it IS a prototype board after all!

    Click to view full size!


    I'll post as I go and would be great to get some of the experinced guru's on here to help guide the project - so feel free to post any suggestions or thoughts on improvements.

    Also, if anyone wants to partner up and help with the build, drop me a line - it would be great to share the build fun!

    PS. that is my project desk, my main PC setup is on the other side of the room. The desk is a custom made job from progressive office furnature and they did a fantastic job from my rather unique SolidWorks drawings (they even assembled and installed it!) and it was worth every cent to have a dedicated place for projects. I 110% recomend them for any desks esp. custom jobs. Next add-on is a wall unit above it for "stuff".

    Disclaimer : I am a hack but I do love to learn - so be kind if I c*ck upand offend any electronic engineers out there.

    Oh, and this is my music server...
    I use a J.River media centre on a cheap and low power D510 headless all in one mobo with two USB DAC's for two zone audio output...can expand to "n" zones if needed but two simultanious plays is likely enough.

    Click to view full size!


    Click to view full size!


    I control it with ipad's and CommandFusion for most stuff and this remote app http://www.jremote.net/ for more complex music management.

    Click to view full size!


    Awe crap...PPS...I forgot to mention I will grab a few of these arduino controllable FM Modules too and add them into the mix so i also have networked control of multiple FM sources.
    Double Bugger...I just ordered some stuff from Sparkfun and forgot to get these!
     
    Last edited: Oct 27, 2012
  2. paulvk

    paulvk Member

    Joined:
    Mar 10, 2010
    Messages:
    1,031
  3. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,460
    Location:
    Gippsland
    Love the project.

    Few little implementation issues I can see. As an audiophile electronics guy, I'm always chasing the very best ways of designing audio circuits to be the most pure they can be. Many years ago I was looking at building a crosspoint matrix switching preamp, never got past the PCB CAD program and playing with LCD interfaces off a micro (written in assembly, no Arduino back then, and C was rarely mentioned). Anyway, there is a trick to using analogue switches for audio signals to completely minimise their effects on the signal, which should also be very easy to modify into your existing preamp with little changes. Here is an AppNote on the use of analogue switches, don't look too much at all the complicated stuff in there, but Figure 23 on page 14 is the one you want to follow, which will easily go in your preamps first opamp stage. The signal will be inverted in phase, which is no problem at all (many things don't observe correct absolute phase anyway, I've tried to tell if there is a difference, didn't hear anything) but making the output opamp stage on the preamp and inverting configuration will correct it back.

    I would strongly advise to swap out that power supply, at least for just the low powered preamp stuff, for a transformer and linear voltage regulators, like this
     
  4. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Thanks for the posts guys.

    Paul,nsome nice work there...The wiznet is a nice stable chip. I'll be using an etherten from freetronics which iirc, uses a diff. chipset for the thernet...but I have had some success running a web server with it and it seems quite stable.

    dakiller, thanks for the info. I was never really happy with the power, so will create one based upon the one you linked to.

    two questions...
    1) I also need -/+ 5v for the analog matrix, so I assume I can just add another two reg's and filter circuit off the 24v line with no issues?
    2) I was thinking I could use the +15v line to power both the preamp stage AND the power amp stage...thoughts?
    2) what transformer would you suggest. I was going to use a torroidal, but the is so many confusion opinions on this. I'll be buying from element14.com, so it would be great if you could suggest one from the...cheap is best as this is only a background music system after all.

    Thanks guys.
     
  5. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,460
    Location:
    Gippsland
    Just use your +/-15v rails and use the 7805/7905 to make the +/-5v
    Your power amp is just a single rail input, so if you have that big switchmode power supply, I would be using that. Otherwise, use a separate transformer for your power amps to you preamp (it will cost more than that power supply did). The reason is that you need a dual winding transformer for you preamp and if you are to power your power amp off it too, you can only use half of the windings for that and are really wasting the rest. It is much cheaper to get a small dual winding transformer and a separate big one than.

    (there are transformers that you can get that have big power windings and separate low power windings just for these preamps, but i have my doubts you'll be able to find one for you exact situation here)
    You need to specify exactly what you need out of your transformer, then you can really dial in you choices and the decision gets much easier.

    Voltage - AC rectified to DC will make the DC output 1.4X the AC input. You subtract 1.4v for diode losses. If you want 15v DC, 12v AC transformer gets you close. Preamps get linear regulators for a very clean power supply, the linear regulators need at least 3v more in than out, so 15v AC gives a good source for a regulated 15v DC output.

    Power (VA) - Need to know the worst case currents. Don't worry about inrush currents and small transients, you don't have anything to worry about there, just the everything conceivably maxed out continuous current you'll see. really only important for the power amp stuff, I'll tell you that 15VA is plenty for your preamp stuff. Going bigger is never a bad thing with transformers.

    Windings - on the primary winding side, you can either have a single winding or dual windings. Dual windings make it easy to wire in for both 120v or 240v, singles are fixed, just make sure you don't get a single 120v winding. On the secondary side, you need either dual windings or a center tap for your preamp. Dual windings are always more versatile, you can either series them for double the voltage (or center tap for +/- rails) or parallel for double the current.
     
  6. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Brilliant. Thanks for that. I will use the switchmode for the power amp's and get this torroidal transformed from Jaycar for the analogue side of the preamp.
    Cat. MT-2086*15+15 Volts*0.666 amps**1.333 amps
    http://www.jaycar.com.au/productView.asp?ID=MT2086&form=CAT2&SUBCATID=1002#12
    Datasheet here http://www.jaycar.com.au/products_uploaded/MT2086 - Modified.pdf

    It is about half the price of the ones at element14...http://au.element14.com/multicomp/mcta015-15/transformer-15va-2-x-15v/dp/9530266

    I just realised I also need to drive the digital side of the chips and the arduino.

    So,in fact have 4 DC "blocks" to power.

    +5v digital logic (arduino and digital inputs of crosspoint and preamp)
    +/- 15v analog side of preamp
    +/- 5v analog side of crosspoint
    +15v for power amp

    The last three are sorted as per above discussion...Question now is, should I simply put a 5v reg on the 15v switchmode to create the 5v I need for the digital side of the circuit...or will that introduce any issues?

    I think i will just hook it up and see. If there are any issues, i can just get a small transformer/power rectifier/reg. to make a separate 5v for the digital side.

    Thanks again for steering me in the right direction.
     
  7. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,460
    Location:
    Gippsland
    Chasing the small gains, I would have a separate digital power supply, but I don't think you'll have to many issues just using the 5v analogue supply. Definately use the analogue supply for the digital sides of the crosspoint and preamp chip. The arduino doesn't do terrible things to the power supply either to worry about isolating it. A good dose of bypass capacitors on each chip will stop just about anything here.
     
  8. paulvk

    paulvk Member

    Joined:
    Mar 10, 2010
    Messages:
    1,031
    The etherten uses a wiznet chip but only a 32K mega where the wiznet module has a 128K mega with an extra 32K static ram chip added much better value than the etherten and a lot more room to run the programs it will run anything you can put on the etherten and much more. Anyway best of luck with your project sorry can not help you with the software as I use Bascom with its very active community, powerfull commands and proactive developer.

    Regards Paul
     
  9. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Nice to know. Thanks Paul. I'll share my circuits and code as I get blocks operational...perhaps i'll start a github...as long as people promise not to laugh at my lack of coding skills!

    I've missed Jaycar for today and need a few parts from ELEMENT14 so will be a few days delay while stuff arrives via mail. That might give me some time to draw up the schematics in Eagle. I sadly seem to have about 8 projects on the go at the moment so will be a challenge to get things completed but will try and post updates every few days.

    I really must start completing things!
     
  10. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    still need to order the parts for the power supply from element14, but picked up the torroid from Jaycar today. Could not help myself and decided to get some pcb etching gear too..then on the way home went past Officeworks and grabbed a $15 laminating machine (now that is really cheap!).

    Tonight's task was teach myself Eagle...well, it's 12:30am and I am just working out the basics. The sparkfun tutorials are great...but man this UI was developed my apes! it's just so 1980’s. Anyway, i need to get over this hump as I want to prototype some boards myself before I get them done by a service...that way I can test out a few things over the weekend.

    eagerly awaiting those MT8816‘s...that will be the fun bit (if fun=hair pulling) as the pre-amp is basically working (but has crosstalk and hum issues from being on a protoboard and fed by a poorly filtered psu). Though I still need to set it up to control 4 pga2310‘s (one of the reasons I want to etch my own boards).

    cheers.
    Dav

    While i am awaiting the parts...I might spend some time cleaning up the code as well as create a simple volume control UI for the iPad and upload a video to YouTube. It's all pretty basic, but it works and may be of interest to some to see it running as a remote controled volume over ip from the iPad.
     
  11. paulvk

    paulvk Member

    Joined:
    Mar 10, 2010
    Messages:
    1,031
  12. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Thanks Paul...seems I have embarked upon the Eagle journey...so I'll keep atit for now but may well swap to another tool if it gives me too much hassle.
    I have drafted an early hack at a schematic for the pre-amp board...

    Thanks for the link to the PCB boards...damn...that's fantastic. I'll grab a few and have a play. I will be using the phographic paper transfer trick in a laminator...so can not wait to get this layout done so i can try it out! I might have a go at the power suply first as it's going to be much simpler to do the board layout.

    I'd be very keen to hear any suggestions on how I can improve it. One thing I see I have missed is power leds.

    The high spec op amp's are possible overkill (esp on the output side) but hey, I thought I would add them and can see if they make any diff. and they are not really that expensive over a normal opamp in the scheme of things.

    It's based upon the pre-amp circut I linked to above.


    Click to view full size!


    It is my first ever go at creating a schematic so be gentle but firm :Paranoid:
     
    Last edited: Nov 1, 2012
  13. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,460
    Location:
    Gippsland
    Bypass capacitors on the opamps, exactly like the ones on the PGA.

    I really think you should incorporate the crosspoint switch into the input stage opamps like I said in my first post
     
  14. paulvk

    paulvk Member

    Joined:
    Mar 10, 2010
    Messages:
    1,031
    If you do get some of the Kinsten board its good to get the developer it does a better job than any other method RS components has a bulk pack for a good price if you intend to make boards now and then like me (I have used the others) I also use ferric chloride to etch my boards its fast, does not need heating, has a long life (my stock is over 20 years old) you just need to be carefull not to spill it as it turns things brown.
     
    Last edited: Nov 1, 2012
  15. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Thanks guys.

    Paulvk, I'll take a look at RS and grab a few of the boards...will make the initial prototyping easier....just need to get the board layout sorted...wow, what a pita layout is!

    dakiller, i'll add the two bypass caps to the opamp's as suggested (one is a tant. and the other ceramic).

    re. the crosspoint...i looked at the link you pointed me to but must be misunderstanding it. I thought it was suggesting using 10k input resistors on the inputs to the crosspoint...but i am clearly missing the point...can you explain it in another way?

    re. the physical design, I was planning to create the pre-amp (pga2310) as a separate stereo (two channel) modular board with interconnecting headers and "stack" them so I can just add another board (two channels) by clipping on an additional board to the stack.

    The crosspoint would go on a separate board....perhaps at the bottom of the "stack". That way I could have a play with changing out and upgrading the crosspoint...as well as add a board at a later date for say tone and balance controls.

    The amps are of course separate stero amp units.

    Cheers.
     
  16. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,460
    Location:
    Gippsland
    [​IMG]

    Analogue switches don't like to have too much voltage on them, so arranging them in such a way that they are always at ground potential, you eliminate all the problems.

    An opamp will adjusts its output such that the 2 inputs are at the same voltage, that is their primary function. If you tie the non-inverting input to ground, then the inverting input will be at ground as well. This is the inverting amplifier configuration and is the way that is most used to sum multiple signals together.

    That is something I forgot to mention, do you intent to play and mix multiple sources through to the same output? The circuit above will do just that.
     
  17. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Ah, now I get it. No, I do not want to mix signals. I want one input source to go to one or more outputs. But each output will only play one source at one time (though I may adapt this at a later stage to allow voice over for HA events or doorbell/phone ring...but that will prob happen via a different method). Anyway, I digress.

    The issue with the above circuit is that there is just one output. In my usage, there are 8 independent outputs (actually 4 stereo pairs)...hence I can not tie all outputs together.

    Does that make sense?
     
  18. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,460
    Location:
    Gippsland
    You just need more of this circuit. All the inputs to the crosspoint have the input resistors and all the outputs go to the inverting input opamp pins

    Draw it, it'll become clear
     
  19. paulvk

    paulvk Member

    Joined:
    Mar 10, 2010
    Messages:
    1,031
    Just for some info I had a look at my bottle of developer its RS stock number 690-849 its 500gm makes 10 litres at the reccomended strength but I have found its good at half that so 20litres worth, life time supply even for me! cost $38.20 +GST Any way if you need any info on making boards with the positive Kinsten let me know!

    Here is an image of a board made with the Kicad , inkjet transparencies on Kinsten Note how I have a ground plane surrounding every thing this helps with noise suppression and the less copper you need to remove the faster it is to etch the longer the chemicals last.
    [​IMG]
     
    Last edited: Nov 1, 2012
  20. OP
    OP
    davros123

    davros123 Member

    Joined:
    Jun 18, 2008
    Messages:
    2,837
    Thanks for the support guys.

    I recieved a pressie in the mail today...so here are all the parts.

    Click to view full size!


    Now I just need the time to put it together...power supply is the first step, then I can prototype the crosspoint switch and link it into the existing pga3210 and get cracking on the board designs.

    Why did God make toys, but not give you the time to play with them!

    Cheers.
     

Share This Page