NEW CIRCUIT DESIGN: NZF Flanger

Started by DrAlx, May 27, 2014, 05:26:49 AM

Previous topic - Next topic

DrAlx

NZF Flanger ("NZF = Near-Zero Flanging").

Motivation:
About a year ago I posted a circuit design and stripboard layout for a flexible flanger based on Thomeeque's EM3207 Electric Mistress and through-zero flanging (TZF) modification. It worked OK but there were certain things I didn't like about the usability of the TZF effect:

1) Setting the zero-point was a dynamic process and not at all user-friendly.  I like the zero-point to occur at the end of the sweep and the only way I could achieve that was to play chords with distortion while the effect was sweeping and then tweak the "Zero" control pot in order to try and put the zero-point at the end of the sweep. This was a trial and error process and needed doing each time I changed the Rate or Depth pots.  This very quickly became a real pain in the backside.

2) Most of the time the sweep was far away from the zero-point, so it sounded like a regular flanger for most of the sweep, and the zero point was crossed quickly.  It was not possible to set the controls in way that would keep the sweep near the zero-point.  

3) Subtractive TZF did not give full signal cancellation when feedback was high. That was because the variable delay line had feedback, but the fixed one did not.


I soon realised that I wanted a user-friendly TZF effect with minimal control knobs, the ability to keep the sweep close to the zero-point, and that didn't involve any tweaking to set the zero-point.  I started thinking about how I could achieve that and have arrived at a design that sounds noticeably different to my first circuit and not at all like an Electric Mistress, even though it is largely based on it.  I am not sure if the approach I took has been used before.  My new flanger has 3 control knobs (Depth, Rate, Regeneration) and a switch to toggle between Additive/Subtractive flanging.  There is no control knob to set the zero-point.  The regeneration scheme will give full cancellation at the zero-point when subtractive flanging is used, but to be honest it doesn't sound as I expected and I prefer the sound with no regeneration.

The circuit uses two parallel delay lines that both have a sinusoidal sweep (i.e. the variation in the delay time is sinusoidal).  I think the EHX Flanger Hoax also uses sinusoidal sweeps on parallel delay lines but in a different way.  In the Flanger Hoax the sine waves are either in anti-phase or in quadrature, so they cross each other giving TZF at the crossing points.  In my circuit, the two sine waves are always in phase, but they can have different amplitudes and the aim is for them NOT to cross each other.  Instead they should just touch each other at their minimum points and this is where the TZF effect occurs.  So strictly speaking the flanging is not "through-zero" but rather "down-to-zero and back".  

This approach allows the effective flanger sweep to stay close to the zero-point, and more importantly it allows the zero-point to be set in a systematic way using trimpots.  Once the trimpots have been set, the effect will sweep to zero (without crossing it) for most combinations of Rate and Depth.  For the slower Rate values, the zero-point will be crossed if the Depth is too large.  I think adding voltage regulation to the LFO section will fix that but I would need to recalculate all the resistor and pot values in that section.

Other than that, the main issue I have with my build at the moment is noise on the clock lines.  An audio probe on the clock lines shows that the clocks themselves have high pitched "tweets", even if there are no BBDs in the circuit.  The noise is stronger on one pair of clock lines than the other and it is clear why when you see my stripboard layout:  The two VCOs for the BBDs are taken from the Electric Mistress.  They are sensitive to RF and will interfere with each other, so I did two things that helped to minimise this problem.  Firstly, I placed the diodes that discharge the clock capacitors under the comparator ICs so that the discharge paths are absolutely as short as possible. If these paths are long then they will act like a pair of interfering antennas.  The other thing I did was place a 100nF ceramic cap between the base of each current-source transistor and ground.  This helps prevent RF pickup in the transistor's biasing network from affecting the collector current that charges the clock capacitor.  Ideally I would physically move the two VCOs far apart as well but I wanted to fit everything into a 1590BB enclosure so that wasn't possible.  The reason one VCO is more strongly affected by noise is that key parts of it are immediately adjacent to the flip-flop stage of the other VCO.  In any case, the noise isn't really that bad as you will hear (or rather not hear) in the samples.  I may bite the bullet at some point and redo the whole layout for a bigger enclosure, put the two VCOs at opposite ends of the board, and add companding to the audio path. Or I may try a different VCO design based on the 3102 instead and ditch lots of ICs in the process.

Circuit Operation:

When the Depth pot is at minimum:  Both VCOs receive the same varying control voltage.  The clock trimpots are adjusted so that both VCOs respond to that voltage in the same way (i.e. so that they produce the same clock rates).  This is easily done by ear.  It's just a case of selecting Subtractive flanging, and then adjusting the trimpots until the output signal disappears.  If the flanging type is then switched from Subtractive to Additive, you will here the guitar signal but with vibrato.  This is the main difference between this flanger and other TZF flangers; i.e. additive flanging at the zero-point gives vibrato rather than a clean signal.  The Rate pot changes the speed of the vibrato but not its amplitude.  Therefore apart from setting the 2 clock trimpots to allow signal cancellation at the zero point, the clocks must also run fast enough to make sure the vibrato is not excessive when the Rate pot is high.  This is also easy to achieve.
 
When the Depth pot is increased:  The first VCO gets the same sinusoidal control voltage as before, but the second VCO gets a larger amplitude sinusoidal voltage.  The aim is for both control voltages to have the same minimum value and there is an "offset" trimpot for this.  To set this trimpot, the Depth control is set at maximum, and the offset trimpot is adjusted so that there is a single clear zero-point during the sweep for the majority of Rate settings.  As I said, it is not possible to do this for all Rate settings (the LFO probably needs regulation) so it is a bit of a compromise and I let the slowest sweeps overshoot the zero-point in order to get a single well-defined zero for the majority of Rate settings I use.
 
Pictures:

Here are some pictures of my build.  It's on regular stripboard but I used a DIY copper foil ground plane on the top surface in order to keep the layout small.  I haven't boxed it yet, but you can see from the last of the pictures that if I put the board over the control pots and rotate it a little it should fit a 1590BB.







Sound Samples:

Here are some sound samples.  The first 5 samples are just the pedal going straight into a digital multitrack recorder with no amp modelling, no noise gate, and no other effects.

https://soundcloud.com/alex-lawrow/nzf-sample1
Sample 1:  Rate=High. Depth=Minimum. Regen = Off.
4 strums clean guitar sound.  4 strums Additive.  4 strums Subtractive.
Note there is no flanging sound but rather a weak vibrato effect for Additive, and very quiet sound with tremolo effect for Subtractive.
The subtractive method here does not give 100% cancellation because the VCOs are deliberately detuned (slightly) in order to avoid heterodyning when the depth is at a minimum.

https://soundcloud.com/alex-lawrow/nzf-sample2
Sample 2: Rate=Quite high. Depth starting at minimum then increasing.
In this second sample, I show how increasing the Depth makes the flanging effect appear.
First the Additive method at 4 depths.  Then the Subtractive at 4 depths.

https://soundcloud.com/alex-lawrow/nzf-sample3
Sample 3: Rate=Medium. Depth starting at minimum then increasing.
This is the same sort of thing as sample 2 but using a Tubescreamer on the input to the flanger to give distortion.
First the Additive method at 4 depths.  Then the Subtractive at 4 depths.

https://soundcloud.com/alex-lawrow/nzf-sample4
Sample 4: This shows how a slow sweep with large depth can overshoot the zero point (giving two quiet periods in succession).

https://soundcloud.com/alex-lawrow/nzf-sample5
Sample 5: Here I increase the Regen control from zero to maximum.  This shows there is a clear zero point even with large regeneration.

https://soundcloud.com/alex-lawrow/nzf-sample6
Sample 6: Here I added amp modelling, panning, and delay on the multitrack recorder.  I'm using Subtractive NZF with Tubescreamer on its input.


Project Instructions:

Complete instructions for the stripboard build (including the trimming procedure) can be downloaded as PDF from the following link.  
I know many people on this forum don't use stripboard so I have included a layout for single-sided PCB too :)  
I did a slightly better job of separating the two VCOs on the PCB.  I have not built the PCB but am sure the layout is correct.

Use the option to download as PDF in order to see the schematic and diagrams properly: http://1drv.ms/1jWU473

If anyone has a go at building this then please post pictures and sound samples.

Note: The resolution of the PCB masks in the PDF may not be great, so higher resolution ones can be found here.
Make sure to choose the "view original" option.
http://1drv.ms/1ht5OIQ
http://1drv.ms/1ht5U3a

samhay

Cool.
The ground plane bodge is a nice idea. I imagine it wasn't fun punching all the holes in it though!
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

DrAlx

Quote from: samhay on May 27, 2014, 07:01:42 AM
Cool.
The ground plane bodge is a nice idea. I imagine it wasn't fun punching all the holes in it though!
Actually cutting the breaks in the strips is the most time-consuming bit.  I reckon you can cut holes in the ground plane quicker and easier than you can drill holes in a PCB.

StephenGiles

"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

LaceSensor

from someone that owns the Foxrox TZF and EHX flange hoax, that sounds great!

DrAlx

#5
I have been experimenting with my circuit and managed to make a couple of improvements.

1) Change the Depth pot from 100-k linear to 100-k log.
For fast Rates, keeping the Depth close to zero gives very nice Leslie type sounds with "swish" in the high frequencies.  It's easier to dial these in with a log pot.

2) Change R13 (the emitter resistor on the Sallen-Key filter before the BBDs) from 10k to 1k.
This practically eliminates all "regular" heterodyne noise from the BBD (see my definition of "regular" below) without altering the overall frequency response.


For anyone who's interesting in designing/building a TZF flanger (or any other effect with 2 BBDs for that matter) here is what I've found from my limited experience of having designed and built 2 of them:

Ground Plane: I found the main challenge for a TZF build is limiting noise due to RF heterodyning. I always expected that to be the case which is the main reason why I used a ground-plane on both flangers.  If anyone out there has had success without a ground plane I would like to know how they managed it.

BBD biasing scheme: The first TZF flanger that I built (the Flexi-Flanger) biased both BBDs locally.  i.e. at each BBD input there was a 100k resistor going to a simple voltage divider (like in the Madbean Current Lover or 9V Electric Mistress).  After building it, I discovered that this was a poor approach to BBD biasing when there are two different clocks in the circuit.  High impedance at the BBD input gave large RF pickup, so clock signals leaked into the audio at the BBD input and heterodyned with the clocks applied to the BBD.  It was easy to demonstrate this because bleeding away the RF at the BBD input using a capacitor lowered the heterodyne noise.  So that's how I tried to fix things in the Flexi-Flanger (except I shunted the cap across the emitter resistor on the Sallen-Key filter preceding the BBDs).  This cap to bleed away RF was a "hack" to my original design, and it came at the cost of reduced audio bandwidth, distorted waveforms, and it was not totally effective either.
When I designed my second flanger (the NZF Flanger) I knew I needed to have a low impedance at the BBD inputs.  That's why I decided to bias both BBDs indirectly via the audio path even if that meant using the same bias voltage for both BBDs.  I thought the Sallen-Key filter preceding the BBDs would have a low enough output impedance with my original values but I was wrong.  Yesterday I found that lowering the emitter resistor R13 from 10k to 1k makes a big improvement.  The "regular" heterodyne noise was already quite low with a 10k emitter resitor, but lowering it to 1k pretty much killed it off.

BBD supply voltage: I gave each BBD the same supply voltage as the audio path, rather than the supply voltage of the BBD's clock generator.  This is different to all the other flanger designs that I've seen.   It just makes more sense for me for the clock signals only route into the BBD to be through the clock pins.  If there's a flaw in my thinking here then please let me know.


By "regular" heterodyne noise, I mean noise caused by RF in the audio path "beating" with clock signals within the BBD.  I use the term "regular" only because that's how I've mostly seen the heterodyning problem described for TZF flangers.
I don't have that particular source of noise in the NZF Flanger once R13 is lowered as described.  It's easy to demonstrate because using a capacitor to bleed away RF at the BBD input will not weaken the whistling sounds.
I am pretty sure those sounds actually come from the clock lines themselves as I say in my original post.  The clocks are beating with each other before they get near the BBDs, and this amplitude modulation of the clock lines leaks into the audio when the clocks work on the BBDs.

Does anyone here have experience of this particular form of heterodyning and how best to tackle it?
Maybe I'm being super picky because the noise is much lower than my first flanger and mostly not a problem, but I would clearly like to get things as best as possible.  I did experiment with using a NE570 compander and it will definitely remove the heterodyne noise, but I think it is sort of cheating, and I would like to see if I can get rid of the noise without resorting to adding more chips to the board.


puretube

#6

(single-sided PCB...)

next shock: the E-H FH only has a passive 1-pole R-C lopassfilter at the input...          (for each BBD)...
 "      "     : the E-H FH only has 2 passive 2-pole R-C lopassfilters (cascaded) at the output   "
why?

groundplanes?

supply?



more inspirations...







and: where is Stephen when he is called for?  :icon_wink:





DrAlx

A big thankyou to you PureTube  :)    I don't know how I missed all that good info before.
So it sounds like I screwed up in lots of ways :-[   ...

1) Trying to decouple digital from analog rather than decoupling the two audio paths from each other.
2) Sticking critical digital sections close to each other.
3) Not using star topology for the supply and grounds.
4) Using a single LPF before the BBDs (instead of one per BBD) and putting it far from the BBD input.
5) Trying to cram the whole thing in a 1590BB.

Time for me to go back to the drawing board on this. Assuming I resolve all of the above, would
it be a waste of time to attempt a stripboard build (assuming I put appropriate protective ground traces
on the strip-side of the PCB and find some way of doing a ground fill)?

StephenGiles

I'm here but have a mega headache this morning, so trying to read this lot on my Blackberry is not easy! I always thought minimal filtering was part of the trick. This is a very interesting project for folks who want to avoid the World Cup - like myself!!!
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

puretube

#9
Quote from: StephenGiles on June 14, 2014, 02:18:32 AM
I'm here but have a mega headache this morning, so trying to read this lot on my Blackberry is not easy! I always thought minimal filtering was part of the trick. This is a very interesting project for folks who want to avoid the World Cup - like myself!!!

Aahh - there you are!
As I had my Saint`s day yesterday, and my mood was brightened up by a certain W-C match,
I dug up some old schemo`s,
which, btw., are exactly 10 years old to the day ( ! ),
though I`m currently more involved in a 1-Transistor Through-Zero-Fuzz* development...



re-drawn partly schemo of one of the identical 2 delay-circuits of the Flanger Hoax from a schemo-scan:



There is no additional lo-pass signal-filtering in the whole pedal to what is shown in the re-drawn circuit...
(the bi-polar cap is there because of some switching and routing going on between CB and R0...)


another partly scan:


puretube

#10
DrALX,

first try to insert just 2 RC`s (e.g. 10k & 2n7) from your Q1 emitter to each pin 3 of the BBDs.
(with the cap physically close between to pins 3 & 1)
(IMHO R13 can go back to 10k again...).

If the P.S. is clean, Vgg doesn`t need to be de-coupled, IMHO...
(mine comes directly from the BL3102).

But then again, it is good practice for any BBD-circuit to at least symmetrize the 2 outputs
(if not adjustable), and individually terminate them.
This eliminates a lot of glitching...


My first P.S. was equipped with inductors:

(the blue rectangulars at the top)
but where omitted after design of a 2-sided PCB...



(protection-diode across the regulator missing in above drawing...)

puretube

Quote from: StephenGiles on June 14, 2014, 02:18:32 AM
I'm here but have a mega headache this morning, so trying to read this lot on my Blackberry is not easy! I always thought minimal filtering was part of the trick. This is a very interesting project for folks who want to avoid the World Cup - like myself!!!

Here`s the test-setup for comparing active 18dB or 24dB in/-output filtering with simpler passive RC filtering:



(the latter proving satisfyactory...)

and that`s why the space for the 2 filter quad-opamps and their components
(to the right of the regulator)
was left empty in the final proto-PCB


DrAlx

Thank you Ton for being so kind in sharing this info.  I will try a test with an extra RC stage as you suggest with the capacitor right at the BBD input.
I have tried a cap there before but not with preceeding series resistor.  I'm not hopeful that it will fix it though...
When I first built the board I heard a repetitive pattern of heterodyne "tweets" at the BBD output because of the sweep, and some tweets were louder than others.  I then used an audio probe on the clock lines to the BBDs and heard tweets there too but the pattern was not the same as the BBD output.
Holding a grounding cap on the BBD input (with no preceding series resistor) removed many but not all of the tweets from the BBD output, and so I figured I had RF pickup at the BBD input and it needed bleeding away.  That's when I tried lowering the emitter resistance and saw that worked too.
The pattern of BBD output tweets now shows a strong correlation to the tweets on the clock lines, in that a BBD tweet always matches a loud tweet on the clock line.
If I take a 6 inch insulated wire and hold it against one of the clock pins on one BBD, and then use the other end of the wire to "probe the air"  in the vicinity of the other BBD's VCO, then the pattern of tweets and their pitch remains the same, but they get much louder in volume when the probe gets close to the trim pot and transistor of the other VCO.  So I can tell which bits of the other VCO are most sensitive (to RF in the air at least).
It's this that leads me to believe its a problem with the VCOs, although I could be dead wrong because I have limited practical experience and am just trying to make an educated guess.
I really want to use those particular VCOs because they have just the sort of properties I need to make my idea work (i.e.  the trim pots allow you to give both VCOs the same (or very similar) voltage->frequency characteristic).  The CV mapping linearly to delay is importance too.
In any case, the fact that you managed to do this all with a single sided board and low filtering was a real eye-opener and I am going to rework the layout to keep the circuit blocks properly separated.

puretube

most important thing IMHO,
is to NOT have the two pins3 of the two BBDs interconnected directly.

DrAlx

Quote from: puretube on June 14, 2014, 01:49:59 PM
most important thing IMHO,
is to NOT have the two pins3 of the two BBDs interconnected directly.
I think I see what you mean.  If I understand you correctly, the 2 clocks may be interfering because the sampling process at one BBD input affects the input line, and so affects the sampling process at the other BDD input.  That didn't occur to me as a possible interference mechanism.  Let me hack those LPFs into the vero tomorrow and I'll report back.

DrAlx

#15
Actually let me take back what I just said.  I removed one BBD from the circuit, and so took one pin 3 out of the equation.  The tweets were still there on the other BBD.  I'll try the LPFs like I said anyway.

StephenGiles

#16
Quote from: puretube on June 14, 2014, 01:49:59 PM
most important thing IMHO,
is to NOT have the two pins3 of the two BBDs interconnected directly.

Absolutely,  thought about this - would 10k and 2n7 be really enough Ton? I would be looking at something nearer to 100k.

Also, if the BBD outputs are symmetrized, remember that you will need resistors to audio ground directly from all 4 BBD outputs. Is 56k enough? I notice that you have 100k Ton.  

What is the advantage of using a 3102 in your circuit Ton apart from generation of a clean Vgg ? Could he not cut down on parts by using a 4047 with suitable modulation tricks instead of the 311/4013 arrangement? Remember this discussion?
http://www.diystompboxes.com/smfforum/index.php?topic=49560.5;wap2

I did get a very smooth sweep in a flanger some years back using a 4047 with a TDA 1022, but was forced to remove it from my breadboard by the BBD Taliban!!
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

DrAlx

I removed the direct connection between the Sallen-Key emitter and BBD inputs.
Each BBD input now has its own RC filter using 10k and 2.7 nF.  I left the Sallen-Key emitter resistor at 1k.
Sadly, the LPFs didn't fix things :(

Here are sound samples.  Just the pedal into a Boss BR600 digital multi-track recorder.
I apologise in advance for Soundcloud annoyingly playing someone else's track after my sample has finished.
The reason being that on the first sample, you may have to increase the volume to hear the noise, and it will probably blow your eardrums after it finishes and then launches into playing some guy's acoustic piece.

Sample 1:  First to give you an idea of the heterodyne noise, I play a chord and then mute the strings so you can hear the noise.
It is quite low but there.  You may not notice it, but you will do if you plug the effect into a high gain device.
https://soundcloud.com/alex-lawrow/nzf-heterodyning

Sample 2: To make things more audible I increased the gain on the recording box to maximum and recorded only the noise.
About half way through the sample, I short out both 10k resistors at the BBD inputs using a screwdriver blade, effectively making them both zero Ohms.
Things get noisier because the long blade is acting like an antenna, but the heterodyne noise is the same level as before, so the LPFs do not have a noticeable effect.
https://soundcloud.com/alex-lawrow/rin10kthenzero

Sample 3: Here I use an audio probe directly on the BBD output.  Then I take it off and put in on the BBD's clockline.
Notice it's the same pattern and pitch of tweeting but louder.  That's why I reckon the VCOs themselves are the problem, rather than noise on the BBD input.  Like I said, even if I unplug one BBD from the circuit, the remaining BBD and its clockline will still have this same noise.
https://soundcloud.com/alex-lawrow/audio-probe-on-bbd-output-then-clock-line

StephenGiles

Are the boards in a grounded metal box?
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

DrAlx

Quote from: StephenGiles on June 15, 2014, 01:31:51 PM
Are the boards in a grounded metal box?
I just tried putting them in one now, and put the lid on too.  No difference I'm afraid :(.