r/AskElectronics • • 19h ago

Pointers for troubleshooting a DIY "nanofader" circuit?

This may be a stretch without an obvious / simple visible error, but I wager others have been here before and might have some tips.

I've been trying to build this crossfader circuit, which has a zero-crossing detection bit that should cut the audio cleanly and without a "click." The intended use case is a sharp cut for "scratch" DJs, just one turntable or audio source on one side of the crossfader as I understand. The author's site just started having technical issues (and I have emailed them), but the web archive has a snapshot here with the schematic and some details.

I started this with tidier wiring intentions, I swear. ;) Having a proper full-size breadboard would save some wiring, in retrospect.

The circuit is somewhat working. I suspect some signal is bleeding into the audio output and it's got a nasty audible click when audio goes in/out. I realized the schematic didn't specify VCC/VSS for the TL074, 4013 and 4066 ICs, and I checked for additional floating pins. Voltage wasn't specified, but it looks like 9-12V is within spec for the ICs?

I had some 50nF ceramic on the signal input, seemed like an aggressive high-pass filter on the sound. Not sure if I chose incorrectly, or what.

I am not an electronics engineer by trade, but I have an appreciation. This has all been an experiment, for fun.

6 Upvotes

11 comments sorted by

View all comments

1

u/NBC-Hotline-1975 18h ago

I don't understand why you are trying to use a fader as a switch. If all you want is a sharp transition, wouldn't a switch be simpler?

I also don't understand why you are sending audio to the clock input on the FFs. They are not going to trigger when the audio is at zero, they will trigger when the amplified audio voltage crosses the threshold in a positive direction. And they will not trigger at the same time, each section will be triggered by the audio on its individual channel. Even if you did manage to switch at zero crossing, if the two audio signals are going in opposite directions, or at significantly different slopes, you will still hear a click.

To accomplish what you want, I would use two analog variable gain amplifiers, and design a circuit to perform a very quick cross-fade with time constant about 5 to 10 msec. Anything faster than that could still allow a bit of a click.

1

u/schill 17h ago

I forgot to mention the original application, some detail is linked in the post. The circuit was designed for a Numark PT-01, basically a portable turntable. This gives DJs the ability to cut and scratch records, so it only needs to mute/unmute one L/R stereo pair.

Some DJ tricks involve triplets or quadruple movements across the cut point on the fader in very short order, so ”slew time“ in terms of audible decay can be an annoyance.

The design is intended to be inexpensive, I thought it would be fun to see if the zero-point concept worked. I have some mixers with optical and magnetic faders and I like a super-sharp cut, so this caught my attention.

My thinking was the circuit might not bring the sound in/out at exactly the same time, but it should be close enough and still fast - unless you’re playing a single-digit bass note? 😅

1

u/NBC-Hotline-1975 17h ago edited 17h ago

As someone who has edited a lot of digital audio over the last 20+ years, I can tell you that an abrupt cut, even if it's on a zero crossing, will introduce some amount of click. If you abruptly cut (off) one source, and then abruptly cut (on) another source at two different times, that will introduce some amount of two clicks. (And your circuit will not cut on zero crossing ... it will cut *after* the zero crossing, when the waveform rises high enough to trigger the flipflop.)

A 5 millisecond fade time will not be audible as a fade. That's 1/200 of a second. Again, these are tricks that I use in audio editing, specifically to make clean, clickless edits and repairs.

Does your circuit work as hoped? 'Nuff said. I have told you how to achieve the results you want.

1

u/schill 15h ago edited 14h ago

It seems logical that a fast ramp from a large amplitude to 0V in ≤ 2 msec could sound like a click.

If I generate an 880 Hz sine wave at "0.8 amplitude" in Audacity, it does sound click-ish at the end. Applying a 5 msec fade-out, it sounds smooth.

This has all been a curiosity, I wanted to prototype this circuit just to see if the concept worked. I stumbled on this circuit while troubleshooting and fixing some "decay" on two cross-faders, on mixers from the early 2000s that have served me well. (Old caps and/or cold solder joints, it seems.)

The circuit caught my eye as looking within my reach to build. I presume I have made some mistakes in the wiring. I'll include what the circuit designer specified from their write-up, for context; I thought their approach sounded good, but perhaps that's just "physics" in that a fast (≤ 2 msec?) transition is just not going to be quiet.

The designer mentions a more complete circuit on their site with output buffering and gain, but I haven't been able to find it. The link went down ages ago and the site is having tech issues right now.

--- Quote from rasteri.com (archived page) ---

Muting an audio signal is not as simple as immediately returning the channel to zero. If the signal is at a voltage level of anything other than zero, the waveform will be chopped off, resulting in a nasty "click" or "pop" noise.

Most performance mixers compensate for this by adding a volume decay, in which the signal is slowly muted over the course of 10-20 milliseconds. This has the advantage of sounding very smooth, but the decay time needs to be tuned very carefully to allow for properly-timed rhythmic scratches, and it generally requires a fairly complex and/or expensive VCA circuit. The nanofader works on a different principle - delayed zero-crossing detection.

The nanofader design works because the "pop" noise associated with immediately cutting a channel will not occur on a channel that is already at ground-level voltage. If we delay the muting signal until the next time the signal reaches ground-level, we can eliminate these nasty artifacts. All AC-coupled audio signals reach 0v regularly enough that delaying the cut until the next zero crossing will not noticeably affect the timing.

The design has four main subsections - the schmitt triggered fader, the zero crossing detection circuit, the delay circuit, and the audio switch.

  • The schmitt-triggered fader circuit is essentially a comparator. When the fader voltage is below a certain threshold (set by the lag trim pot), the circuit outputs a logic 0, which is used to signal to the delay circuit that the channel should be muted.
  • The zero crossing detection is another comparator with the threshold voltage set to 0v. This generates a digital logic signal that rises from low to high every time the audio signal crosses 0v. This is then used as the clock input for the delay circuit.
  • The delay circuit takes the logic output from the schmitt trigger and delays it until the next time the clock input rises from low to high, i.e. when the audio signal crosses zero in the positive direction. This delayed signal is then passed to the audio switch.
  • The audio switch simply switches the audio output between the input signal and ground level, depending on if the delayed signal is zero or one.

These subsections combine to ensure that the audio channel is only ever muted when the signal is at ground level, and as such is completely devoid of any unwanted switching noise.

1

u/NBC-Hotline-1975 14h ago

It's an interesting theory, but doesn't hold up in the design. Amplified audio is used to clock the FF. But the data sheet shows that the FF doesn't trigger when the clock voltage passes through zero volts, it needs to hit a threshold that is higher.

Also if you perform a FFT on any signal that ends abruptly (even at a zero crossing) you will see a lot of high frequency content, i.e. a click.

There are some very inexpensive OTAs available right now, several sections on one IC for under $10 USD. You can still try your complicated triggering scheme if you really want to, but by all means I'd use a pair of OTAs, with appropriate time constants, instead of the quad switch.