Mom’s Bluetooth Garden Table

We moved to the mountains in Oakland, MD last year, where the winters can be trying. If you don’t have lots of things to do, the snow and the cold can get to you and drive you bonkers. I’ve always got plenty of things to work on, but I wanted to make sure my wife had enough diversions to keep her happy.

I had put up a canopy on one side of our large deck several years ago, and I got thinking about how to enclose it to make a greenhouse for the Mrs. It took a lot of lumber, some cheap vinyl windows and insulation and I had to replace the canopy roof with clear polycarbonate, but it worked out OK. We’ve got a 220V line for a heater and lots of outlets for grow lights, and we bought some planters for Christmas presents. We got some grow lights from one of the marijuana grow house suppliers and were able to break free some bags of organic soil from the frozen stack at Lowes. And now she’s got lettuce, carrots, turnips, spinach, peas and lots of herbs starting to pop up. But of course, she needs some music for “her babies”, and that’s what this project is about. Here’s a picture of her “shoot house”, as we sometimes call it:

The Approach

This inspiration for this design came from a Bluetooth table that sells for about $50 at Sam’s Club. I bought one to see if it was any good, and sure enough, it wasn’t. It was mono, using one 4″ speaker mounted downward, driven by a 2W amplifier chip. But even though the sound was poor, the cabinetry seemed fairly solid, and I really liked the idea of a table with speakers.

DecorTech Rectangular End Table with Bluetooth Speaker and USB Charging Port, Walnut

A second factor in this design was the new BT/DSP amp from Sure Electronics, the JAB4. It’s got a 4-channel amplifier, which is perfect for a stereo 2-way design, and it has the ADAU1701 DSP chip for the crossover and bass enhancement. Parts Express sells the JAB4 as the KABD-430, and there is a higher-powered version, the JAB5. If you read my project about the JAB250, you will notice that the project wasn’t a great success, due to the way Sure implemented the power-down feature of the amp. But this project addresses that power-down problem head-on, and with the 4 channels we can build a stereo 2-way Bluetooth speaker with some very nice features.

A third factor was that the limited thickness of the table required using some unusual drivers. After considerable agonizing over 2″ drivers, I decided to try the glass cone drivers from BDNC. I had seen these at Digikey a while back and even bought one of the 40mm drivers to play with. The 1″ by 6″ flat glass driver was a bit pricey ($42), but it is used in a kickstarter product by Level 10, so I assumed that they had found good enough performance to justify the cost.

The only other design decision was to add a wireless charging plate to the table. Since this was going to be used with a cell phone, that seemed like an obvious choice.

Construction

Starting with someone else’s cabinet or electronics is usually a bad idea, because you often run into lots of constraints with existing shapes and holes and other limitations that you can avoid if you start with a fresh design. But it’s winter here and we keep our van in the garage and pulling out the saw table for building a box is a hassle. Also, the top of the table is about 16 by 14 inches, and my table-top planer isn’t big enough to deal with those dimensions. So, I decided to modify the existing box and hoped that it would work out this time. It wasn’t a good solution for a final product, but it worked out OK for a prototype.

The original table design uses 4 bolts to clamp the top and bottom between a short segment of heavy 8″ cardboard tubing, which forms the outer wall of the speaker. As a result, the actual volume of the speaker was less than 2 liters. I wanted to move the walls all the way to the edge of the table, to get closer to 7 liters of volume, but those curved corners posed a challenge. The approach I took wasn’t the best, but I couldn’t figure out anything better. I used a trim router to enlarge the grooves that held the decorative thin plastic and fabric around the perimeter and cut down 3/16″ PVC sheets for the outer walls. I got some 4″ PVC tubing for the corners, and cut them on a bandsaw to get 4 quarter-round segments. I expected that the solvent-type PVC cement would give me a good bond between the PVC sheets and the 4 PVC corner pieces. That didn’t work out as well as I hoped, but with some reinforcement strips and more PVC cement I was able to get a fairly rigid outer wall. I secured this to the table base with polyurethane glue and then tried cutting out the driver openings. That’s when the limitations of using PVC for speaker cabinets became apparent.

PVC is not an easy material to machine, as it gets very soft and rubbery in thin areas, and it overheats easily. When I tried using a Forstner bit to drill the driver openings, the material kept getting caught in the bit and the bit tried to rip apart the PVC like a tough fabric. Fortunately, thin PVC sheets can be cut easily with a router bit, and I was able to use thin twist drills in a Dremel to make lots of small holes to guide the router bit, and that is how I was able to cut out the round holes for the tweeter. I was able to cut out the driver openings and the result is OK, and good enough to evaluate these drivers. But for a final design I would start from scratch using a more machinable material, or else try building up a plastic enclosure with a 3D printer.

[more pics coming]

The amp

As already noted, the amp is a new offering from Sure/Wondom that has a Bluetooth input, analog input and the ADAU1701 DSP, with 2 stereo TPA3118 chips. The previous version of this board, the JAB250, has a weird quirk where the board goes into power-down mode after 5 minutes of inactivity, and when the board wakes up it resets the ADAU1701. This board actually doesn’t reset as long as the Bluetooth connection is maintained, even where there is no audio activity. However, when the Bluetooth audio connection is broken, the ADAU1701 gets powered down and resets like the JAB-250 when the Bluetooth is re-connected.

These boards use “self-boot” mode for the ADAU1701, so when a reset occurs, any program and any parameters that my CPU wrote to the DSP gets wiped out by the self-boot process. To get around that problem, I now write the ADAU1701 program to the EEPROM on power-up. And whenever the user makes a major change, I read all of the Parameter RAM data and store that in the EEPROM using the format specified in the ADAU1701 datasheet. The Control registers also get saved into the EEPROM, using the EEPROM message format. So, now, after a reset the ADAU1701 does a self-boot with all of that saved data.

Another way of thinking about this new code is that it serves as a programming board, to load your SigmaStudio code into the EEPROM. And if you no longer need the interactive control that the CPU provides, you can remove the CPU and just let the ADAU1701 load itself from the EEPROM during the power-up self-boot. I don’t include an external EEPROM on the boards described in these pages, but it might be a good feature to add, given this new code.

An interesting feature of this amp is that it mixes the Bluetooth and analog inputs inside the DSP chip. The analog input uses the ADCs on the chip, and the Bluetooth data comes in on SD1. That means you can write your own SigmaStudio code to select between the analog and digital inputs, or you can mix them inside the DSP the way the Sure code does. I’ve got a selector switch on the main screen of the Android app to select between the two inputs, which makes this amp a bit more versatile.

New Code for the CPU

The CPU code to control this amp is essentially the same I’ve been using for the other boards on these pages. It recently got refactored and uses a layered architecture with shared library files for all of the lower layers. Adding new commands or making changes for different boards is relatively easy, with changes confined to the files in the top 2 layers (the HCI and Command layers).

The first change to the code was adding the input routing to select between the Bluetooth and analog inputs. The cell phone app had the slider control, but it didn’t do anything because the capability was never implemented in the CPU that controls the DSP. Adding this new menu item to the CPU was very easy.

But a more challenging change was adding the Analog Devices DynamicBass algorithm. The existing code already had the Analog Device SuperBass algorithm, which is a psychoacoustic algorithm to give the impression of lower bass by adding harmonics of the suppressed bass. The DynamicBass algorithm wasn’t available when I started this effort, and there wasn’t enough code space leftover in the 3-way design once it was available. But since this project is just a stereo 2-way design, I was able to remove a number of unused subwoofer blocks from the SigmaStudio design to make enough space for this new feature. DynamicBass adjusts the cutoff frequency of a high pass filter to provide more bass output at lower volume levels, and it is a common feature of small speakers such as the popular portable Bluetooth speakers.

Adding the DynamicBass algorithm required changes in the SigmaStudio code, the .NET utility to process the SigmaStudio output files, the Arduino code that controls the ADAU1701, and the Android app that provides the GUI. In spite of all of these changes using different development tools, the new feature wasn’t overly difficult to implement. Eventually you will be able to control the DynamicBass algorithm from the cell phone app in real time and evaluate the effect of changing the cutoff frequency, amount of compression, and the compressor time constant. But before updating the Android Studio code, I wanted to debug the DynamicBass using a simpler interface. For that reason, I added a Nextion display to another variant of this project.

I made a second version of this project as an active Bluetooth amplifier, as shown below. I wanted to control the DSP from a front panel display, and I wanted a quick way to debug the new DynamicBass feature. So, the amplifier variant uses a small Nextion display (2.4″). It turned out that a lot of the code from those earlier projects didn’t work with the new refactored software, so the effort was far more time consuming than I expected. But it is nice having a prototype for a stereo 2-way amp with Bluetooth and DSP in a small package and front panel display. The JAB4 board fits nicely in that chassis used for the PGA2311 preamp, which you can pick up for around $40. It’s also got room for a 65W 24V power supply with an additional 5V module for the ESP32 board and the display. It’s even got two 4-pole Speakon connectors on the rear panel.

Glass Speakers

[more to come…a big issue is the low efficiency and the need to correct the frequency response]

EQ and Bass Enhancement

[This is ongoing…lots of experimentation with the settings…]

Hmm…Something’s Missing

Every other project on these Audiodeveloper pages use a custom circuit board, but this project has no custom circuitry whatsoever. And there aren’t even circuit modifications like I did for the JAB-250 design. Even the cabinet is a modification rather than a fresh build. This lack of hardware development is something new for this website.

So, this project is a fitting end to the ADAU1701 series of articles. The fact that I wasn’t able to add new features to the 3-way code without deleting some SigmaStudio blocks is an even clearer sign that it is time to move on from the ADAU1701. But as noted in the posting for Feb 8, there are many new challenges in the queue. The emergence of modules and boards that provide DSP building blocks already assembled and integrated is a boon for the audio DIY’er, as it opens up new design possibilities to a wider audience. But it also means that those looking for new audio development challenges need to move on to new frontiers.