My journey on budget WIFI speakers

 My journey on budget WIFI speakers

 
I always wanted to have smart speakers that are synced up across my home. I stared looking for prebuilt solutions and was surprised about price and accessibility of it. You can fully expect to pay over a grand for 7 speaker system... OK, buying in ceiling speakers that has WiFi or Bluetooth is a good idea right? NAH!

To begin I had few requirements for it:

  • It has to be fully local, no internet connectivity at all. firmware updates are OK
  • It has to integrate fully to Home Assistant and be available as separate player or group of players
  • Audio has to be synced across all speakers and has to be powered individually (turn off/on parts of so called "Zones")
  • I want to implement audio tracking, where mmWave sensors are used to turn on audio in specific rooms (Imagine isolated alarm clock for bedroom, etc.)
  • Has to be powered by 220v (in my case)
  • Has to be one module with speaker itself. Has a small box that incorporates psu, wifi and AMP in one.
  • Has to sound mediocre for my non audiophile ears.
  • Has option to use TTS, radios or any other form of input.
So with this list I went on a month long evenings adventure where I conceived many prototypes and many system to fulfill all of the above. I thought about using speaker wire and purpose built AMP with in ceiling speakers. This turn to be quite bad solution. Audio was terrible it lacked lots of features, integration to HA was a nightmare. But as they say, what doesn't kill you makes you stronger right? RIGHT? at least I heard it like that. 💪. So scratched the idea of DIY AMP with Ethernet control, and embarked on another journey:  WIFI! I made myself a good cup of Joe and started what I do best, googling and empowering my ADHD and what do you think, after few hours, and two cups of that sweet sweet nectar we call coffee I found open source library called Squeezekite - ESP32, what got my attention was that it can use ESP32-A1S modules. Theese modules are great for one specific task. Audio transmission over WIFI. Another interesting thing that it supports microphone inputs (Another smart voice assistant speaker anyone? 😏). So I downloaded source and started experimenting. Ordered some modules from Ali express and was tricked by the seller who sent me modules instead of dev boards... Anyway some soldering and botching later we got this master piece:

 
Calipers for scale... 😹
This might be SUS ඞ,and to someone who know a bit about electronics, seeing that DEV board is quite strange. To be honest I did that because I had no programmer required by flashing tool (about it later), so I de-soldered old ESP8266 from its DEV board and simply used appropriate connections. 

*Another suspect appeared!*
 
There is a mini AMP. Looks like a undersized garbage (it is, but for this application is usable). It's DY-AP3001 mono class D amp. Great price. Low power consumption, no distortion. Well this will work I said... 

Will we be playing music with DIY speaker too I hear you asking... short answer is NO, but longer one still has some DIY...

In my journey of finding good and affordable ceiling speakers I has to buy many of them. Some sounded terrible, some sounded good but were to quiet and then I struck gold, pure gold I say.



Hikvision DS-qae0206g1, bought it just to test, but was surprised. This speaker identifies as 100v system. Well I do not have 100v amp and I'm not planning to get one. So I remember that these has transformer to lower input voltage and drive speakers for long distances. That's why it's 100v. This speaker advertises to be 6W, I thought that was low, but always remember to read datasheet of a product. I saw that it does 90dB 1 meter away if I recall correctly. 6W wont do that (I think....). So it  might be 6W at 100v. 🤔.
 
After removing that transformer and connecting it to my amp (This speaker is 8Ohms by the way), I was shocked how good it sounded even without any enclosed space. It was loud and quality was good. 
 
Some eagle eyed readers might saw that it has no logo of hikvision. I destroyed that sucker with acetone. Since outer brim is metal, I rubbed it clean off. 🎉
 
*All parts acquired!*

I soldered everything up and started to think about how to go about software and what to do with LMS (Lyrion music server) (Lyrion)

Just to save time, this is amazing product that has amazing community. LMS can be installed on almost everything and works right out of the box.

Some thins that has to be changed is that LMS theme is utter disgrace to modern UI's. IDK why, but they still use this 1990's UI.

I would write about installation, but another blogger this amazing job already. give him some love (blogspot)

So I will skip on installation of LMS and flashing of SqueezeLite. That tutorial is great and will help you out.

Just few notes:
  1. Use chrome and new flashing tool right from your WEB browser, you will get latest firmware and be ready to proceed.
  2. When configuring name and LMS IP on squeezelite website, use just IP without port, this costed me 8 hours of hair pulling. 😔
I would recommend on skipping installing LMS on HA, and spin up another container with it. This makes it much easier to configure and in my case there was some problems with ingress of website and icons/whole pages were missing

So.... I installed everything (pulled my hair for 8 hours straight, for that IP and port misconfiguration.) and after configuring ESP for my IOT VLAN it showed up in my LMS. To say I was ecstatic would be an understatement. I was touched by WIFI itself. 🤣. It started working like a charm. Mute and volume control worked as was advertised. NOW.... to the HA integration.

*Home assistant rolls it's eyes*

To begin I installed LMS integration (https://www.home-assistant.io/integrations/squeezebox/), provided my LMS IP and it was up and running, now I had one media device I can use in HA anywhere! 🥂 CHEERS! I would lie if I would say that evening I drunk no beer. After well earned refreshment my journey continues.

*About that rat nest of wires...*

I cant stuff all of it to the ceiling huh? So I decided to manufacture PCB, version 1.0 was good, but I can do better. So I started by selecting good and tested 12v PSU for AMP, in this case it's Hi-Link's HLK-5M12. Great module 12v@450 mA. ESP runs on 3.3v not at 12v, so there was an issue to say the least. I experimented with A1117 3.3 VDO. It was OK, but was getting to around 60C. I don't like that.I prefer sweet sweet efficiency. DC to DC buck converter it is. I selected one that I already have and love, tested to infinity and they powers lots of my projects. It is called very descriptive name "DC-DC 12-24V To 5V 3A Step Down Power Supply Module", main advantage is that it's highly efficient and has multiple select-able voltages. so We have 12V, we have 3.3V, we still need a way of passing that signal from ESP to AMP. Since AMP is mono and esp provides stereo, we have to do something about it. in a nutshell, you only need two resistors that combines stereo signal to one mono signal. Some of you might be asking why I'm using modules instead of designing it straight on the board. Answer is quite simple to be honest. It  takes less time to solder module to the PCB and it's way cheaper to buy pre-built modules, rather than source parts and solder them.
 
Another issue is that ESP provides differential signals not line level, so AMP has to be modified by changing resistor from basically jumper to 1K. this is straight from seller:



 
 
 Muting is handled by ESP too on that SD pin from pin IO21 on ESP32 

This is latest version that I ordered:

So that takes care of PCB, whats next?

Now it's waiting game and testing time. What I would ideally like to test:
  1. Power consumption on PCB
  2. Audio interference
  3. Temperatures with my thermal camera.
  4. Multiple of these puppies across large distances
  5. Setup Git REPO for all files and other things related WiPlayo Repo

All items used (affiliated)

 

TO BE CONTINUED....

Comments

Popular posts from this blog

Towards best flipin' dashboard expierience 🤤 (part 1)