Troubles with Baxandall in LTspice (LTspice noob)

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

Previous topic - Next topic

hans h

Hi DIYers,

After fooling around with fets for distortion/overdrive circuits I'm now fooling around with opams for a distortion circuit. I wanted to include a Baxandall tone stack and use a single cap per side.
Ultimately I am going for a mesa-like frequency response (potentially by including cap in series at output of U1 as highpass and cap to ground as lowpass).

However, this is my first LTspice circuit and I cannot get it to work properly. I plotted the frequency response from 10 hz to 10Khz and get a maximum of 200mdB attenuation (100k lin pots both at 90%). However, I would expect a boost when the pots are above 50% of several decibels. Is it A) the values in my circuit don't make sense, or B) my implementation of the circuit into LTspice is flawed or C) something else?

I included a picture of the circuit in LTspice (blue rectangles are connections) and the graph when the pots are at 90%.

Any input is welcome,

Thanks in advance,

Hans (from the Netherlands)


antonis

You need to place gain/stopper resistors on both sides of Treble pot and an isolation resistor between Bass pot wiper and C2..

As for items values calculation, see Figure 1b below:
https://headwizememorial.wordpress.com/tag/equalizer/
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

ElectricDruid

Antonis is right - there are still parts missing from your Baxandall circuit. Once you get those it, you should see the curves you expect.

One thing to mention about LTspice though; unless you specifically tell it to, it doesn't necessarily use the input level as the 0dB reference. You might find you get a graph with the curves correct, but that go from 0dB to -10dB when flat, to -20dB when cut. You've got two choices at that point. Either don't worry about it (it's just a quirk of the software) or force it to do the right thing by plotting Voutput/Vin instead of just Voutput.

LTspice is a powerful bit of software for something that's free and it's a very useful tool, but lordy it's quirky!


hans h

Hi Anthonis and electric druid,

Thanks for the quick responses. I actually used the single cap baxandall from this thread (there's a bunch of different schematics halfway in). There is no resistor between the bass and treble side in that schem. Is it wrong? For the rest I'll have to open ltspice and need some more time. Again, thanks a lot for your responses! https://www.diystompboxes.com/smfforum/index.php?topic=125735.20

hans h

Just for clarity: this is the schematic posted by phoenix in the thread I mentioned earlier.
It seems like my schematic matches "active Baxandall 2" exactly. So were these extra components omitted in that schematic for simplicity?

I'm going for the one-cap variant so I can maybe fool with switches with caps on them to get some different tonal options.



hans h

I've now got this:


But I get the same type of response. I'm starting to think that the pot model I made is maybe erroneous. I'll have to look into that first.

ElectricDruid

I think you might be right - I just noticed on your first diagram that the pot has no value. Perhaps LTspice can't see a value either?

It's certainly fussy about the syntax for stuff like that. Example: Watch out for m not M. It doesn't recognise M as mega and turns it into m for milli. You put a 10M resistor in and then can't work out why it acts like it's shorted...

hans h

#7
Hi Electric Druid and Antonis,

I finally got it working. Turns out that something was wrong with my pots. I am usually not a fan of using %, so I made the pot model  as such: param Ra = R*Val and param Rb = R*(1-Val) where Ra and Rb are left and right of the wiper. But then I forgot I had used fraction rather than percentage, so I filled in Val = 50% in my baxandall schematic  :P.

I now have the schematic almost exactly as in the link of Antonis, with the exception of an additional lowpass and highpass filter to filter out unnecessary frequencies. I also converted the 500 k treble pot to 100k (equal to the bass pot). I do wonder, why is the bass peak higher than the treble peak? Both pots are at 90 % in the image:




** Edit:
I think I found the reason: when I increase the capacitance of the bass cap, the boost for the treble frequencies also increases. Apparently the values of the bass and treble caps were to close together and therefore the boost available for the treble frequencies was reduced.

I have to play with this some more since the notch in the Mesa amp tone circuit is actually quite narrow. Any idea of how to get a narrow notch without reducing the amount of boost available for the treble pot?

antonis

Quote from: hans h on June 25, 2021, 08:52:09 AM
I also converted the 500 k treble pot to 100k (equal to the bass pot). I do wonder, why is the bass peak higher than the treble peak?

Try it with 500k Treble pot.. :icon_wink:

In breef:
Treble pot value has to be much higher (10 times or more) than (R6+R3+2R7) for Treble gain calculation according to the (R6+R3+2R7) / R6 formula..
(it has to do with the wye-delta transformation at high frequencies of Bass circuit load across the Treble circuit, in which R2+2R7 and R6+Treble pot are effectively set in parallel.. The higher the value of the later the closer the the former only consideration.. ) :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

iainpunk

#9
hey,

misschien is deze link wel handig : Tone Stack Calculator Active Bax

je kan met de waardes spelen on te kijken wat het allemaal doet, zo kan je snel 'zoeken' naar de gewenste waardes.

de groeten, Iain


EDIT: translated to english

maybe this link is usefull [link]

you can play with the values to check what effect it has on the response, this way yo can quickly search for the values you want

cheers, Iain
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

hans h

To antonis: thanks for the heads-up about the pot value. Did not realise that. Do any of the other part values have a larg impact on the frequency response (apart from the bass and treble cap)?

To Iain: nice to see another Dutchman around on the forum. I live in Noordwijkerhout near the coast. The link you gave is a much better online calculator than the one I used before. Lucky that I did not know about it, otherwise I would never have started using ltspice!

I also played around with the Duncan tone stack calculator a bit more and found that mesas typically have a notch at 400 to 500 hz, whereas that of the typical marshall is around 700 hz. I think I'm going to implement switchable bass and treble caps to go from marshally to mesa'esque on the fly. I'll let you know what values I settle on.

Thanks for all the help!

antonis

#11
Quote from: hans h on June 25, 2021, 04:39:27 PM
Do any of the other part values have a larg impact on the frequency response (apart from the bass and treble cap)?

You can always play with VIN and VOUT impedance (Rin & RF in calculator posted by Iain) to see what happens.. :icon_wink:

P.S.
IMHO, C4 Treble cap should be of lower value (4n7 to 3n3)..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

PRR

This worked for Fender. Leave out the mids if you like.

  • SUPPORTER

Vivek

I have a few Baxandall models in LTSPICE

Like SansAmp and Cornish Crunch CC-1 and National Semiconductor 2 band and 3 band examples

I can share with you if you PM me your email address

I also have some POT models that work beautifully

and also the standard potless workaround of a resistor whose value depends upon another resistor (the other side of the pot)


Vivek

#14
Quote from: ElectricDruid on June 20, 2021, 06:05:16 PM

One thing to mention about LTspice though; unless you specifically tell it to, it doesn't necessarily use the input level as the 0dB reference. You might find you get a graph with the curves correct, but that go from 0dB to -10dB when flat, to -20dB when cut. You've got two choices at that point. Either don't worry about it (it's just a quirk of the software) or force it to do the right thing by plotting Voutput/Vin instead of just Voutput.

LTspice is a powerful bit of software for something that's free and it's a very useful tool, but lordy it's quirky!


Dear brother Tom,

I feel LTSPICE works this way for Freq response curves in decibel :

Suppose you enter in a Baxandall model and keep settings flat

In your sine input voltage source, you specify "Small signal AC Analysis, AC amplitude" as 300mv,

Then do a frequency response AC analysis

You will get a line at -10.46 db

which corresponds to a gain of 0.3

and we see that 300mv is 0.3 of a volt ie 300mv is 0.3 of 1Volt


now suppose we set AC amplitude 500mv, we get a straight line in the AC analysis at -6.02 db

which corresponds to a gain of 0.5

and we see 500mv is 0.5 of 1Volt


Indeed if we set the "Small signal AC analysis, AC amplitude" of input sine source at 1000mv, we get a straight line at 0db in the AC analysis


The output is referenced to 1V = 0dB ie a reference of fixed amplitude, hence the output graph shows absolute values.


That sounds some kind of logical, not quirky at all.


PS : If you click on Y axis and temporarily convert the Axis from decibel to linear, you will see the exact voltages that are being output and you will be able to correlate that with the  "Small signal AC analysis, AC amplitude" that you have set in your Sine source


and for sure, plotting V(out)/V(in) will reference the decibel scale to the input ie relative values.

Which is fine if the V(in) is fixed amplitude over all freq band

But if we have multiple tone shaping stages in series, we need to look at both, the absolute referenced graph and also the input referenced graph.

PRR

> ..if we set the "Small signal AC analysis, AC amplitude" of input sine source at 1000mv, we get a straight line at 0db in the AC analysis ... The output is referenced to 1V = 0dB ie a reference of fixed amplitude, hence the output graph shows absolute values.

Yes. A ".AC" run is actually run at infinitely small signal, then scaled by the nominal input level. My sim always runs at "1V" no matter what I type in. Newer sims let you put in any number; you could put in a million Volts. But mostly the only number which makes sense is "1".

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).
  • SUPPORTER

ElectricDruid

Quote from: Vivek on June 26, 2021, 06:10:18 AM
The output is referenced to 1V = 0dB ie a reference of fixed amplitude, hence the output graph shows absolute values.

That sounds some kind of logical, not quirky at all.

Ok, I agree - that has it's own logic. It's just that if I'm designing a baxandall tone control, I want to know if it does +/-10dB or +/-12dB or +/-15dB or whatever, and I want a graph that shows me that curve with those values, not something referenced to some arbitrary absolute value. The "flat" level needs to be 0dB, since no gain is being applied.

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.

Can't remember, sorry. I needed one and went hunting on the interwebz and found two or three different ones, of which one was better than the others.

Vivek

Quote from: ElectricDruid on June 26, 2021, 01:05:38 PM
The "flat" level needs to be 0dB, since no gain is being applied.

I suppose setting the "Small signal AC analysis, AC amplitude" of input sine source at 1000mv might get you what you want.

ElectricDruid

Quote from: Vivek on June 26, 2021, 01:17:37 PM
Quote from: ElectricDruid on June 26, 2021, 01:05:38 PM
The "flat" level needs to be 0dB, since no gain is being applied.

I suppose setting the "Small signal AC analysis, AC amplitude" of input sine source at 1000mv might get you what you want.

OK, I'll make sure that's what I do and give it a try. Thanks, I've learned something new about that software.

hans h

#19
Hi all,

The pot is just two resistors related to each other by an equation (like the last line in Vivek's post). This guy on youtube has a video about it:

https://www.youtube.com/watch?v=yfUPlEQOhlc

You can set any value you like for the total resistance and for the wiper position. I think this 'pot model' is really convenient as I only want to plot one line with one pot setting each time, otherwise I get confused.

To Vivek: Thanks, it would be really helpful to have some examples to play around with. I'll make sure to send you a PM.

To Paul: What is the advantage of the fender rumble-style tone stack? It surely looks different. Does it have a name or was it introduced by Fender? On a related note: I found that the fender tone stack frequency response, or at least the position of the notch, is actually quite similar to some of the Mesa tone stacks (or probably the other way around).

To Antonis: if I lower the treble-cap value I get a much wider notch which is very different from the typical amp tone stacks we see for example in the duncan tone stack calculator. I'm not saying that that is worse in any way, just different. At the moment I'm into playing some smashing pumpkins tunes from the Mellon Collie album, so I thought it would be nice to have something mesa/ marshally voiced around. I also got a bit fed up with fets (and they are getting harder to source) so I'm going for clipping stages using passive mosfets clipped by opamp stages (similar to the Barber Dirty Bomb). My working schematic at the moment is the following (I hope I did not forget any important parts this time):


It has two gain stages with clipping. Each gain stage can be set individually. the first gain stage has a boost switch option (toggle gain pot to maximum). The second has an asymmetry control (pot in one of the two clipping paths). This is followed by the bax tone stack (values still to be determined, will allow switching from mesa'esque to marshallesque). This is followed by a buffered volume pot. Edit: treble cap could be a fixed 2n7. Bass cap values could be: 15 nf (voxish/ big muffish), 15 nf parallel with 12 nf (marshall) and 15 nf parallel with 33 nf (Mesa).

I am not really sure about the coupling cap values as I always get a bit confused on impedance. Potentially, the second 330n should be 1uf like in the LTspice baxandall model. However, in that model the preceding stage is an inverting opamp rather than a non-inverting opamp. Maybe I also forgot some series resistance in some place(s).

I am really grateful for all the help. I've learned so much from you in the last couple of months!