Announcement

Collapse
No announcement yet.

LCD Display for DSP

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

  • LCD Display for DSP

    I finally got most of the DSP functions working on that 2-input, 6-output ADAU1701 board I described in a previous post. This post is about the Nextion display that I had mentioned.

    ​The display costs about $17, which is pretty good for a color 320 by 240 pixel display with a resistive touch-sensitive overlay. ITEAD sells a complete series--this is the smallest and lowest cost.

    ​The Nextion is well-supported with tools to help design the display layout and they provide Arduino and R-Pi library code. There is a nice editor for setting up the buttons, texts, sliders and even graphs, and you can add pages with separate background images. The editor includes a great font generator--you can do a lot of really nice customization. It's easy to put together a quick & dirty set of pages, and that's what I did for the simple pages shown below. But you can go back and make the pages as "pretty" as you like, and it won't change the code that interacts with the CPU. When you design is compiled in the editor, you can copy the code onto an SDHC card for uploading into the display.

    ​Whenever a button is pressed or released, or when a slider is moved, or some other event occurs, the display sends out the object ID to the Arduino host. ITEAD provides a nice Arduino library with many examples. You need to set up a "listener" to monitor a list of events from the display and set up the callbacks for each event. So each LCD event launches a unique function, where you write your event-specific code. It's a bit cryptic at first, but once you understand the pattern and steal some code from the examples, it's fairly easy.

    Because the interface is relatively slow and because there are only 4 wires (5V, TX, RX, and Gnd), you can mount the display just about anywhere you like. And there is even a low-cost bezel you can buy for mounting the display on the back or front of the speaker, or on a cabinet with the amplifiers. The bezel is made-to-order on a 3D printer: you select which design file you want and the material.

    ​The screenshots below are actually WORKING--the buttons control the volume, the channel volume trim levels, and so forth. The Crossover is partially implemented, in that the tweeter-woofer crossover works. The woofer-sub is more of the same code--just haven't gotten to it yet. You can select between 6 different crossover types (Butterworth and Linkwitz-Riley, up to 8-pole) and 7 different frequencies, and the crossovers get calculated and loaded into the DSP in less than a second. The woofer-sub crossover will only provide up to 4-pole crossovers at 5 different frequencies. However, if you wanted to add more crossover frequencies, you would simply change a table in the Arduino that controls the DSP--the Nextion display wouldn't change.

    ​The EQ screen shows the power of the Nextion display. You can tap on the slider to select that frequency band, and slide any of the controls up or down or use the "+" or "-" buttons to change the levels. Kind of cool having a 9-band equalizer built into your crossover board! Whenever you cursor to a new page, the Arduino saves the settings in the EEPROM, and at power-up the display settings are restored.

    I didn't take a picture of the Delay/BSC screen or the Bass Enhancement screen. The BSC works, but I still haven't implemented the code for the delay. And I'm not sure if I'll have enough code space left in the teensyLC Arduino to do anything very interesting with Bass Enhancement, so this might just be a simple boost. I'm using 94% of the code space at this point.

    ​Sorry about the poor picture quality--the colors on the display are actually very nice, but the camera doesn't capture the colors properly. For example, the EQ screen background color should be lavender. I had to turn off the camera flash to make the display show up at all.
    Click image for larger version

Name:	Volume.jpg
Views:	1
Size:	70.2 KB
ID:	1325997




    Click image for larger version

Name:	xover-close.JPG
Views:	1
Size:	45.9 KB
ID:	1325998

    Click image for larger version

Name:	EQ-close.jpg
Views:	1
Size:	51.6 KB
ID:	1326000

    Click image for larger version

Name:	Chan_vol.jpg
Views:	1
Size:	60.7 KB
ID:	1325999





    Finally, here's the board with the display. I'll write some more about the board later on. It's mostly working, with a couple of small errors that I need to fix in a future revision. That's a 3-way stereo crossover board with a switching regulator to take voltage directly from a 24V supply. I'll be mating this with the 6-channel TDA7498 Class-D Amplifier Board in an upcoming SBDT project.
    Click image for larger version

Name:	xover.jpg
Views:	1
Size:	109.3 KB
ID:	1326004

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

  • #2
    This is amazing!!! Keep up the great work I cant wait to see what comes next.

    Comment


    • #3
      Thanks. I had edited the post and the post disappeared for about an hour, as Tom Z pointed out. It's good to see that the vBulletin database was able to recover.

      ​I've got to think about where to go next with this. I'm using the teensyLC CPU, which is only $12, but I'm running out of room for new code. So I either need to use a more expensive CPU with more code space (teensy 3.2) or else strip out some functionality. This was supposed to be part of my "Act 3" project, and "Act 2" was just about bass enhancement, but it's clear from playing with SigmaStudio that the bass enhancement algorithms won't fit along with the other features, at least not in the teensyLC. So I've got to rework my original plan. One idea was to get someone else on the SBDT to do the "Act 3" design with this board, but they would have to have a good sub to go with it because there won't be bass enhancement. Hmmm...
      Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

      Comment


      • #4
        The teensy 3.2 is only + $8, no? Don't strip code to save $8.

        Comment


        • #5
          Originally posted by neildavis View Post
          ...One idea was to get someone else on the SBDT to do the "Act 3" design with this board,...
          Afraid I don't know anyone with the requisite skills.
          I'm using 94% of the code space at this point.
          Is this due to overhead in using SigmaStudio?
          Though ( as just mentioned ) an extra $8 solves the resource commitment....

          "Not a Speaker Designer - Not even on the Internet"
          "If the freedom of speech is taken away, then dumb and silent we may be led, like sheep to the slaughter."

          Comment


          • #6
            Originally posted by philthien View Post
            The teensy 3.2 is only + $8, no? Don't strip code to save $8.
            ​I'll probably do both variants. I actually planned to use that unique 5V output on pin 17 of the teensyLC--it goes to a connector for lighting a string of neopixel LED's (hey--blue LED's are so ho-hum anymore). But it won't hurt to keep the connector patterns on the board for the 3.2 version. The real problem is that multiple variants means more work, because both the SigmaStudio code and Arduino code will be different. And the extra work will slow me down, and I'm already in over my head in projects.
            Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

            Comment


            • #7
              Originally posted by Sydney View Post
              Is this due to overhead in using SigmaStudio?
              ​Yes--the Arduino loads the ADAU1701, so all of the DSP code sits in a large table in program memory. Add more DSP features and there is less room available for Arduino code. I looked at the Analog Devices bass enhancement algorithms, and they are fairly large, with lots of parameters...they won't fit.

              Afraid I don't know anyone with the requisite skills.
              ​The code will be done and I might even assemble all of the parts as a SD200 plate amp replacement--just ordered two 8" by 7" aluminum plates. The real work is documenting everything and wiring up and testing the 2.1 system. That takes a lot of time, and I would like to be able to reference that documentation for my own projects. I've got a lot of documentation ahead of me already to make this a "software download" project.
              Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

              Comment


              • #8
                That was the impression I got from reading background:
                "Not a Speaker Designer - Not even on the Internet"
                "If the freedom of speech is taken away, then dumb and silent we may be led, like sheep to the slaughter."

                Comment


                • #9
                  Another easy fix is to just add a serial EEPROM to the board for the ADAU1701 code. I'm going to be updating the board anyway, so I'll probably do that.
                  Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                  Comment


                  • #10
                    Good solution
                    "Not a Speaker Designer - Not even on the Internet"
                    "If the freedom of speech is taken away, then dumb and silent we may be led, like sheep to the slaughter."

                    Comment


                    • #11
                      If there is a way that we can help let us know. I'm no were near your level but I can lay out and assemble the items listed so far. If you needed me to lay out the amplifiers and the board onto some aluminum I might be able to get that done for you depending on your requirements.

                      Comment


                      • #12
                        That is one cool setup Neil.
                        Yeah, your post showed up as a preview but it wasn't there. I was thinking It got caught up in a black hole, or something Tron-like happened to you. You are into 'code' pretty heavy!

                        TomZ
                        *Veneering curves, seams, using heat-lock iron on method *Trimming veneer & tips *Curved Sides glue-up video
                        *Part 2 *Gluing multiple curved laminations of HDF *Cello's Speaker Project Page

                        *Building the "Micro-B 2.1 Plate Amplifier -- Part 1 * Part 2 * Part 3 * Part 4 * * Part 5 'Review' * -- Assembly Instructions PDF

                        Comment


                        • #13
                          Way Cool! Any plans to incorporate a remote function later Neil? Maybe just some of the basics; volume, mute, etc.
                          My "No-Name" CC Speaker
                          Kerry's "Silverbacks"
                          Ben's Synchaeta's for Mom
                          The Archers
                          Rick's "db" Desktop CBT Arrays
                          The Gandalf's

                          Comment


                          • #14
                            Originally posted by Kevin K. View Post
                            Way Cool! Any plans to incorporate a remote function later Neil? Maybe just some of the basics; volume, mute, etc.
                            ​Yep--the HCI is "remote-control friendly" It uses arrow keys to navigate between fields and the menu items, and there are a couple of dedicated "buttons" like Mute. I've got the IR remote working with a similar design, and adding IR remote to this one will be easy. I ran out of space in the micro to include the remote library, so this version of the board won't have remote. But the next version will have it for sure. I like having the remote to sit back and A/B crossovers and EQ settings--it's a "must-have" for certain applications and a "nice-to-have" in general.
                            Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                            Comment


                            • #15
                              Originally posted by Kevin K. View Post
                              Way Cool! Any plans to incorporate a remote function later Neil? Maybe just some of the basics; volume, mute, etc.
                              ​Actually, I found out there's a better answer that even allows getting rid of the LCD display. The board has a USB-to-serial input that I use to connect to my ASD program. But with the LCD display you probably won't be using that USB-to-serial interface. So I tried replacing the USB interface with a cheap HC-06 Bluetooth module. And then stumbled across the MIT App Inventor program. After a couple of hours of experimenting I was able to send commands from my Android cell phone to the teensy CPU, and it was responding to the command strings the same way it did when I used the USB interface.

                              ​So that's the new direction for this project...cell phone control of the DSP board, to select the volume, change the crossover frequency and slope, or do EQ, etc.. The cell phone interface will call the same routines as used by the local LCD display...I just need to add some new commands to the serial interface and build up a nice-looking but simple GUI for the phone/tablet. And that's what's coming to the Google Playstore sometime soon: an app to control this 2x6 DSP board.

                              ​Pics coming soon...just sharing some excitement at this point.
                              Free Passive Speaker Designer Lite (PSD-Lite) -- http://www.audiodevelopers.com/Softw...Lite/setup.exe

                              Comment

                              Working...
                              X