Announcement

Collapse
No announcement yet.

Exposing my Thing on the Internet...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exposing my Thing on the Internet...

    This Internet of Things (IoT) initiative is taking off, with lots of cool stuff--lights, thermostats, door locks, garage doors, gauges, etc. And soon I'll be adding my 3-way stereo DSP Thing.

    The dominant protocol used to connect these sensors and devices is MQTT, or Message Queuing Telemetry Transport. http://mqtt.org has a good overview and history of this standard. I'm using an ESP32 CPU board to connect to our WiFi, run the MQTT protocol, and it will also control the ADAU1701 DSP module. The project is still evolving, but it looks like it will be a good way to go and be very easy to build. The project will be a small stereo 3-way DSP board that has crossovers, EQ, Volume controls, Bass Enhancement and tweaking filters for each driver.

    I've been using Bluetooth to control the DSP board up to now, and that works OK except for when you have multiple devices that you want to control at the same time. With MMQTT, I can control left and right at the same time and control multiple speakers simultaneously, and there are some scenarios where I need that capability. I'm using a public MQTT broker to publish and subscribe the messages for these stereo 3-way boards, so the boards will be on the Internet and can be accessed if you have the right user name and password. However, you can also use a local broker on your PC or cell phone if you want to keep your Thing private and not share it with others (there are times when it is wise to do that ).

    I've also got a companion Android app using the Paho MQTT library to control the DSP. It's still not done, but it is far enough along that I know it will work.

    I will be making a new board for this design that will be very DIY-friendly. Details to follow.
    Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

  • #2
    You (still) crack me up

    Comment


    • #3
      I know I indulged in some excess in the phrasing for the title, but this whole concept of putting Things on the Internet is fascinating, and it will certainly have a big impact on DIY. The Publish/Subscribe model is perfect for connecting all of the devices in your home to mobile devices or voice commands and for sending data back and forth between devices. But in order to make that model work, you need to connect to a broker somewhere, and in today's world it really doesn't matter whether that broker is inside your house or not. So really, it's time to show the world what you've got by exposing your Thing.

      One of the unexpected benefits of using MQTT for control is that the hardware costs for home-brew audio devices drops dramatically. I was using a $20 CPU board plus a $6 Bluetooth board to control the DSP chip. But by using an ESP32 board, I can replace that hardware with an $8 CPU that has a full TCP/IP stack with a web server. The CPU is actually a module that can plug into a small motherboard. I also found an ADAU1701 module that is less expensive than what it would cost me in parts, and I'm using a DAC module to get 6 channels of output (for stereo 3-way, 2.1 active systems, or other configurations). And there are the Linkplay modules for WiFi audio. So I can build a complete WiFi audio board with active crossovers, EQ and other nice features without any SMD devices--it's all commercial modules plugged or soldered into a small motherboard. This DSP can be controlled from a cell phone app, a PC or an Alexa-type device via commands over WiFi.

      I sort of stumbled into this MQTT-based world, but the more I work with it, the more I'm convinced that it's the right model for audio devices.
      Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

      Comment


      • #4
        Neil - I don't see an article about this on audiodevelopers.com so I assume it's a work in progress. Also, what DAC module did you end up using? I've been looking around for an inexpensice 6 channel I2S DAC.

        Thanks, Ed
        "Everything is nothing without a high sound quality." (Sure Electronics)

        Comment


        • #5
          Yes, this design isn't documented yet, but I'll post details as they evolve. I've got parts on order for evaluation but I'll still need to come up with a new board design, and that will take some time. Winter is "software season", so I've been trying to figure out where I'm headed with the interfaces, and convincing myself that I can do the Android code and that MQTT is the right direction.

          The ADAU1701 module is here. And the DAC module is here. I use the four DAC's inside the ADAU1701 for the tweeter and woofer channels and use that PCM5102 board for the subs, driven by one of the ADAU1701 serial outputs..

          I also have one of the tiny $5 TPA3116 modules on order. I'd like for this board to have 4 channels of on-board amplification for making a stereo 2-way active system, with a pair of line-level outputs for external sub amps. Those TPA3116 modules don't have filters, so the motherboard would have to have some extra parts to filter the output. I'm toying with having the board use two of these modules or else a pair of SSM3582 chips that would use the digital output from the ADAU1701. Still some decisions to make on the hardware...

          Once this board is done, I'll probably call it quits on this stereo 3-way DSP design. It will be a good low-cost design for making active speakers, and it will be a logical end point for a project that has undergone many iterations. Time to move on...
          Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

          Comment


          • #6
            Thanks for the links Neil. I ordered one of the ADAU1401 boards to compare against the Sure ADAU1701 board.
            "Everything is nothing without a high sound quality." (Sure Electronics)

            Comment


            • #7
              My order got held up by Chinese New Year, but it's finally on its way. I need a board to measure where they put the connector holes, so I can make a library part for the PCB design. Then I can layout the board. But most of the software is ready to go, so it won't take long to complete the design.

              I wish they had brought out the selfboot pin to a connector, since I don't use the self boot feature (it looks like it is tied high). But I guess it won't matter if there isn't a valid program in the EEPROM.


              Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

              Comment


              • #8
                Neil,

                Does this new board allow for 3 inputs? I'm beginning to plan speakers for my LCR that will be two ways with my subwoofer handled by the AVR. I want to use the pre-outs from my AVR to a DSP for active crossovers.

                If the cost is below $100 for a single board, I could always get a second one for the center channel.

                Comment


                • #9
                  The board is still in concept stage, but it will probably have a Wifi audio module plus an analog input. The analog input will use the existing ADAU1701 analog circuitry, so no extra parts will be required--just need a connector. The WiFi module will allow using Internet sources or casting from a PC or mobile device or any device that uses DLNA. So physically, the input will be a WiFi antenna. There could be a third input using the other I2S input on the ADAU1701, and I may provide a place on the board for an optional Bluetooth module that would use that input.
                  Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                  Comment


                  • #10
                    Thank you for your posts.
                    How do you connect the ESP32 to the ADAU DSP? How do you connect them to an android device?

                    Comment


                    • #11
                      Originally posted by bassape View Post
                      How do you connect the ESP32 to the ADAU DSP? How do you connect them to an android device?
                      The ESP32 controls the ADAU1701 via I2C, as shown in the Rev 4 boards in this article: http://www.audiodevelopers.com/6-ada...way-dsp-board/. The commands are sent from the Android app to the ESP32 via WiFi, using the MQTT protocol. The commands are described in this article: http://www.audiodevelopers.com/12-ar...code-overview/

                      I've got the interface between the Android phone and the ESP32 working, and I've got a Rev 4 board design ready to be fabricated. However, I've been replacing windows in our townhouse and we have my daughter's kids for the summer, so the audio work has been shut down for a while. I'll probably get back to this design in late August.
                      Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                      Comment


                      • #12
                        Thank you.
                        What is the app you use to control the dsp? Can I find it at apple store or play store?

                        Comment


                        • #13
                          Neil wrote the phone app as documented in his article #12. Note that it only runs on Android devices. You can download it from his "Downloads" section; it's the "Android Controller Code".
                          "Everything is nothing without a high sound quality." (Sure Electronics)

                          Comment


                          • #14
                            Right. The download is for the MIT App Inventor code, which should support iOS soon. The iOS version of App Inventor went into formal beta testing in February 2019, so I would expect the final version in a month or so. What's posted is the "source code" with no restrictions, so anyone can use that code and change it as they please. However, this version of the code only supports a Bluetooth interface--it doesn't use WiFi.

                            There was a short period where the App Inventor code was "broken", where users had to migrate to the new Android controls. It was going to take a lot of effort to make that change, so I re-wrote the app using Android Studio. The App Inventor developers found a work-around that allowed using the original controls, so the old code still works and looks the same. But any new development will be in Android Studio. The new app looks a lot nicer and it will only use WiFi and MQTT. Bluetooth is OK for controlling single speakers, but it is clumsy for controlling multiple speakers. Article 14 has a screen shot of the new version of the app. The new app will be available at the Playstore once I finish testing and the documentation.
                            Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                            Comment

                            Working...
                            X