Automated A/B Switching Device

After writing up my recent experience testing out two amplifiers with a simple A/B switch, I started to think about how to make the process easier, since I feel like this type of testing is very useful in determining the actual results in swapping source components, and doing it properly is very important to the result.

I can’t seem to find anything out there that does this, so I want to build something that does.

The idea is pretty simple. I want to use a micro-controller like an Arduino to do three things.

  1. Monitor the volume coming out of two prospective sources to make sure they’re equal
  2. Switch between the two sources automatically after randomizing the output so the user doesn’t immediately know which source they’re listening to.
  3. Prompt the user to determine which source they’re listening to, and then record the results (right or wrong)

I was wondering if you guys had any thoughts on this, or suggestions on different features that would be helpful or methods to go about doing this correctly.

4 Likes

I built something of this nature back in 2016, refined it a bit since then, and used it for any situation where I did a review (or a comparison) that talked about blind testing (e.g. the Magni 3+/Heresy comparison).

Here’s are the original comments I made on the thing, though it has gotten a bit more sophisticated since then:

BTAB – Blind-Test-Assist-Box:

The “Blind-Test-Assist-Box” (BTAB), apart from desperately needing a better name/acronym, is a little thing I’ve been playing with for a few months now.

It’s NOT intended to settle any arguments in the objective-vs-subjective vein, at least not from my perspective (I’d rather listen to music than debate those points), though how you might use it is, if I get to a point where it’s something “not just for me”, is, of course, up to you.

All it really is a “sensible”, simple, tool to more easily/reliably (urk!) facilitate blind and ABX testing for source components.

While there are certainly tools that enable such things today, they are generally software-side solutions, which aren’t very useful if the source you want to compare isn’t a computer-based player and, in the case of the most readily available (say, Foobar2000 with an ABX module), it’s a Windows-centric thing.

It also typically forces you to have USB somewhere in the audio chain as most computers don’t have any other way to talk to a DAC.

Anyway, BTAB does a few things:

Digital Distribution Point:

Feed it a digital input and it’ll give you two outputs of the same signal, allowing you to connect to two digital devices at once and have them playing in synchronization form the source. It allows you to adjust timing between delivery to those two sources to permit overcoming any latency from internal buffering/re-clocking schemes as needed. You don’t have to use this stage … you can just use the analog inputs (see next point) instead if you prefer.

There are two outputs each for AES/EBU XLR, TOSLINK, COAX and USB (added in the last week). So you can compare like-interfaces, or differential ones.

And it can be set to switch which digital output-type it drives instead of switching sources if you like. This is intended to allow comparison of different interfaces (e.g. AES/EBU vs. USB) on the same DAC. It is also likely to be of marginal usefulness, since not all DACs will switch which input they’re observing based solely on presence/absence of a signal on one of them (Bifrost doesn’t, for example). But it was a cheaper software feature to add “just in case”.

Analog Inputs & Level Matching:

It can take two stereo analog inputs and provides a push-button way to automatically level-match them to within 0.1 dB (quite a lot better than you’ll manage by ear and beyond the realistic capability of many SPL meters), and then provides a single, switched, output to an amplifier.

Multiple Comparison Modes:

Right now it provides for a couple of comparison modes, with a simple control to allow the user to indicate when they hear a difference.

One mode simply repeats a selectable passage of music … you mark a start and end point, which it stores in an internal buffer, and then it’ll repeatedly play that while switching sources. The other simply passes through whatever is coming from the source and switches sources randomly there. This allow you see if differences are detectable in-stream or between repeated passages. Then there’s an option to mute between switches or make the changeover seamless (at least I think it’s seamless).

It logs what source is playing and when, records when the user indicates they detect a difference, and then gives you the data so you can analyze it from there.

Lions and Tigers and Random Numbers:

Switching is driven by a proper hardware random number generator rather than a pseudo-random software one (e.g. Mersenne Twister), and within certain constraints you can substitute a different device there (which comes from me not having settled on which RNG I wanted to use when I first got things running).

Some things worth noting, coming out of having done that …

  • Switching sources/outputs seamlessly … i.e. without resulting in any artifacts that would give away the fact that something had happened proved to be more work than I thought to get perfectly undetectably.

  • The ADC on an Arduino is limited to a range from 0 to 5V (reporting a 10-bit value of 0 for 0V and 1023 for 5V), which means you’ll need special handling (hardware, software or both) to deal with a proper audio signal (which will, of course, swing between negative and positive values).

  • In addition to being able to produce level-matched outputs (from its inputs), it also has a “meter” mode, so you can manually adjust what the BTAB is being fed … also accurate to 0.1 dB.

It was much more of a pain to build, and get working properly, than I originally anticipated. And while I had thoughts about publishing the software and PCB files (i.e. open source) etc., and later about building it or kick-starting a run of them, there was never sufficient interest to justify the effort - especially as it turned out to be rather more expensive per-unit than I figured at the outset.

Other Things that got Added Over Time:

  • The dual-analog-input, single-analog-output, was augmented not just to deal with single-ended and balanced line-level signals, but also to allow amplifier-level inputs with switched output to both single-ended and balanced headphone outputs.

  • Dual digital-input switching to allow comparison of digital sources. This resulted in having to rebuild the chassis to accommodate all the connections.

9 Likes

This is a very impressive unit, much more capable than the Schiit Sys and JDS Labs offerings.

It was something I built, that was initially inspired by this … but they were out of production for a long time and I figured if I was going to “do the work”, I might as well make it as useful as possible.

Though it was never intended as just a simple A/B switch (like the “Sys” or the “OL Switcher”) … you can certainly use a pair of either (or ideally, a trio) to manually do the same thing. For my review work I wanted the switching truly random and out of my hands …

2 Likes

Thank you for all the info!

The complexity and PITA factor don’t surprise me considering how many features you built into one device. But I completely understand wanting to do it right. After all, if it isn’t, then it probably wasn’t worth doing in the first place.

Understandable considering the nature of the problem it’s solving. The demographic is a niche within a niche.

I really appreciate all the info you shared, and I’m glad someone has done this before.

You’ve already answered some of my initial questions too.

1 Like

That is awesome - might as well mentality :+1:t3:

I can see the random switching / out of your hands being valuable.

I tried using the Sys to take 1 input and 2 outputs, but was receiving signal distortion and channel imbalance in my speaker setup. Thus, I only use it for the intended 2 inputs and 1 output per the manual. Others have had success (including you I believe based on prior reviews/posts), but the “opposite” direction flow wasn’t working out for me and I didn’t dig in too deep to troubleshoot/resolve.

I assume the A/B mechanism and matching signals will be done in the digital realm. Whatever you do in the analog domain, there’s a big chance of coloring your signal.

I started to develop interest in building a “DSP box” instead. With the latest Raspberry Pi 4, all I’m waiting is for a decent sound card with 1 digital in and 1 out, and a dedicate case for it, since I don’t want to mess up with tooling. On the software side, I’d just use REAPER DAW and a bunch of VSTs (DSP). So my project in one sentence: digital audio in, colored digital audio out.

But in your case, you may connect up to 4 USB soundcards (i.e., DACs) and programatically switch between them via OS. Probably there will be discontinuities when switching, but there’s always a price to be paid. It’s like a mini computer.

Sounds like a fun project with a small budget. Cheers.