What is SPICE

We all start somewhere
User avatar
Nick
Site Admin
Posts: 15751
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#46

Post by Nick »

Ok, next bit,

remove the 5k resistor at the end. Press the delete key, the cursor will become sizzors. the click on the resistor to remove it.

Also remove the param text, and change the value of the first cap back to 10u

Now find a new component, press F2, and a dialog will show you all the nice components you can select. Pick current. This selects a current source/synk, the cursor changes to the component, and put it in place of the resistor.

If it doesn't go in the correct place, press F3 and play a bit drawing wires between things.

When you have done that we need to set the values for the current load, as thats effectivly what it is in this case. Right click on it, and instead of just putting a current in, click advanced.

Now, in this dialog (which allows you to set how the load behaves), select Sine as the function, Then in the amplitude box put 20ma. Now in the box marked AC Amplitude, put 20ma, and in the Ac phase put 0

What we are doing now, is going to examine the way our supply behaves in the frequency domain. We have seen in the time domain, how it works as a power supply, and how the voltage behaves as the load changes.

Now we can consider the load we have added, as our fave SE amp, and we want to see how the supply behaves as the amp is expected to reproduce a range of frequencies.

Close the dialog, then we need to change the way we are running the sim, Click on the simulate menu item, then "edit simulation cmd". The dialog that appears allow us to alter just what sort of sim we do, click on the AC Analysis tab, to do a frequency sweep. Set points per octave to 100, start frequency to 1, end frequency to 100000 (both are in Hz), then close that, and run the sim.

Pick any node to run, then click on the top of the current load, to get a display of the voltage on load (your amp). The display now shows (or should) a graph of the way the supply responds to a load thats swept from 1hz to 100kHz, and you might notice, the nice simple supply you thought was fine, is a bit more complicated in the frequeny domain, something very off is going on around 16hz, thats the same frequency the cupply wobbled at in the earlier tests, and also displayed, is the bode plot (dotted) of how the phase response of the system varies with frequency.

Hopefully this will give youi another insite into the sort of detail that you can find with this stuff.

I will leave as a excercise for the reader (always wanted to say that :-)), adding another LC stage, and seeing what that does to the phase and aplitude response. And as before, you can add parameters, or click on the elements to see the current and voltages in the frequency domain.

Hopefully, some of the results you get with the power supplies, will give an insite into why myself and Andrew L have had many a beer based conversation about what makes a good supply, and may why regulators could be a good thing.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
User avatar
colin.hepburn
Shed dweller
Posts: 2294
Joined: Sat Jun 02, 2007 1:24 am
Location: Scotland Aberdeenshire

#47

Post by colin.hepburn »

Hi Nick
I Had some problems with a sintax error but played about and got a trace but not sure if right :roll:
Attachments
Demo 1 PSU.jpg
Demo 1 PSU.jpg (178.56 KiB) Viewed 10212 times
Demo 1 PSU.jpg 2.jpg
Demo 1 PSU.jpg 2.jpg (173 KiB) Viewed 10212 times
Colin
The Blues man ImageImage
User avatar
Nick
Site Admin
Posts: 15751
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#48

Post by Nick »

Yep, that looks right. You don;t need the Hz at the end of the frequencies.

I guess the next step is to get Andrew to talk through the Steve Bench valve models, if you have a moment Andrew?
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
Andrew
Eternally single
Posts: 4206
Joined: Thu May 24, 2007 2:18 pm

#49

Post by Andrew »

Homework first. Steve posted his stuff on Intact, but he's done several updates etc; I've rolled these into a single new zip file (attached). Please follow Steve's instructions and then we'll do a sim with a triode in it. Does everyone still want a simple SE amp? EDIT: Ignore the first bit and work down from "To make this even easier, I have..." (thanks Colin)
LT Spice can be made to provide a nice drop down box to select your tubes. In addition, once

you set this up, you don't need to add the .INC files to your spice program; it is

automatically set up when you grap the tube symbol.

To do this requires only a couple steps:
1. Open the .ASY symbol file associated with the part. For example TRIODE.ASY that is in the

LT spice folder under SWCADIII\lib\sym\misc folder. (you can do this from within LTSpice by

choosing open>files of all types in that directory).
2. Edit three attributes:
2a. Spice Model = Triode (or whatever at least one subcircuit is named in your normally used

.inc file)
2b. ModelFile = name of your include file (for example, dmtriodep.inc)
2c. Remove the Value field (I had to do this with a text editor)
3. Copy the model file (for example dmtriodep.inc) to the SWCADIII\lib\sub folder

Now, you don't need a .inc file in your spice program, and you get a nice pull down menu to

boot.

To make this even easier, I have attached 8 files to this post.(zipped to tubestuff.zip)
1. triode_dd_htr.asy. Copy this into the ...\lib\sym\misc folder
2. triode_dd.asy. Ditto
3. tetrode_dd.asy. Ditto.
When you make a schematic, you can pick one of these for the tubes in the miscellaneous folder

of parts.

4. triode.txt Copy this into the ...\lib\sub folder.
triode.txt has triode models for devices that also model the heaters. This is currently 6SN7,

12AT7, 12AU7, 12AX7.
5. triode_nh.txt. ditto
triode_nh.txt has models for over 40 triodes.
6. tetrode.txt. ditto
Note that these are couped into the subcircuit folder, not the symbol folder.

7. t_curves.asc. An example spice file that displays curves for tubes in each of these files.
Copy this into whatever directory you put your spice files into.
8. readme.txt. Essentially this post.

Enjoy,

Steve
Attachments
tubestuff.zip
Steve's download.
Tube models plus updates - original models from various places, Duncan Amps Norma Koren and Steve himself etc.
(11.73 KiB) Downloaded 513 times
Last edited by Andrew on Thu Dec 06, 2007 4:50 pm, edited 1 time in total.
Andrew
Eternally single
Posts: 4206
Joined: Thu May 24, 2007 2:18 pm

#50

Post by Andrew »

Nick wrote: Hopefully, some of the results you get with the power supplies, will give an insite into why myself and Andrew L have had many a beer based conversation about what makes a good supply, and may why regulators could be a good thing.
Hands up anybody? :wink: A chance to go to the top of the class!
User avatar
colin.hepburn
Shed dweller
Posts: 2294
Joined: Sat Jun 02, 2007 1:24 am
Location: Scotland Aberdeenshire

#51

Post by colin.hepburn »

Regulators helps in keeping the psu voltage at a constant rate as voltage drops current increases ?
Colin
The Blues man ImageImage
User avatar
Nick
Site Admin
Posts: 15751
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#52

Post by Nick »

It is a bit of a biased question though as it assumed the resaons myself and andrew think regs are good is correct. So you might want to regard that as a retorical question.

However, its interesting to repeat the sym, with the sort of lower value caps that many prefer in SET supplies, and see that the phase problems can get into what you might consider the audio band.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
Andrew
Eternally single
Posts: 4206
Joined: Thu May 24, 2007 2:18 pm

#53

Post by Andrew »

Yes, Nick's right I fess up too, we're placing our biases on you, and providing our evidence as to why we think regs might be better.

Actually, as is often in life, it's probably not the whole story, and there's another side to the argument.

We would need to model a regulator and then show if that falls down, or not and why...

But I think you can see the shortcoming of a passive supply, Dave Dove says he hears thickening of the bass and that's a good an explanation as I have yet heard.

cheers,

-- Andrew
User avatar
colin.hepburn
Shed dweller
Posts: 2294
Joined: Sat Jun 02, 2007 1:24 am
Location: Scotland Aberdeenshire

#54

Post by colin.hepburn »

That’s one reason I like my SE. headphone amp using senn HD650s you can hear these changes in sound much easier the one advantage is no room bounders getting in the way I find that top mid is exalent bass is good all the way down to the point you can feel it thats a sign of a promising h/amp I can hear muddy bass on some music but I put that down to some bad recordings? But a better Psu can only improve the amp or can you go too far on this what do the panel think on this
Colin
The Blues man ImageImage
User avatar
Nick
Site Admin
Posts: 15751
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#55

Post by Nick »

I think its certainly worth trying.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
simon
Thermionic Monk Status
Posts: 5643
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#56

Post by simon »

Andrew wrote:Does everyone still want a simple SE amp?
Sounds good to me, PP adds another level of complexity.
User avatar
colin.hepburn
Shed dweller
Posts: 2294
Joined: Sat Jun 02, 2007 1:24 am
Location: Scotland Aberdeenshire

#57

Post by colin.hepburn »

Yep go for it simpler the better for now

PS Andrew can you pleas PM me a simple step by step guide on how to do this drop down menu stuff tried to follow the method in your post but can figure this computer attributes stuff :oops:
sorry for the inconveniences this may cause
Cheers
Colin
The Blues man ImageImage
Andrew
Eternally single
Posts: 4206
Joined: Thu May 24, 2007 2:18 pm

#58

Post by Andrew »

Steve's post is a little confusing, you want the second bit.

Simply...

Unzip tube_stuff.zip onto your Desktop this should put 8 files on your Desktop

Open explorer right click on "My Computer" and click Explore

Go to the folder C:\Program Files\LTC\SWCADIII\lib\sym\misc

1. triode_dd_htr.asy - Copy this into the folder C:\Program Files\LTC\SWCADIII\lib\sym\misc
2. triode_dd.asy. - Copy this into the folder C:\Program Files\LTC\SWCADIII\lib\sym\misc
3. tetrode_dd.asy. - Copy this into the folder C:\Program Files\LTC\SWCADIII\lib\sym\misc

Go to the folder C:\Program Files\LTC\SWCADIII\lib\sub

4. triode.txt Copy this into the folder C:\Program Files\LTC\SWCADIII\lib\sub
5. triode_nh.txt. Copy this into the folder C:\Program Files\LTC\SWCADIII\lib\sub
6. tetrode.txt. Copy this into the C:\Program Files\LTC\SWCADIII\lib\sub

7. t_curves.asc. An example spice file that displays curves for tubes in each of these files - Copy this into whatever directory you put your working (like demo1.asc) files into - we'll use this later.

8. readme.txt. Delete it.

Tidy up your desktop.
User avatar
colin.hepburn
Shed dweller
Posts: 2294
Joined: Sat Jun 02, 2007 1:24 am
Location: Scotland Aberdeenshire

#59

Post by colin.hepburn »

Thanks Andrew
Got it working now it was the first part of the post that was doing my Head in
Cheers :)
Colin
The Blues man ImageImage
Andrew
Eternally single
Posts: 4206
Joined: Thu May 24, 2007 2:18 pm

#60

Post by Andrew »

OK.

Here's a simple grounded cathode that we might use in the first voltage gain stage of an SE amp.

We need to select a triode, lets stick with something well known like an ECC83, perhaps for a Loftin White.

Right click on the triode and where it says "Spice Model = " there's a drop down menu, choose 12AX7_ECC83.

What happens if we put a signal generator on the front of the circuit and drive a 1kHz tone into the '83?

Right click on V2, which is our signal source, pick advanced then select SINE.

Set the DC offset to be 0v, Amplitute to be 1v, and Freq to 1k.

Now do a transient analysis like Nick did for the system.

Open up the menu Simulate->Edit Simulation Command, set stop to 3s Time to start saving to 2.9sec

Run the sim.

By clicking about, as before, you will see the input signal at 1v, the inverted signal superimposed and amplified on the DC at the anode of the '83 and the same signal at the cathode.

If you delete the 22uF cap, just leave the wires hanging, then re-run you can see the cathode is now going up and down much more - there's no cap to short the AC signal signal at the cathode to ground. So the cathode moves much more, as a result higher levels of degenerative feedback are seen and among other things gain is reduced. We can look at this later when we do an AC sim.

-- Andrew
Attachments
demo2.asc
Grounded Cathode Gain Stage
(1.12 KiB) Downloaded 309 times
Post Reply