State Variable Filter LPF noise

Started by MrStab, December 29, 2016, 08:34:57 PM

Previous topic - Next topic

Rob Strand

Quotebut i'll read up on the basics
This is a good start,
http://www.epanorama.net/sff/Audio/Semi_Specs/AN-104.PDF

Quotewhen i have some time. as far as i can tell, LTSpice shows the square root, and requires that the input source and test node be specified (for which i chose U1A's output).
OK.  You will find there is something like INOISE (noise referred to input) and ONOISE total noise at the output both probably in V/rtHz.    You need to add-up the noise squared and do it in the frequency domain.    Look over that links first.
Quotei'm having another noise issue with a dated USB interface since my last PC build unfortunately, so i can't get a better recording at the moment or it'd seem 20 times worse!

One trick is to record the noise into a PC then analyse the noise levels using some sort of sound analysis tool software.  The simple way is to just filter the results using a 10kHz second-order (or more) filter but you might find an A-weighted filter plug-in.   You need a way of getting the rms of the signal too.  If you don't use filters you will get very misleading results.  Wide band noise makes the numbers much larger but they aren't the components you hear.  Eg. you won't hear the effect of a 20kHz low pass filter but the measured noise value before and after filtering can differ enormously.





Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

thanks for the PDF, i had a wee Google earlier and couldn't really find a good foothold to get started learning about it. that should help me get further than "oh, the numbers go down a bit if i do this".

i use freebie spectrum analysis software and a tone generator from a phone or laptop to test the ranges, Q and gain of my EQs, but i wouldn't have even considered using my current setup to detect noise. as you suggest, it's definitely not as straightforward as looking at the pretty shapes. i do want to figure out how to get a noise spec, though - i was gonna ask but thought it might be impossible with the gear i have. if it is possible, i'll try to get my PC hiss problem fixed and maybe switch to Cubase or something, if there is a plugin(s) that would help.

FWIW here's a handy program i found one day when i was a bit annoyed with the clutter in other swiss-army-type analysis software:

http://www.techmind.org/audio/specanaly.html

they had to be extra-careful with that URL.

Recovered guitar player.
Electronics manufacturer.

Rob Strand

QuoteFWIW here's a handy program i found one day when i was a bit annoyed with the clutter in other swiss-army-type analysis software:
http://www.techmind.org/audio/specanaly.html

Looks like it might do the job and it has A-weighted measurement.    For A/B comparisons you don't need much.   Consistent results between runs on the same device is a good thing!  Some software is all over the place.

BTW, thanks for the link.  It's good to have these things kicking around.
Gradually I'm moving over to Ubuntu so I've been trying to force myself to use Audacity - it certainly has it's limitations.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

no probs! my condolences for having to use Audacity, i've had to use it from time to time and the lack of realtime processing and intuitive dragging/cutting is soul-destroying.

applying the oscillation fix to the low band removes the crazy-loud switch pop as it did on the high band btw, despite there being no similar issues with the BC pot. so an extra win there. i haven't gotten round to any "proper" testing yet, but i had a good jam with it earlier and it seems fine. giving it to some friends in another band tomorrow to try at rehearsal volumes.
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quoteapplying the oscillation fix to the low band removes the crazy-loud switch pop as it did on the high band btw, despite there being no similar issues with the BC pot. so an extra win there.
It's good feeling when you know you have weeded out some issues.

Quoteno probs! my condolences for having to use Audacity, i've had to use it from time to time and the lack of realtime processing and intuitive dragging/cutting is soul-destroying.
LOL. 

My dream (cough) of creating a parallel universe of software on Ubuntu has generally gone down similar paths.  I'm impressed how well Ubuntu works out of the box but once you get past a browser and OpenOffice things tend to go backwards.  The "geek level" required to fix OS issues is way beyond the level of any of my family members.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

i've given the pedal to some friends in a death metal band to try out - between the 2 guitarists and bassist, there should be a good range of pickup types, amps and pedals to put the EQ through its paces. i also tried it through single-coils on a crap Kustom practice amp at my charity shop earlier, no unacceptable noise except when the settings are abused. just some mains hum from the only adapter i could find.

SVF EQs seem really, really unforgiving with mains hum IME, while i'm on the subject. i tried to be somewhat meticulous with my Spyder PSU, and even high-gain distortion pedals don't pick it up, but SVFs seem to. even if just slightly. maybe reducing that cap to Vref in the diff-amp would help, but a 10R/1,000u or 100r/100u on the power rail always takes care of it. without the filter, it happened with the random adapter i used earlier, too, which the manager of the shop uses all the time for pedals. weird. i'm open to the possibility of magnetostriction from either PSU though, the transformers are big and quite near the rest of the circuitry.

as traitorous as it is to hardcore nerd-dom, i've always been a Windows fan and after disabling a long list of Ministry of Thought connections, i even kinda like Windows 10! tried a portable Linux distribution once, but i realised i wasn't up for re-learning some of the basics. and there's just more stuff to shoot on Windows. but i don't doubt Linux's advantages if you put the work in.

i'll be giving that noise PDF a read over the weekend now that build's out of my hands for a bit. at risk of excessive gratitude, thanks once again for all the help! will be re-reading much of this, it's been interesting to see such a looped feedback relationship between all the stages as opposed to just a linear in-out deal with only parasitics, capacitance and preceeding gain to address.
Recovered guitar player.
Electronics manufacturer.

Rob Strand

QuoteSVF EQs seem really, really unforgiving with mains hum IME
That's a bit weird.

If any parts connecting to ground symbols on your schematic are going are actually going to 0V, connections like R12, R13, C8 then moving the 0V connection to Vref might help.

Maybe increase the Vref cap?

It might have something to do with the new opamps but I doubt it.

QuoteLinux's advantages
My conclusion is for specific tasks the software choices are very limited compared to windows.
After a forced update, one windows machine at work completely barfed and the OS has to be reloaded/reset.
It was fairly new with minimal software installed.  I'm not fond of any updates especially forced ones - your machine works today and might do weird stuff or be broken tomorrow.

Quotethanks once again for all the help! will be re-reading much of this, it's been interesting to see such a looped feedback relationship between all the stages as opposed to just a linear in-out deal with only parasitics, capacitance and preceeding gain to address.
No problem at all.   

Regarding stabilizing the feedback loop: One thing I was going to mention was to look up "stability", "loop gain" and "phase margin".  You can do this stuff in spice.  Unfortunately with your circuit how the circuit behaved didn't match up with spice.   That's one of the remaining puzzles of your circuit.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Rob Strand

It occurred to me that what ever is causing the high sensitivity to the supply hum might actually explain why the circuit was hard to stabilize!  Maybe it is worth digging  a bit deeper.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

All reference "grounds" within the in/out caps are Vref. The circuit as built exactly like the ESP schem (and that Japanese variation schem floating around), without any of the additional stuff, have been prone to it if the PSU isn't 1,000,000% hum-free. That one's over 3 different layouts!

I wonder if something about the Vref routing is to blame here. I have a dedicated buffered Vref just for this band for testing, so it's only gonna be contaminating itself.

Maybe even the actual ground has a routing flaw board-side, tho i try to "star" it within the board and offboard as much as possible. Power filter cap/rev. polarity diode go straight to PSU ground, before going on to the chassis with the rest of the circuit's grounds.

The oscillation fix had no noticeable effect on the hum sensitivity, but it is a weird one so I'm open to it!

I've definitely been taking op-amp stability for granted a bit until now - there's always been an obvious fix to why an op-amp wasn't responding well that probably prevented me digging too much deeper.

Cheers!

Sent from my Vodafone Smart ultra 6 using Tapatalk

Recovered guitar player.
Electronics manufacturer.

Rob Strand

QuoteI wonder if something about the Vref routing is to blame here. I have a dedicated buffered Vref just for this band for testing, so it's only gonna be contaminating itself.

An opamp buffer seems like it should be a solid low impedance output *but* at high frequencies, at and above frequencies where stability issue occur, the output impedance isn't that that low at all.  So maybe the opamp buffer is the reason for the stability issue.   A good example is the Sallen and Key second order low pass filter.  The attenuation is poor at high frequencies (believe it or not)  The feedback caps leak signal through to the output because the output impedance is not longer low!

QuoteThe oscillation fix had no noticeable effect on the hum sensitivity,
What I was thinking is not so much the fix but the cause.  The thing that is causing the hum is causing the stability issue.    The buffer impedance won't have an effect at low frequencies.

One thing though.  On your buffered Vref, there is a voltage divider (divide by 2) before the buffer, yes?   On that voltage divider do you have a largish cap to ground?  If not then that is the reason for the hum sensitivity.    The hum on the supply is divided by 2 but the hum then feeds straight into Vref.   In the normal 2xR + Cap type Vref circuit the cap act as low frequency low pass filter that removes hum from Vref.   The cap also ensures Vref has a low impedance at high frequencies - better than an opamp!

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

sorry for the delay, had a busy few days.

there's a 47u cap to ground off the Vref divider, but it doesn't seem to affect the hum. if an RC on the power supply kills it, where it shouldn't be to begin with, then methinks it's just a matter of sub-par PSU filtering. friends haven't ever mentioned the issue with their commercial power bricks, but it is inconsistent when other pedals aren't as susceptible. if the hum is caused by instability, it's either in the original SVF/Urei design or is caused by some kind of proximity. a scope would help figure that out.

at one point i had a LT1054 set up for a bipolar supply - that made noise debugging even more fun. lol

Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quotethere's a 47u cap to ground off the Vref divider, but it doesn't seem to affect the hum. if an RC on the power supply kills it, where it shouldn't be to begin with, then methinks it's just a matter of sub-par PSU filtering. friends haven't ever mentioned the issue with their commercial power bricks,
That's very very strange.  It means the hum is not on Vref but on +V.

Most power bricks have an internal filtering cap of about 1000uF.  I've measured the ripple on many of them and derived the cap value.  I'd say that would be fairly universal except for high current units (and perhaps the odd unit that has 470uF).

If you add a 1000uF across power *with no series R* and it fixes the problem then I'd suspect the internal filtering cap has failed in the PSU.   If the hum only goes down by half then there's something weird going on with your eq

Many pedals have a local 100uF across the power rail.  So the other effects which don't have the humm might be filtering enough to keep the ripple down with the failed cap - effectively hiding the failed cap problem.  If your board has no local electrolytic caps on the power rail that would explain why you get hum on the eq but not on the high-gain effects.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

as far as my own PSU goes, iirc there's 470uF on the input side of each regulator and 100uF on the output side, identical over 6 outputs. the original GeoFex Spyder design called for 220u and 10u respectively, so i figured 470/100 would cover more bases. there's almost definitely some magnetostriction going on, because there are 3 stupidly-oversized 12VA transformers in there (i was shopping while unsober and needed 12V...) and they're not toroidal.

then there's usually a 100uF across the rails of the EQ, or 10R+1,000u to kill hum with minimal voltage drop in this case. i don't think the hum went away with just a cap last i checked, but i'll give it a go next time i score some bigger values. no doubt the regulator output caps could be bigger, though. i have no clue what's inside the other adapter i used.
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quoteiirc there's 470uF on the input side of each regulator and 100uF
If you have regulators you should get about 250mA per output with that input size cap.

Quotestupidly-oversized 12VA transformers i
Sometimes you have to take what is available.   If the transformers are distant from everything it shouldn't be an issue.
I once had a preamp with only a 2VA transformer, for some reason I would get hum though the pickups from that and not the 100W amp sitting right next to it.  (I suspected the transformer was running near magnetic saturation.  There was an era where such practices were common).

Quotethen there's usually a 100uF across the rails  ... i don't think the hum went away with just a cap last i checked
What about the wiring of the ground to those caps.  You want:  PSU inlet ->   100uF caps ->  circuit. You don't want any signal connections between "PSU inlet" and "100uF caps".   I think you had an issue like with the TDA2030 amp.

Beyond that I'm running out of ideas.

You have had an unfair number of weird problems on this project!
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

i only used 78L09s unfortunately, so 100mA per output max. i guess that's why the Spyder specs were so small. there were 6VA transformers available for much cheaper at the same source (and for much less muscular pain when carrying it!), i was just an idiot and it was too late to send back. there's about 2 inches between the transformers and the circuitry, so i'm not too optimistic about it.

i did run the pre-amp grounds on the same path as the PSU filtering cap on that TDA2030 amp, but it's not an error i usually make. honest! the filter caps on the actual board (usually 100uF/100nF ceramic) have their ground going straight to to the PSU negative. the connection to signal ground is either done on-board just before that, or from a wire from the DC jack to star ground on the chassis. neither placement helps any, though they are essentially the same routing. there aren't any loops going on.

just wrote a bunch of stuff analysing my onboard grounds (only really op-amps, Vref divider & pulldowns), but then i remembered it's happened in previous versions with different grounding layouts. i guess it's just the PSU at this point - as i say, it's only me who's really noticed it.

cheers!
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quoteonly used 78L09s unfortunately, so 100mA per output max. i guess that's why the Spyder specs were so small. there

At this point all you tests point to the fact there really is ripple on +V and that is the source of the hum.

The parametric is could be pulling more current than your other effects current because of the high opamp count.      The 78L09s don't have heatsinks so they heat-up easily.  It is possible they are going into thermal shutdown (or riding the edge of it).  When that happens the regulator won't remove the ripple as well.   A sledgehammer approach would be to break out one DC rail with 1000uF filter cap and a 7809 (not the L) and see if you still see the problem.  The larger cap guarantees no dropout and the 7809 guarantees no shutdown (check it's not getting hot as well).    If that solves the problem maybe work back to see which one is the cause.

If it is none of those then err ...  you might have to play around with layout or isolate one parametric channel at a time.   General stuff to narrow down the problem.

Another thing you can check is the parametric's current draw.  If it's way over the expected current then there could a damaged opamp, or, .... wait for it ... something could be oscillating..

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

the hum is there even on a basic 6-op-amp configuration, unfortunately. i can't recall the exact figure, but i usually measure about 20-30mA for a 3-band EQ. no op-amps wasted in this one.

btw the alternative switching scheme where the Q-setting resistor and Q pot wiper are switched between Vref makes too loud a pop compared to the original system, though that's with a plain mechanical switch. i wonder if using the CMOS would quiet things up a bit, but i'd imagine the noise is from such sudden shifts in the biasing and any type of switch would have this problem. i think i'll just stick with the "short the lugs to Vref" approach for now.

cheers!
Recovered guitar player.
Electronics manufacturer.

MrStab

#97
(deleted original post because headphones revealed something a speaker didn't, so i made a mistake)

in a subsequent build with slightly different values for the same SVF frequency and range (3k/3n3/6k8 as opposed to 1k/10n/6k8 for 1-16KHz), i have squealing as a result of the inverter oscillation fix. i know because removing that RC kills it, but brings back the BC pot centre-click.

i haven't messed with the values much tbh, and i see right now i'm only reducing the troublesome highs by a gain of about -0.23, just under half the -0.5 of the full signal. so i'll try reducing it further. it'll be good to sort that out, as it implies the previous circuit may have been on the brink, too.
Recovered guitar player.
Electronics manufacturer.

Rob Strand

Quotethe hum is there even on a basic 6-op-amp configuration, unfortunately. i can't recall the exact figure, but i usually measure about 20-30mA for a 3-band EQ. no op-amps wasted in this one.
Not sure what is going on then.  The fact you can put an RC filter on the power rail and remove the hum means it is extremely likely the hum is on the +V rail.  The only things that are letting the +V get through to the audio output are the opamps and the Vref.

Quotebtw the alternative switching scheme where the Q-setting resistor and Q pot wiper are switched between Vref makes too loud a pop compared to the original system, though that's with a plain mechanical switch.
That's strange.   Any resistors that get switch must have a series cap and also a large resistor (10MEG) across the switch.   The caps ensure the DC level does not change between the two switch states and the resistor ensures the cap stays at the same (usually tiny) DC voltage.     The idea is there is no change to the DC levels *at all* so no chance of pop.  So if you are getting a pop something is wrong for sure.
IMHO the CMOS switches can only make things worse (due to other causes not the root cause you are seeing with the mechanical switch).

Quotein a subsequent build with slightly different values for the same SVF frequency and range (3k/3n3/6k8 as opposed to 1k/10n/6k8 for 1-16KHz),

I'm not overly surprised since taming the oscillation was tricky and within factor of two gain.   Not much margin to cope with variations.     The first build, the working one, I suspect is OK as a one off.  It's just the second build the characteristics of the parts are different and has kicked it over the edge.

Quotei have squealing as a result of the inverter oscillation fix. i know because removing that RC kills it, but brings back the BC pot centre-click.

All that means is you have moved the oscillation frequency.  The real issue is it is still oscillating.   The quick fix is  to go back to playing with the RC values on the inverter.

IMHO there's something not normal going on  as it is normally not so hard to stabilize a circuit like that.  Another weird thing is the simulation results do not show any extreme sensitivity to instability - despite me antagonizing it by changing the opamp characteristics.    Putting my engineer's hat on ... I would never let a circuit that oscillated out the door unless I *really* understood the cause and the fix.   So the real fix is to work out what is causing it to be so close to instability.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

MrStab

#99
your suggestions and my latest efforts ran in parallel - turns out it was the inverter RC, and i should've played with it some more instead of settling on the first values that made it work with the right frequencies. i didn't notice the issue previously as the low band only went up to 400Hz.

with 2k2/100p for 723KHz rolloff (wtf!), it works fine in both modes. problem solved.

i must've taken you too literally re. the Vref switching - i assumed you meant without any additional parts, and that the voltage shift wouldn't be too big as-is.

my gut still tells me the instability is caused by the way the LPF/HPF are mirrored at the mixer output. it's been held back from the door for at least 6 months while everything's ironed out - the last thing i wanna deal with is this confusion AND complaints! i think it's solved now, but i'll be giving it a lot of testing before i confirm that. i might push the frequency ranges to unrealistic levels while i do so.

weird nuance, FWIW: at certain values where both click existed in one mode and squeal in the other, they'd kick in at the same point on the BC pot (which actually makes me think it's frequency-independent, as the ranges for lo & hi mode are totally different...)

cheers!
Recovered guitar player.
Electronics manufacturer.