What is SPICE

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

#121

Post by Nick »

Ok, this is a good chance to witter about power supply things.

As you say, as it was posted, its a bit of a slow moving thing.

Out of interest, change the choke to a Hammond 159Y, 0.6H 11R. First cap to 47uf, seconf to 470uf. Then you get a much faster step response.

Now try seening how the supply impedance changes with frequency, select the current load, and make it a advanced load, then choose sine, and set the DC amplitute to 440ma as before, set the frequency to 1000hz, and the am;itude to 90ma. Then run again, and zoom in to the flat portion, ypu will see you have about 500mv P/P ripple, with about 70ma P/P of the 1k signal.

Now as the load is 180ma P/P and the resulting 1k ripple is 70 mv p/p ohms law shows if that the supply has a source imp of 70/180 ohm or just under 0.4 ohm.

Now we can see how that impedance varies with frequency. Select the load again, and now set a small signal AC analysis amplitude of 90ma.

Now edid the simulation command, and sweep the load from 1hz to 1k

Ac analysis tab, points per octave 100, start frequency 1hz, stop frequency 1000hz

Now run the sim, and look at the voltage on the current source. We can see that the nice fast response, ands given us a worrying looking peak at 10hz.

Now, try and add another LC stage to try and lose that peak, have a play, and if you arn't carefull you will end up in the bar with Andrew and me talking about regulator designs.

Its never simple is it, the original "slow" supply had a nice smooth response to the frequency sweep, so what looks bad in the time domain looks beter in the frequency one, and vice versa.

Ho, Hum :-)
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

#122

Post by Andrew »

If you take the original demo1.asc circuit and the above notes from Nick, we can conclude that the PSU must have an output resistance.

If you first click that first sim between V1 and R1 you see a flat line - that's Spice's perfect PSU, which you get by default. In general Spice will
always give you "ideal" components, but we know no such thing exists.

We can make at least two interesting changes to the circuit, these will
make more realistic. We could add in Nick's PSU, and feel free to do
so if your inclined. However, we can approximate true PSU beahviour
without the extra complexity and extra complexity slows down the
simulation, and sometimes an approximation is useful.

So, add some series resistance to the PSU, right click V1 and add
100R; this will be the output resistance of our PSU. You an use various methods to get this value.

Now click the same wire between V1 and R1. Can you see the amplified
signal is now there? It wasn't before, so what's going on?

The clue is it relates to what Steven was saying about PSU de-coupling.

cheers,

-- Andrew
SimonC
Old Hand
Posts: 545
Joined: Mon Sep 24, 2007 11:34 am
Location: West Yorkshire

#123

Post by SimonC »

Nick wrote: Now, try and add another LC stage to try and lose that peak, have a play, and if you arn't carefull you will end up in the bar with Andrew and me talking about regulator designs.

Its never simple is it, the original "slow" supply had a nice smooth response to the frequency sweep, so what looks bad in the time domain looks beter in the frequency one, and vice versa.

Ho, Hum :-)
I had a play last night, but my brain wasn't really in gear (I was doing this after filing tax returns). Will try harder tonight, honest sir.

I've managed to avoid talking about regulators in bars so far, its only a matter of time I guess...

Simon C
User avatar
Nick
Site Admin
Posts: 15707
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#124

Post by Nick »

I've managed to avoid talking about regulators in bars so far, its only a matter of time I guess...
Must be drinking with the wrong people :-)
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
SimonC
Old Hand
Posts: 545
Joined: Mon Sep 24, 2007 11:34 am
Location: West Yorkshire

#125

Post by SimonC »

Nick wrote:
Now, try and add another LC stage to try and lose that peak, have a play, and if you arn't carefull you will end up in the bar with Andrew and me talking about regulator designs.

Its never simple is it, the original "slow" supply had a nice smooth response to the frequency sweep, so what looks bad in the time domain looks beter in the frequency one, and vice versa.

Ho, Hum :-)
Eeeek, I can kill the peak, but it does something horrible to the ripple voltage. Adding series resistance looked the have the biggest effect (as its a resonant peak I'm trying to damp this would make sense, but it will slug everything).

Ho hum :lol:

OK, what's the next lesson in my long path to enlightenment?

Simon C
User avatar
Nick
Site Admin
Posts: 15707
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#126

Post by Nick »

Yep, it sone of those things, fix one part, another problem shows up. Regs don;t do much different, fix the probles you had, but introduce you to a new set you hadn't thought of,

IMHO, teh nest step, is to build some more, spice is very usefull, but it doesn' t let your ears score what you find.

Without wanting to kill the thread (wich I don't mean to) what you have now, is about as much as I know.

Here is something to play with, the basic WAD phono, great to play woth and to se the effect RIAA values have.

The network at the front is the inverse RIAA network that Andrew has as a object.
Attachments
WadPhono.asc
Wad phono II
(4.98 KiB) Downloaded 289 times
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

#127

Post by Andrew »


OK, what's the next lesson in my long path to enlightenment?

Simon C
Did you try modifying the demo1 circuit to see what the PSU does to the gain stage?

Next up would be to add some ripple to see what that does, its goes without saying you'll see the ripple amplified by the gain stage.

But is also useful to see what is required to de-couple the PSU from different stages.

cheers,

-- Andrew
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#128

Post by IslandPink »

Sorry I turned up 5 years late !
Did I miss anything ?
"Once you find out ... the Circumstances ; then you can go out"
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#129

Post by IslandPink »

Ok, just one quick question then :
How do I identify 'ground' ?
I picked up Andrew's LCR phono model ( see attachment ) but it complains of not having a path to ground, when I try to run a frequency simulation .
Attachments
LCR-RIAA.asc
(2.02 KiB) Downloaded 182 times
"Once you find out ... the Circumstances ; then you can go out"
User avatar
izzy wizzy
Old Hand
Posts: 1496
Joined: Fri Nov 02, 2007 7:02 pm
Location: Auckland NZ
Contact:

#130

Post by izzy wizzy »

There's an upside down triangle thing that is ground. Up the top in the component toolbar.

cheers,

Stephen
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#131

Post by IslandPink »

Thanks Stephen - got that . Now I need to set up the voltage source properly - D'Oh !
As you can see, I'm a bit of a 'random access' learner , I just like to jump in anyhow and start picking up knowledge and making mistakes.

I'l go back up the thread and find what I can about sources.

My aim with this is to try out minor changes to Andrew's phono ( which I'm building ) and to try & understand the behaviour of the T-Rex shunt power supply ( see other thread ) which I'm also getting parts for .
"Once you find out ... the Circumstances ; then you can go out"
User avatar
izzy wizzy
Old Hand
Posts: 1496
Joined: Fri Nov 02, 2007 7:02 pm
Location: Auckland NZ
Contact:

#132

Post by izzy wizzy »

That's how I learned SPICE. Downloaded working sims with generators already in them to see what happened. Design everything with it now.

I haven't read all this thread but Intact site has some really good stuff with Stephie's drop down valve models and other good bits of info.

The threads with phono stuff in them have generators and good inverse RIAA circuits too.

cheers,

Stephen
Andrew
Eternally single
Posts: 4206
Joined: Thu May 24, 2007 2:18 pm

#133

Post by Andrew »

Should we make this a 'sticky', Nick?
Analogue, the lost world that lies between 0 and 1.
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#134

Post by IslandPink »

I picked up a couple of files from Stephie Bench - from Intact - for Inverse RIAA input . Don't know how to use them yet !

I still can't see where you set up an AC voltage source in order to run the simulation. edit : hang on - this looks good :
http://denethor.wlu.ca/ltspice/
"Once you find out ... the Circumstances ; then you can go out"
User avatar
pre65
Amstrad Tower of Power
Posts: 21373
Joined: Wed Aug 22, 2007 11:13 pm
Location: North Essex/Suffolk border.

#135

Post by pre65 »

All the Spice sims that I've had done for me have a DC voltage input.
The only thing necessary for the triumph of evil is for good men to do nothing.

Edmund Burke

G-Popz THE easy listening connoisseur. (Philip)
Post Reply