Troubles with Baxandall in LTspice (LTspice noob)

Started by hans h, June 20, 2021, 03:50:22 PM

Previous topic - Next topic

bowanderror

Quote from: PRR on June 26, 2021, 12:33:06 PM
> Where are people (Hans?) getting their POT? It is not a stock part in most sims. I got my PSpice POT from Koren (but nobody uses PSpice today) and learned a LTspice POT from Kuehnel (but nobody reads him).

I use Helmut Sennewald's potentiometer model from the LTSpice Yahoo Group (now over on Groups.io). It can do multiple, adjustable tapers and seems to function pretty well. For some reason the .txt file with the instructions is missing, but I found instructions from an older version. The bottom bit about the "Rtap" & "Tap" parameters are important for making log taper pots.

Rob Strand

#41
QuoteI use Helmut Sennewald's potentiometer model

I found that in the past but you need an account to download.

In PSPICE I made my own but I've been too lazy to make a new one for LTSpice

Here's a way to do it manually.   The down side is it doesn't look nice on the schematic
since you need two resistors.


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

PRR

Quote from: Rob Strand on July 02, 2021, 09:18:59 PM....In PSPICE I made my own....

PSpice, you can use the Norm Koren "POT".

"LTspice barfs at 0...."; there's a more elegant fix than 0.99999.

Quote from: me...name the pins top-wip-bot.
...the cheat to avoid the /0 error for A 0 or 1 is:
R1 top wip {((1-A)*r)+gmin}
R2 wip bot {(A*R)+gmin}
(gmin is a very small number, defined by SPICE, default 1e-12.)
Alternatively for "real" pots it would be realistic MIN/MAX to 0.99 or 0.01, since pot end effect runs about 1%. But for "ideal" potwork this leads to mystery discrepancy ("why is it 0.99 instead of 1.0?"). Using gmin puts the error in the numeric noise. ("0" makes wiper -300dB, which is quiet enough.)

As noted, "0.99" is perfectly realistic for real-world pots with end resistance. But sometimes you like to come out to the "right" answer.
  • SUPPORTER

Rob Strand

Quote"LTspice barfs at 0...."; there's a more elegant fix than 0.99999.
I agree using gmin or a small value is more elegant for a library but some kludges come back to haunt you.  If you are going to kludge it then gmin is the number to use for sure - in fact I often use gmin in manual expressions.  I'd say only a handful of people here know what gmin is and won't remember it.  For manual entry, it is *very* clear what you are doing when you use the silly numbers.

I often compare theoretical calculations and spreadsheets to spice down to fine decimals and it's really annoying chasing down forced offsets and kludges in library parts when it doesn't match.   Some were my own parts.   In a few cases I removed
the kludge but it requires very elaborate and unintuitive formulations - the kind of rubbish that's best kept away from users
and hidden in a library!

QuoteAs noted, "0.99" is perfectly realistic for real-world pots with end resistance. But sometimes you like to come out to the "right" answer.

Sure, but in the past I've been screwed over using 0.99's so that's why I use 0.9999 or 0.99999.

Anyway I'm not disagreeing with what you have said.  I'm only justifying why I've put it up like that.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

hans h

Based on your thoughts on coupling cap values I'll go with a different strategy: set the bass rolloff using cin, and make all caps afterwards slightly too big. Here's what I've got: cin between 5n6 and 10n (28 to 16 hz). C1 maybe 330n (482 hz for 1 k clipper impedance, I do not know what this will do tonewise. C2 1uf l, which looked right in spice and should correspond to worst case 14,5 hz. C3 220n, which would correspond to 14,5 hz worst case. Cout I would prefer using a film cap of 1uf. I do not use really low impedance pedals.

I do not want to go over 4 opamp stages. To separate the bax I could do: 1 clipping 2 clipping followed by volume 3 bax. Or is clipping followed by volume also potentially problematic?

Rob Strand

QuoteBased on your thoughts on coupling cap values I'll go with a different strategy: set the bass rolloff using cin, and make all caps afterwards slightly too big. Here's what I've got: cin between 5n6 and 10n (28 to 16 hz). C1 maybe 330n (482 hz for 1 k clipper impedance, I do not know what this will do tonewise. C2 1uf l, which looked right in spice and should correspond to worst case 14,5 hz. C3 220n, which would correspond to 14,5 hz worst case. Cout I would prefer using a film cap of 1uf. I do not use really low impedance pedals.
What you have done there is as good as anything.  You should plan to play with the caps to the clippers and work out the best values by ear.   They will have an effect on the tone.  Tweaking these areas by ear is going to be far more useful than any calculations.

QuoteI do not want to go over 4 opamp stages. To separate the bax I could do: 1 clipping 2 clipping followed by volume 3 bax. Or is clipping followed by volume also potentially problematic?
The ordering is up to you.  It does change the tone.   Putting the tone control at the end and the volume after that is more common.   If you put the actual volume pot before the Baxandall the output impedance of the pot is going to affect how Baxandall stage works.  It can be done with great care and some acceptance of change of behaviour but generally it's not a good configuration.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Vivek

Quote from: Rob Strand on July 03, 2021, 08:37:38 PM
Putting the tone control at the end and the volume after that is more common.   If you put the actual volume pot before the Baxandall the output impedance of the pot is going to affect how Baxandall stage works.  It can be done with great care and some acceptance of change of behaviour but generally it's not a good configuration.





I'm so grateful for all the gurus on this forum, and the way they share pearls of wisdom so freely !!

Here's a plot of input impedance of a typical Baxandall stage. It varies a lot, from 3K to 25K based on Bass control settings and frequency.

Hence a source with output impedance of less than about 300 ohms seems to be necessary. A volume pot would be too high a value to feed a Baxandall.

hans h

Hi Vivek and rob,

Thanks for the help, and nice work in spice! I have now rearranged to opamp | clipping | opamp | clipping, volume | opamp | baxandall | opamp. I've almost finished setting it up on breadboard. Had to use 10k and 3k3 instead of 11k and 3k6 in the baxandall since I did not have these values. I'll let you know how it goes and will make sure to play with the pre-clipping coupling cap values. I'm really curious how it will work.

The "boost switch" and "asymmetry control" are for later.

Thanks, Hans

Rob Strand

Something to be aware of with active boost/cut is they boost the level.   So the tone control itself can clip.   Usually the clippers prevent that because they limit the level going in.    If it's not enough, one way to handle it is to reduce the level before the tone control (a divider before the tone control isn't the way).    The other way is to simple restrict the amount of boost/cut on the tone control.   If fairly obvious when the tone control clips you crank the bass control and there's a point where the tone has some extra fizz.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Vivek

Great point Rob !!

If we want 1Vp output at the mids

and then boost the bass by 15db = 5.6 times

we can potentially land up with 5.6vp signal in the bass region (Pun intended)

If we dont want that clipped at the tone control, we need power supply of more than about 14 Volts Vcc to avoid clipping at the Baxandall at max settings.

Vivek

Quote from: hans h on July 06, 2021, 03:31:27 PM
opamp | clipping | opamp | clipping, volume | opamp | baxandall | opamp


I would be interested to know your though process and calculations for

Gain around each clipper
Filters around each clipper



PS: The trick of getting an Opamp to rail saturate or adding hard clip diodes can add an extra stage of clipping, which could be used advantageously.

There are Tube Amps that clip at more than 8 places

There are pedals that clip at more than 5 places

Recently I worked with ELECTRICDRUID Tom to show that the Boss Metal Zone clips in the "Pre-distortion tone control" stage as well, so it too is a 3 stage clipper with one non-obvious clipping section. And for all you know, the tone controls also clip in the Boss Metal Zone, I haven't had a close look at signal levels there.

See https://electricdruid.net/boss-mt-2-metal-zone-pedal-analysis/

PRR

> we can potentially land up with 5.6vp signal in the bass region


Or simply don't push so much signal in.

If you want a 1:10 ratio of meat to vegetables, do not eat a 1 pound steak. (Forces 10 pounds of carrots and cauliflower.) Try a 1/10 pound steak (1 pound veggies).
  • SUPPORTER

hans h

Hi, sorry for the late reply,

I thought I could prevent the baxandall from clipping by using the volume control (which is now separated from the baxandall by a opamp stage).

I also have some troubles with my breadboard version, already in the first clipping stage. I used 2n7000 mosfets. The first halve is: drain+gate => source => cathode of 1n4148 diode => anode => ground.
The second halve of the clipper is: anode 1n4148 => cathode => source => drain+gate => ground.
Somehow I only get decent (mildly clipped) signal through if I remove the second halve.

With the second halve in place the signal is somehow gated, very distorted and ugly sounding. Any thoughts on why this is?

@ Vivek, the clippers as they are are a direct copy of those in the Barber dirty Bomb. But you see the same clipper in the Hermida Zendrive for example. I was going to set the coupling cap prior to the clippers "by ear" based on the suggestion in this thread. So there is no fancy calculation or thought process going on with the clippers ::)

All thought processes were focussed on trying to get a two-"gain stage" pedal with control over each stage, with a boost option for lead. And very good control over the overall tonal response using the baxandall with selectable caps.

hans h

Forgot to add: the gain around the clippers is also from the dirty bomb, except that I changed the second 2k2 to a 1k, giving me a lower minimum gain in the second stage compared to the first. So idea is to first get the signal level up. Allow for clean to overdrive in the first stage, and overdrive to distortion in the second. A bit like using a tube screamer or dirty boost before a distortion.

Vivek


PRR

Quote from: hans h on July 09, 2021, 09:35:09 AM...prevent the baxandall from clipping by using the volume control....

Yes.

Quote from: hans h on July 09, 2021, 09:35:09 AM...some troubles with my breadboard version, already in the first clipping stage. I used 2n7000 mosfets. The first halve is: ..... ......

Clipper diodes to ground or to Vref? (Your last hand-drawing is not clear to me.)
  • SUPPORTER

hans h

I'll post a new and clearer schematic tomorrow. The clippers go to ground. Can the clipping stage somehow affect bias? Maybe I should post pin voltages. It is very strange that removing half of the clipper solves the problem. I also tried jfets (K30a) and the problem (and "solution") remained the same.

Rob Strand

QuoteCan the clipping stage somehow affect bias?
They can.  Symmetrical bias is usually OK but asymmetrical bias can cause problems.

You have a asymmetrical bias before the tone control.  When the bass is maximized the DC gain of the tone control is high and could amplify any bias shifting.

However, I think the real problem is you clipper are going to ground and upsetting the DC bias of the tone control.

The way around both those issues is to put another cap between the output of the clipper and the input of the tone control.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

hans h

This is the current schematic (removed shunting cap at input altogether).


Vivek

Great Circuit !!!!

A. Maybe good idea to have filters in between your two clipper stages ?

If you want to try variable low pass with low insertion loss, maybe you can try SWTC in between the two clipper stages.

If you dont have filters, the Baxandall treble control might spend most of its time in deep treble cut position, and you would further cut treble at the mixing board/DAW too.

B. I could not understand your Vref circuitry.

C. Will the 1M resistors DC bias one of the MOSFETS and change its clipping characteristics ? How can this be used to your advantage ?

D. Do you have DC flowing through your volume pot ? That might help you get that old timer crackly reliced pot effect !!!

E. Maybe 2-5K Current limiting resistor at output to protect against output shorts ?

F. Did you see WAMPLER ECSTACY's pre-dist bass control ? I would suggest you give it a try.

G. I see that the Opamps have great potential to rail saturate too. So this schematic would, more often than not, be clipping at 4 or 5 places.

H. It would be nice to see your calculations for gain of each stage, signal level at each stage, calculations for each cap and frequencies for the filter that it implements.

Hope that helps more than it confuses !!!!