Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Multi-Way Conventional loudspeakers with crossovers

Open source Active Wifi speaker project
Open source Active Wifi speaker project
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 31st July 2017, 11:03 AM   #1
MrVins59 is offline MrVins59  France
diyAudio Member
 
Join Date: Feb 2013
Default Open source Active Wifi speaker project

Hello,

I'm glad to share with you my new wireless speaker project. It's still in progress but the first version runs and sounds well.

Basically, it is :
- Raspberry Pi based audio player stacked with DSP and amplifier boards
- active filtering based on ADAU1701 DSP
- PCM5102 I2S digital to analog converters
- Class-D amplification based on TPA3118
- Low latency (<1ms) WIFI connected speakers that share audio (no cable between Left and Right speakers)
- Scalable speaker system (you can use 2 for wideband stereo, 3 for 2.1 system...)
- Easy DSP configurator software based on text file. You don't need to have SigmaDSP connected to your board to change the DSP settings, all you need is to edit a file with your settings (see here for more info)
- Free and open source

Right now, it's limited to stereo configuration but soon I'll extend the speaker configuration to 4.0, 5.1 and even 7.1 for anyone desiring to build a wireless multichannel speaker setup.

I have done a prototype based on this electronic & software architecture that is described in more details on the website, and look like this.

Click the image to open in full size.

By the way, if anybody wants to join the project to give a hand for hardware, software or website developpement, feel free to contact me.

Website link (for speaker details) : https://vdelhalle.wixsite.com/mydspi
GitHub link (to share the hardware and software design) : https://github.com/V2Ale/MyDSPi

Thanks,
  Reply With Quote
Old 1st November 2017, 02:34 PM   #2
tedkok is offline tedkok  Hong Kong
diyAudio Member
 
Join Date: Feb 2015
Location: Hong Kong
It's a very interesting project.

Actually, I have posted another message about constructing WiFi active speaker using Libre LS5B module that allows direct streaming. Wondering if direct streaming from various music server such as Spotify, etc. will be of any interest to any reader in this forum?
  Reply With Quote
Old 2nd November 2017, 11:45 PM   #3
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
I have worked on and implemented several projects with similar themes: two or more DSP processors in physically separated locations (e.g. left speaker, right speaker, subwoofer(s), and so on) and how to synchronize all of them.

I looked at your web site. I see you are using SnapCast. I don't have any experience with that. If you know, can you share the level of synchronicity that can be achieved using this software? It did not see that listed anywhere on the GitHub site. Getting systems as synchronized as possible is the main problem with "distributed" systems like this.

If you are interested, I will explain my own approach now and what I learned. I use all public domain software or wrote my own wrappers. I have a "server" and multiple (any number of) "clients". Systems consist of one or more client, e.g. client1 is embedded in the right loudspeaker, client2 is the left loudspeaker, and the system is comprosed of client1+client2. I use gstreamer to stream PCM audio at a fixed bit depth and sample rate to all clients in a system. This "fixed" rate is preselected and cannot be changed while audio is playing, but can be reconfigured any time. Some software on the server is the "player" e.g. a streaming audio player, etc. I use MPD for this purpose, because it can be controlled remotely using MPD clients. On the server the audio output of the player is sent via an ALSA loopback to gstreamer, which streams it to the clients in the system(s) that you would like to have playing audio. On each client, another gstreamer instance is run to receive the audio. Its output goes to a local ALSA loopback, and then I use the program ecasound to implement a DSP crossover using LADSPA plugins that I wrote. It's very flexible and powerful. The output from ecasound is routed to a DAC with 2 or more channels.

So, how to synchronize these systems? I use NTP with a local GPS based stratum 1 server that I built. This is able to achieve about 30-50 microseconds std deviation in the system time, which keeps the playback rates quite well synchronized. The same WiFi LAN connects all the clients to the host and the NTP server, and it is nothing special. I use a $20 router with good old 2.4GHz 802.11g.

When the system is up and running it's all good. One drawback is that, e.g. if I lose power or something like that, all these systems need to start up again and then re-synchronize and that can definitely take awhile (many hours). Luckily at my home this is a rare occurrence. Another one is latency for the WiFi can be 50msec to 100msec or more. Since I only use the system for audio playback this amount of latency is a non-issue for me.

What I have learned is that you can have streams for each client, e.g. speaker, and if any small synchronization errors develop what happens is the stereo image starts shifting to one side. It's a bit of an odd effect, but it goes away again when the sync improves. I would never think of using separate streams for, e.g. woofer, midrange, and tweeter. Synchronization problems would cause the frequency response to vary and other issues that would be much worse. So I wanted to caution against that approach for multi-way speakers.

Anyway, I would be interested in learning more about what streaming protocol you are using that achieves such a low latency. I recall there were some specialized hardware based streaming chips that were developed a few years ago but I never heard much about them. Maybe you are using that kind of platform?

-Charlie
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 3rd November 2017, 11:00 PM   #4
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
I looked a little more into SnapCast. I found some information about the synchronicity of clients, or at least that it what I think it is. It's not too encouraging, and may not be good enough for your application.

In the SnapCast web page:
GitHub - badaix/snapcast: Synchronous multi-room audio player
Scroll down to read the README file. In the section ""How does is work" the last sentence says:
Quote:
Typically the deviation is smaller than 1ms.
To me this means that any two clients will be synchronized to around 1ms or slightly better. This is not good enough for a pair of stereo loudspeakers. This is because with 1msec difference the stereo image will be obviously shifted to one side. As one speaker gets "ahead" of the other in time, the image shifts to that side. It's rather distracting. You need synchronicity of better than 100 microseconds at least, to have a stable, centered image. Even 100usec is not great, but less than about 50usec is no problem. Believe me I have struggled with this problem myself.

You mention 1msec latency in your first post, but latency is something else - the time from when the audio is "played" on the source to when it comes out of the speaker. 1msec latency would be very low latency even for systems connected via wired LAN (I use WiFi connections). I would expect maybe at least 20-50msec of latency due to buffering of in the SnapCast speak the "chunky data stream".

MrVins59, will you please comment on these issues?
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 3rd November 2017, 11:07 PM   #5
TNT is offline TNT  Sweden
diyAudio Member
 
Join Date: Apr 2003
Location: Sweden
If you move one of your speakers 3,4 cm backwards, will the stereo image be shifted to one side?

//
__________________
More distortion to the people!
  Reply With Quote
Old 4th November 2017, 12:06 AM   #6
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by TNT View Post
If you move one of your speakers 3,4 cm backwards, will the stereo image be shifted to one side?

//
1msec = 0.343 meters. Try that.
3.4cm is 0.0343 meters, or 100usec.

Remember the values I am quoting are the std deviation. Over time the system experiences higher and lower instantaneous synchronicity. For a normal distribution of sync times (and I found this to be the case for my systems) 95% of the time the instantaneous sync will be within 2 standard deviations.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 4th November 2017, 01:59 AM   #7
Neil Davis is offline Neil Davis  United States
diyAudio Member
 
Join Date: Dec 2004
Location: Reston, Virginia
Open source Active Wifi speaker project
Quote:
Originally Posted by CharlieLaub View Post
...higher and lower instantaneous synchronicity...
We used to call this variance, but it's now often called jitter.

The big 3 network quality of service metrics are throughput, latency and variance. Audio is always going to have latency due to buffering requirements, but for left/right audio synchronization the variance needs to be low.

One technique for audio synchronization is based on using time stamps, and that's what snapcast uses. According to the article on WiFi audio from TI, time-stamp approaches achieve synchronization in the millisecond range. Snapcast claims that the synchronization is typically 1ms, but Charlie is correct in having concerns about this being adequate for left/right paired audio.

However, the new generation of WiFi speakers are using mesh networking in which each node can be an access point. From what I understand of Sonos, Linkplay, Heos and other wireless speaker solutions that provide left/right synchronized audio, one speaker is the "master" and it serves as a "soft" Access Point that passes the audio to the other node with minimal delay. Heos claims "industry-leading microsecond audio synchronization". I don't know the specifics of how they achieve this, but I know that it works. My wife has two HEOS 1 speakers running in stereo and the image is perfectly stable. Linkplay provides the networking software for Dayton, Cobblestone, Audiocast, IdeaHome, and many others, and they also claim "perfect synchronization", although I can't find a spec for the amount of delay through their AP. I believe Sonos is in the 10usec range, but I can't find the spec on their website.

I'll be testing a pair of Linkplay modules in "stereo mode" in the next few weeks.

The Linkplay modules are available for around $40-$50. However, the Muzohifi.com web site is now dead, so you can probably get the Coblestone version fairly cheap--it's $23 at Fry's. There's nothing wrong with the Muzo Cobblestone--it appears that they went under because other vendors are selling the same thing at a lower price. Linkplay has some newer modules that have Alexa integration and much faster CPU's (A76), but I haven't identified products using the new modules yet.

Last edited by Neil Davis; 4th November 2017 at 02:03 AM.
  Reply With Quote
Old 4th November 2017, 02:17 AM   #8
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
I would love to find (or create?) a DIY software solution, or equivalent, to the mesh networking that Neil described. Maybe if one network client serves as the local access point for the system (it's master access point) and rebroadcasts locally to the other clients in the system... will have to think about how to implement this!
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 4th November 2017, 02:35 AM   #9
Neil Davis is offline Neil Davis  United States
diyAudio Member
 
Join Date: Dec 2004
Location: Reston, Virginia
Open source Active Wifi speaker project
All of the major vendors are selling mesh routers now. Costco is selling both the Netgear Orbi and the Linksys Velop--this is clearly the direction in which home networking is evolving. I don't know how much support these vendors have for synchronized audio in their products, but I know that they use a lot of open source code. In fact, you used to be able to download the source code for many of the Netgear products from their web site. I don't know whether that is still the case, but look around--you might be able to found some of the new router code.

Also, Linkplay has a development kit for Alexa integration that runs on a pi board. I don't know whether there are NDI's and other agreements to prevent using the code for DIY applications, but it's worth looking into it if you want access to their source code.
  Reply With Quote
Old 4th November 2017, 02:43 AM   #10
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
I was thinking more that one speaker is a Pi or similar SBC outfitted with two network adapters. One runs at 2.4G to receive the audio signal from the "source". The other runs at 5.8G and forwards the audio to the other nearby clients in the system, possibly as an ad-hoc network. There would be some compensation for the delay in the forwarding, but that should be pretty low. 5.8G is pretty good when the distance is not large, and it offers many sub-channels.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote

Reply


Open source Active Wifi speaker projectHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Volume / Source selector - open source project ? AuroraB Analog Line Level 22 22nd September 2012 02:21 PM
Open Source DAC R&D Project Hurtig Digital Line Level 426 20th April 2011 12:51 PM
CDPRO2 Group Project (open source project) BrianGT Digital Source 147 8th August 2008 11:37 AM
Open-source DSA project borges Digital Source 8 24th September 2006 07:26 AM


New To Site? Need Help?

All times are GMT. The time now is 09:06 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki