STM32 Multi-Zone / Whole House Audio System

Welcome to the STM32 Multi-Zone / Whole House audio Blog. I look forward to your comments.

I’m glad to announce that Circuit Cellar Magazine has published¬† my article on this project¬† in the January and February 2014 issues.

Dave Erickson


  1. djericks says:

    I’m looking at alternatives to the LM3886 amplifiers. Great amps, but they draw too much power for an 8-12 channel system, and provide no way to shut them down. I considered a pair of power FETs on the DC for each 2 channels, but don’t like the added cost and complexity.

    Recently I came across the STA540 Amp on SparkFun and bought a board. It is:
    2 amplifiers per chip vs 1 for LM3886
    Less than 1/2 the price per channel
    30W vs. the LM3886 50W. Good enough for me.
    Single +20V power supply
    Much lower quiescent current
    Power down control
    Diagnostic output pin
    Good distortion and noise specs

    The question is whether the crosstalk problem (multiple amps on a single supply) can be easily solved with the STA540. I’ll keep you posted.


  2. Here is the SparkFun stereo amplifier based on the STA540.

    Preliminary testing is that it is very good all around: runs cool, shutdown works well, sounds good, drives 8 ohm speakers with 20V supply, clips very close to the power rails, in facts clips very cleanly.


  3. Dave Erickson says:

    Problems with STM32. The Atollic free version no longer supports large programs, and I’m very unwilling to modify my code to jam it into their limits. And Atollic is very expensive. Also I an still looking for a web site technology. My options:

    Use Arduino Mega or Due. Due isn’t fully available yet.

    Use YAGARTO or other open development library. Need to support it myself.

    Use MBED: $69 CPU and only web development are turn-offs

    Use NPX Cortex M0: Very turned off by their poor examples.

    • I can now reply to my own question. I found and installed CooCox ARM development software and it is quite great. It supports hundreds of ARM CPUs from 9 different manufacturers. I got it installed and compiling and debugging my code in a few hours. It looks like a winner. Good bye Atollic.

      For an update on my Arduino work (ok, play) with Due, check out

  4. Jochen Hammer says:

    Hello Dave,

    this is really a wonderful project!
    Could you please give me some more information about the Crosspoint board:
    - buffer opamps
    - 8×8 crosspoint chips
    Which devices are you using here?

    Best regards


    • Thanks so much. The cross-points chips are Zarlink MT8808, available from Avnet in thee US. I used +/- 6V power to maximize the dynamic range and reduce on resistance (and distortion) a bit. +/- 5V would work.

      The opamps are NE5532.

      Sorry that the STM32 project web site link for the schematics is a dead end. I posted the schematics to the web page. has a link to

      Dave Erickson

      • Jochen Hammer says:

        Hello Dave,

        thank you very much for all your information! I really appreciate this!
        I had a closer look at the schematics in the last hours and must say, that you’ve done a really beautiful job here. I’m convinced now, that this is the design I’d like to build either.
        Beside the Zarlink all components are really easy to get. Purchasing the MT8808 from Avnet USA is a bit of a hazzle and the delivery is expensive, but I’ve found a source in Hong Kong now. The offered devices are not from Zarlink but from MITEL, which seems to be the former company, which made this chip. The datasheet is absolutely identical to the Zarlink one. The price of $6 for a single piece and $4 for shipping seems to be reasonable.

        However, as I wrote already, I’d really like to go for your solution. Am I right, that you’re using Eagle? The look of the schematics pointing me in this direction :-)
        Is there a chance to get the layout files (sch, brd, custom lbr’s)- at least for the crosspoint and the quad preamp board? This would be really helpful and would allow me to make some small modifications without the need to start from scratch. For instance, I’d like to use a PLCC socket instead of directly soldering the device onto the PCB. Regarding the controller I’d like to go a different approach. I’ve got no need for a display and/or the switch matrix, but control the preamp via USB/serial I2C directly from my PC. I would add a controller only for controlling purposes if this would be required.

        I’m really thrilled at the moment and can’t wait to start….

        Best regards


        • Dave Erickson says:

          Hi Jochen,
          The designs are in ExpressPCB and I am willing to provide you the layouts and full documentation, plus the control software. In fact I have 2 bare crosspoint boards I can sell you if you want.

          I like the idea of using a PC I2C interface to control it. I had thought about doing that but wondered if anyone would want it. That is very doable.

          I plan to convert the boards to Kicad or Eagle and commercialize them at some point. If you have PCB layout skills, perhaps we can make some kind of deal. You could lay out the quad preamp board in Kicad or Eagle and I build you a crosspoint board? Or something mutually beneficial. Email me at
          Dave Erickson

  5. Marko Frelih says:

    Dear Mr. Dave!

    This is a very nice preamp you have built. I am looking and analyzing schematics and I do not understand somethinhg. Where/to what did you connect STROBE, DATA and RESET pins from MT8808 (two of them)?


  6. Marko Frelih says:

    And that line driver opamps, did you think of using TI’s LME49710? It is truly High Fidelity opamp …?

    Sincerely yours,

    • Hi Marko,

      Thanks fr the feedback. Schematic 2 in the .zip file below is for the crosspoint, and it shows a MCP23008 I2C to GPIO chip driving those lines. It requires a few I2C commands to first turn off the previous switch and then turn on the new one. I’m happy with the approach, it works well.

      As far as opamps, I’m pleased with the NE5532s. They don’t have to drive much load current, and have good distortion and noise. I like using duals for stereo and the the low cost as well since there are 16 amps. I think the TDA7439 preamps will have a bit more distortion and noise than the input buffers and crosspoints, so the choice of input opamps isn’t so critical. Even TL072s would probably be fine here. Any +/- 12V, dual, SOIC-8 opamp can fit on the board so higher performance amps could be used.

      If you were building just the crosspoint without the preamp stages, I would buffer the crosspoint outputs as well to present a high load impedance to the crosspoint. But the preamp chips have a high input impedance so I didn’t need output side buffers.


      • Marko Frelih says:

        Thank you for your reply!

        I was a little unconcentrated sorry! :D Now I see that 3 pins! Thank you and thank you very much for lecture about opamps!

        Sincerely yours,

  7. Marko Frelih says:

    And just one more think: To what is MCP23008′s INT pin connected? I really do not see connection. Will have to go to get new googles soon. :)

  8. INT is an optional output signal to a processor if you want an IO pin to generate an interrupt. I don’t use it, so no connection.


  9. Marko Frelih says:

    Hi, Dave!

    It’s me again. Tell me something. I am building similar zone preamp. and those audio matrices from Zarlinik, are they capable of switching one input to one output at the time or for example, I can listen input 3 at zones 1,2,3 and input 4 at zone 4 and input 6 at zone 7,8 AT THE SAME TIME?


    • Yes. Each MT8808 crosspoint chip has an 8 x 8 array of 64 switches that can be individually controlled. So any source can drive multiple outputs. It also means that if your software isn’t careful, it can ‘short’ multiple inputs together. So if the inputs are columns and the outputs are rows:
      On Reset, all the switches are OFF.
      On initialization, turn ON only one switch per row. This could be read from non-volatile memory if you care about the initial state.

      Then to change sources, first turn that switch off, then turn the new source ON. This requires that your software remember the old setting. You could also just turn off all 8 switches per row and then turn on the new one. More time and software.

      It sounds more complicated than it is.

      Another trick of this chip is that one chip could be used for a 4 x 4 2 channel (stereo) crosspoint. But if you only wanted 4 sources, the preamp chips also have 4 input switches.


  10. Marko Frelih says:

    Ok, thank for clarification, but my question was, can chip drive simultaniously input 2 on ouputs 1,2 AND AT THE SAME TIME input 1 on otputs 3,4,5,6,7,8 (at the same time)?


  11. Sorry, my long replay didn’t directly answer your question. Yes it can. Any output can come from any input, and all simultaneously.

    Each of the crosspoint buffer amps can drive up to all eight preamps at once.


    • MarkoSiroki says:

      Hello again, Mr. Dave! I am “consuming” documentation about MT8808 but I cannot crack the command that needs to be sent to it for setting for instance, input 1 to all outputs. What is this command sequence?


      • Dave Erickson says:

        Hi Marko,
        Each switch in the crosspoint can be independently turned on or off. If you drive 8 of the connections with inputs and use the other 8 as outputs as I do, then any one input can feed any combination of outputs. It can feed none, one or up to all eight outputs.

        You need code to turn one switch ON or OFF at IN,OUT, where IN is the 3 bit input code, and OUT is the 3 bit output code. I use DATA to specify ON=0 or OFF=1 for that switch. Let’s use a C function setSwitch(OUT, IN, DATA) to set one of the 64 switches.

        On RESET, all 64 switches are OFF. To set all the outputs to a single input, say input 3, here is the code:
        setSwitch(0, 3, ON);
        setSwitch(1, 3, ON);
        setSwitch(2, 3, ON);
        setSwitch(3, 3, ON);
        setSwitch(4, 3, ON);
        setSwitch(5, 3, ON);
        setSwitch(6, 3, ON);
        setSwitch(7, 3, ON);

        To change an output to a different input, you must first turn OFF the previous input switch before setting the new input ON. So to change output 2 from the previous input, 3 to input 5:
        setSwitch(2, 3, OFF);
        setSwitch(2, 5, ON);

        It is important that only one input be set for each output, otherwise inputs would be shorted together by the switches, causing the switches and the input driver amplifier to get hot.

        Get it?
        Dave Erickson

  12. legionsecurity says:

    HELLO Dave You promised to send the firmware to the, and you have files PCB

  13. Dave Erickson says:

    I’m glad to announce that Circuit Cellar Magazine is publishing my article on the MultiZone audio system,
    You can download all the board files and code either from their web site at
    or at

    Dave Erickson

Leave a Reply

You must be logged in to post a comment.