Welcome to Solid State Guitar Amp Forum | DIY Guitar Amplifiers. Please login or sign up.

April 19, 2024, 01:53:06 AM

Login with username, password and session length

Recent Posts

 

Questions on Ruby

Started by soren_jepsen, February 08, 2007, 04:22:41 PM

Previous topic - Next topic

soren_jepsen

I've been looking at different versions of the lm386 amp. Is it possible to put fx. a fender or marshal tonestack in there, without loosing the nice overdrive u can get with the circuit? The Noisy cricket does have a single knob, but I would like more flexibility.

ROG have a version where they use the fetzer circuit, but if I'm correct that is higher gain than the circuit in the ruby and noisy cricket. How does that affect the sound?

Could you fx. put the tonemender from ROG in between the buffer and the lm386?

Hmmm... I guess this shows quite a lack of gain knowledge on my side :-[

...on that note, how do you calculate the gain loss of a tonestack? Could it be done in either Tina Pro or ltspice?



teemuk

#1
"...on that note, how do you calculate the gain loss of a tonestack? Could it be done in either Tina Pro or ltspice?"

I don't know what is Tina Pro but definitely it can be done with LTspice.

And yes, you can put Tonemender in between the buffer and LM386 but in practice the tonemender already has a buffered input so you can remove the buffer of the Ruby; just use the tonemender's output to feed the pin #2 of LM386 chip directly. If you replace the 100k constant resistor in the output (of Tonemender) with a 100k potentiometer (Log-type) you have a volume potentiometer.

What comes to tone, gain and plausibilty of the circuits you mentioned... To make a long story short: Why don't you just simulate the stuff in i.e. LTspice (LTspice yahoo group even has a spice model of LM386) and find out. This will give you a more comprehensive reply than one could ever give you on this forum. By the way, if you did not know, LTspice allows you to use .wav-file as circuit's input and record the circuit's output to another .wav file, so you can actually hear how the circuits would sound like.

SPICE softwares can seem complicated at first but trust me, eventually you'll get the hang out of them - (maybe you already have). This is the case with all software one has to learn to use - they all may seem complicated at first. Once you learn to use one you will likely learn to use another one faster. I will gladly assist if you have some questions concerning LTspice.

Edit: Concering that gain loss calculation... There is a paper analysing the Fender Bassman '59 circuit's tonestack. Here is a link if you want to do it the old fashioned way (pen and paper): http://www.dafx.ca/proceedings/papers/p_001.pdf
Personally, I'd stick with SPICE. Duncan Munro's tonestack calculator is another option: http://www.duncanamps.com/tsc/


teemuk

#3
Try to follow me on this. You need a suitable schematic symbol (.asy) for it that matches up with the node definition of the sub circuit file. (Explained soon).

Copy this:

Version 4
SymbolType CELL
LINE Normal -32 0 64 64
LINE Normal -32 128 64 64
LINE Normal -32 0 -32 128
LINE Normal -28 32 -20 32
LINE Normal -28 96 -20 96
LINE Normal -24 100 -24 92
LINE Normal 16 0 16 32
LINE Normal -16 128 -16 117
LINE Normal -21 19 -13 19
LINE Normal -17 15 -17 23
LINE Normal -20 110 -12 110
LINE Normal 48 0 48 53
LINE Normal -16 0 -16 11
LINE Normal 32 85 32 128
LINE Normal -32 32 -48 32
LINE Normal -32 96 -48 96
LINE Normal 64 64 80 64
TEXT -49 19 Left 0 2
TEXT -49 83 Left 0 3
TEXT -9 3 Left 0 6
TEXT -9 124 Left 0 4
TEXT 19 21 Left 0 1
TEXT 52 41 Left 0 8
TEXT 35 99 Left 0 7
TEXT 62 78 Left 0 5
WINDOW 0 64 16 Left 0
WINDOW 3 48 120 Left 0
SYMATTR Value LM386
SYMATTR Prefix X
SYMATTR SpiceModel LM386.sub
SYMATTR Value2 LM386
SYMATTR Description Audio Power Amplifier
PIN -48 32 NONE 0
PINATTR PinName In-
PINATTR SpiceOrder 1
PIN -48 96 NONE 0
PINATTR PinName In+
PINATTR SpiceOrder 2
PIN 32 128 NONE 8
PINATTR PinName B
PINATTR SpiceOrder 3
PIN 16 0 NONE 0
PINATTR PinName COMP2
PINATTR SpiceOrder 4
PIN 48 0 NONE 0
PINATTR PinName V+
PINATTR SpiceOrder 5
PIN 80 64 NONE 0
PINATTR PinName OUT
PINATTR SpiceOrder 6
PIN -16 0 NONE 0
PINATTR PinName COMP1
PINATTR SpiceOrder 7
PIN -16 128 NONE 0
PINATTR PinName V-
PINATTR SpiceOrder 8

and save it in ascii format as "lm386.asy". Place the file into a subdirectory:
[ltspice directory]\lib\sym\misc

Now when you start ltspice you should find the symbol under misc folder. It already has an internal reference to lm386.sub file, which is the model you posted. Copy the lm386.sub file to folder
[ltspice directory]\lib\sub

The netlist order of the symbol and subcircuit do not match. I did some searching and found out someone has tampered with them. See for complete list of the files.

http://news.elektroda.net/model-for-lm386-audio-amp-vt1531.html?start=0&postdays=0&postorder=asc&highlight=

Basically, you have to do some tweaking here: Open the symbol file in LTspice (file type: .asy). You should see the nodes (rectancular boxes with circles inside them) with some number labels beside them.

Note the lines in lm386.sub file:

* IC pins:        1   2  3     4   5     6  7    8
*                   |   |   |     |   |     |   |    |
.subckt lm386 g1  inn inp gnd out  vs byp g8

You see that the label numbers are consistent with the numbers in lm386.sub. THIS HAS NO IMPORTANCE! The numbers you see are just labels.

Right click one of the model nodes in ltspice; this opens "Pin/Port Properties" window. You should see a number in "Netlist Order" upper right in this window. THIS IS IMPORTANT. The netlist order has to match up with the line defined in lm386.sub file. abbreviations are:

g1: gain set pin 1
inn: inverting input
inp: non-inverting input
gnd: common
out: out
vs: Vcc in
byp: bypass
g8: gain set pin 8

The netlist order is defined by the order the node is listed in .subckt command parameters. You have to edit either the netlist order in .asy file or the order in lm386.sub file so that both match each other. The latter is easier to do: Edit lm386.sub and replace the original line with:

.subckt lm386 inn inp byp g1 g8 out vs gnd

This should be equal with the netlist order defined in .asy file. As you see, it is also what was in the original file. Save, restart ltspice and everything should work.

Edit:

ALTERNATIVE way, recommended only for learning more on subcircuits:

1. Do not edit the model. The pin numbering is consistent with DIP8 symbol found from misc component folder.
2. Place DIP8 symbol to schematic and right click it. In "Component attribute editor" window type model name defined in .subckt command (in this case lm386) to "Value" field. Make sure there is "X" in the "Prefix" field as this marks eXternal component. Exit editor.
3. Insert a spice directive ".lib lm386.sub". That's it. Won't look as impressive and informative as the customized symbol but works all the same.

Why is this important: The same process works with pretty much every component and subcircuit. You can get the editor from transistors etc, by [ctrl]-right click. ".lib" the subcircuit files, edit the component attributes to indicate external component ("X") specified by subcircuit's name in value field.

soren_jepsen

Thanks, you're awesome man  :D