Go Back   Home > Forums > >
Welcome, bordodynov.
You last visited: Today at 09:05 AM
Private Messages: Unread 0, Total 30.
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki User CP Donations FAQ Calendar Community Quick Links

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
Thread Tools Search this Thread Rating: Thread Rating: 15 votes, 5.00 average.
Old 22nd August 2014, 03:25 PM   #51
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Default Adding ripple to the PSU.

Something different...

We all know clean and stable rails are important but can we simulate the effect of less than perfect supplies in LT. Well up to a point we can.

Lets go back to the basic sim and set it to run the <transient> simulation. Now right click the supply voltage source and set it like this.



Click the image to open in full size.

Now run the simulation and probe first of all the supply line. We have ripple... and lots of it. Can you also see how the waveform was made up from the settings you just entered ?

Now probe the amplifier output. I think we can safely say that the buzz would be a trifle audible.



Click the image to open in full size.

Now change the sim to show an FFT. You should have learned enough to be able to do that... remember to account for the time constant of the caps. Hint... change the caps to say 800,000uf and clear the "number of cycles" box from the voltage source. If you cut the input voltage source (scissors, cut the trace leading to the input) from the circuit and now run the transient sim for say 10 seconds you should see this appearing on the amplifier output.



Click the image to open in full size.

Now rerun the FFT but this time change the sample points to a lower number. The lower harmonics are shown more clearly.



Click the image to open in full size.

And we see this in all its glory.



Click the image to open in full size.

If you look closely at the FFT and move the cursor over it you will see the harmonics coincide with the 50Hz mains (so we get 100Hz ripple with a full wave bridge and reservoir cap). Its not good is it ?

You can also put voltage sources in series. Bob C gives an excellent example in his book whereby an amplifier is simulated for the 19+20kHz CCIF test using two input sources in series.
Report Post   Reply With Quote Multi-Quote This Message
Old 22nd August 2014, 04:13 PM   #52
PMA is offline PMA  Europe
diyAudio Member
 
PMA's Avatar
 
Join Date: Apr 2002
Location: Prague
Window ...
Report Post   Reply With Quote Multi-Quote This Message
Old 22nd August 2014, 05:20 PM   #53
myhrrhleine is offline myhrrhleine  Belize
diyAudio Member
 
myhrrhleine's Avatar
 
Join Date: Jan 2006
Location: Avalon Island
Good going Mooly.
I am sure there are many of us reading along even if we do not post.
Awesome work!
__________________
[Grasshopper]:Old man, how is it that you hear these things?
[master]:Young man, how is it that you do not?
Report Post   Reply With Quote Multi-Quote This Message
Old 22nd August 2014, 06:46 PM   #54
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Quote:
Originally Posted by PMA View Post
Window ...
Yes... they needed a clean

Pavel is suggesting a more suitable setting for the FFT.

Click the image to open in full size.

Which allows a much better result. Thanks

Click the image to open in full size.

And I can't resist adding this one

Click the image to open in full size.
Report Post   Reply With Quote Multi-Quote This Message
Old 22nd August 2014, 06:47 PM   #55
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Quote:
Originally Posted by myhrrhleine View Post
Good going Mooly.
I am sure there are many of us reading along even if we do not post.
Awesome work!
Thanks myhrrhleine... I'm learning as I go along too.
Report Post   Reply With Quote Multi-Quote This Message
Old 22nd August 2014, 09:13 PM   #56
Kahlfin1k is offline Kahlfin1k  United States
diyAudio Member
 
Join Date: Feb 2014
This is outstanding! Thank you! Any chance you might add an installment on adding tube models to spice?

Thanks again!
Report Post   Reply With Quote Multi-Quote This Message
Old 23rd August 2014, 01:20 AM   #57
fas42 is offline fas42  Australia
Banned
 
Join Date: Jun 2012
Location: NSW, Australia
Quote:
Originally Posted by Mooly View Post
We all know clean and stable rails are important but can we simulate the effect of less than perfect supplies in LT. Well up to a point we can.
Just to make the point that extremely realistic power supplies, attached to the nominal circuit being examined, can be simulated in LTspice - a power supply is still an electrical circuit, all the parts exist in LTspice to make it happen; what happens is that you discard the ideal supplies normally used, and extend the circuit, modelling real world supply components.
Report Post   Reply With Quote Multi-Quote This Message
Old 23rd August 2014, 07:55 AM   #58
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Quote:
Originally Posted by Kahlfin1k View Post
This is outstanding! Thank you! Any chance you might add an installment on adding tube models to spice?

Thanks again!
Pleased you are finding it useful. Tooobs... no promises (and I don't do tooobs ) but I'll have a look into it.

Quote:
Originally Posted by fas42 View Post
Just to make the point that extremely realistic power supplies, attached to the nominal circuit being examined, can be simulated in LTspice - a power supply is still an electrical circuit, all the parts exist in LTspice to make it happen; what happens is that you discard the ideal supplies normally used, and extend the circuit, modelling real world supply components.
I would say up to a point because even with the best will in the world, you will never come close to simulating a complete build, its wiring, the PCB, component parasitics etc. On a more basic level though, you can.

I had in mind to do a little more on PSU's but more...... well you'll see
Report Post   Reply With Quote Multi-Quote This Message
Old 23rd August 2014, 11:58 AM   #59
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Default Simulating a simple PSU.

Lets now us LT to do something a little different. We will attempt to design a simple PSU and use LT to look at the voltages and ripple produced. We will build on that and later add a voltage doubler and a simple regulator.

Firstly we need some idea of the actual circuitry we will use. A typical idea might start off like this...



Click the image to open in full size.

We need to translate that into a simultion so we begin by opening LT and creating a "new schematic" which you can then save under a new file name in your chosen location.

To build the circuit we need four diodes and a cap to begin. Click the "diode" symbol on the top line and drop four diodes onto the workspace. Before you make the drop, carry the attached symbol over to the "rotate" symbol (4th in from the right) and orientate them so that the circuit can be drawn out logically. Having dropped four diodes, do a right click to deselect the diode drop and now using the same method drop a cap onto the workspace.



Click the image to open in full size.

Now wire it up neatly.



Click the image to open in full size.

Our voltage source will be sinewave, just as if transformer fed. So we need to add a voltage source to the diode bridge input. Using the "component" symbol on the top line, open the component library and select a "voltage" source and add it to the diagram. Let us assume we have a 20 volt transformer. That 20 volts is an RMS value and LT needs a peak value to set the source up. So we multiply 20 by root 2 to arrive at 28 volts. We enter that value by right clicking the voltage source and selecting "advanced". We can also enter the other details at this point too.



Click the image to open in full size.

What might be a good reservoir cap value. Lets use a modest 1000uf. Right click the cap and make the value 1000uf. We also must add a ground symbol to the diagram, so do that now attaching it to the 0 volt line. We also need a suitable diode. Right click each in turn and using the "pick new diode" option select the MURS320. That is a typical silicon diode. At this point we also tidy things up by using the "hand" symbol.

Information... if you right click the diodes text, that is to say the MRS320 text you get a window with options of how to palce the text, or to make it invisible if space is short.

So we can go from this,



Click the image to open in full size.

To this.



Click the image to open in full size.

To simulate the circuit we will initially run the sim for 2 seconds, so open the <edit simulation> option (right click the workspace) and set 2s as the transient stop time.

Now run the simulation and probe the voltage on the cap. You should see a nice steady 27 volts or so (LT has correctly accounted for the diode volt drop of the bridge). Do you remember how we could expand any section of the trace by putting the cursor over the section of interest and drawing a box around the part to expanded ?

Look closely at the start of the trace. The charging of the reservoir cap is shown correctly and if you look at just that portion of the waveform you should see something like this.



Click the image to open in full size.

Why have we no ripple on the output ? It is because we are drawing no current so what we can do now is add a load resistor of say 30 ohms.

That will draw just under 1 amp. You should know how to attach that by now so go ahead and add the part and re-run the simulation.

Now we have lots of ripple.



Click the image to open in full size.

Expand the trace and look at the detail.



Click the image to open in full size.

If you hold CTRL and left clcik the trace label then just as before, we can see the voltages.

Click the image to open in full size.

That is probably enough to be going on with for the moment... next we will add the doubler and regulator. Did you notice that we didn't run the DC op pnt command on this one. You can try it but you will find the voltages are all zero. That is because there is no steady state supply, this circuit is dynamic and must be measured accordingly using the <transient> tab.
Attached Thumbnails
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-startinging-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts1-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts2-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts3-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts4-png  

Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts5-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts6-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts7-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts8-png   Installing and using LTspice IV (now including LTXVII). From beginner to advanced.-parts9-png  

Report Post   Reply With Quote Multi-Quote This Message
Old 23rd August 2014, 12:18 PM   #60
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
As ever I would urge you to construct the circuit from scratch as you gain a lot of knowledge in manipulating LT's commands and parts handling.

However here is the file for those who just want to run it to see how it behaves.
Attached Files
File Type: asc LT PSU.asc (1.3 KB, 131 views)
Report Post   Reply With Quote Multi-Quote This Message

Reply

Quick Reply
Message:
Remove Text Formatting
Bold
Italic
Underline

Insert Image
Wrap [QUOTE] tags around selected text
 
Decrease Size
Increase Size


Installing and using LTspice IV (now including LTXVII). From beginner to advanced.Hide this!Advertise here!

Posting Rules
You may post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[LTSpice] Beginner - help with capacitor multiplier? bugbear Power Supplies 17 12th November 2016 12:18 AM
Meistersinger VFA-200, A beginner’s first try in LTSpice nattawa Solid State 34 29th January 2016 02:58 PM
Including a C- winding on a filament transformer AllenB Tubes / Valves 2 8th May 2014 06:17 AM
Need help installing LTSpice rif Software Tools 4 30th May 2013 02:59 AM


New To Site? Need Help?

All times are GMT. The time now is 09:33 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 16.67%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright ©1999-2020 diyAudio
Loading...