Learning LTSpice

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,163
Bertus, thanks for the link!

Eetech00, I'm sure Bertus' link will explain, but how do you configure the graph like that???
 

eetech00

Joined Jun 8, 2013
3,956
Bertus, thanks for the link!

Eetech00, I'm sure Bertus' link will explain, but how do you configure the graph like that???
Hi

Label each wire net your interested in with a meaningful name (CLK, Q1, for example), otherwise
the simulation will use default net names like N004, N005, etc.

Here's the step I used for the graph:

1. Run the simulation. When you run the sim the first time, a single empty Plot Pane will be displayed.
2. Rht-Click in the Plot Pane window and select "add Plot Pane". I added 5 additional panes.
3. After adding the Pane's, mouse over the CLK net name. The cursor will change to a "voltage probe" icon. Click on the CLK label (or anywhere on the "CLK" wire) to display its voltage in one of the panes.
4. In the plot pane, mouse over the net name, then click, and drag it to the pane where you want it displayed. Repeat this for each net you want displayed.
5. To display the LED current, mouse over the LED component. The cursor will change to a "current probe" icon. Click the component to display its current in one of the panes. Then click/drag the net to the pane where you want it displayed.

Note:
Voltages are selected with the "voltage probe" icon. To select current, mouse over the component until a "current probe" icon is displayed, then click. To view current thru a wire, mouse over the wire until the voltage probe appears, then press the "Alt" key. The cursor will change to a current probe, then click.

Hope that helps.

eT
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,163
eetech00,

Worked like a charm, after I played around with it a bit. Your explanation was clearer than the tute I was trying to follow.

I do find that when selecting probe points, if components are too close together, the voltage probe doesn't appear. If I move the components apart a bit and zoom into the selection point, I can eventually get it.

new chaser graph.png
 

wayneh

Joined Sep 9, 2010
17,498
Thanks. That did it! Would never have found those parameters.
Can you elaborate on what exactly you changed that gave Vdd at the outputs of the 4017? I labelled my supply voltage to Vdd, and this makes everything work, but my output voltages are well below Vdd.
 

eetech00

Joined Jun 8, 2013
3,956
Can you elaborate on what exactly you changed that gave Vdd at the outputs of the 4017? I labelled my supply voltage to Vdd, and this makes everything work, but my output voltages are well below Vdd.
Hi wayneh

A while back I posted a demo CD4017 in one of your message threads. I've attached it again.

In this demo, I used "cd4000_v.lib". That is a special version of the CD4000 library that allows global assignment of the supply voltage to all the CD4000 devices on the schematic by defining a wire lablel with a specific name, "VDD". The effect of this assignment isn't obvious because there is only one device...the CD4017. But I could have placed more CD4000 devices and they would have automatically inherited the 9v supply voltage because of the VDD wire label on the voltage source. Use of this library is the easiest way to manipulate the supply voltage of all the CD4000 devices. The component attributes do not have to be edited.

In djsfansti's circuit, the "cd4000.lib" library file is used. This library doesn't have the "global net" assignment functionality. So, there are two ways to handle global assignment of the supply voltage.
1. Manually edit the default component property "vdd=5" of each existing device to contain the desired value and also edit any newly added devices.
This is a pain just to keep track of, especially if there are many devices.
2. Use a param statement to assign the value to the voltage source and then edit each CD4000 component property to match the param statement.
For example, define a statement ".param VDD=9", then use the variable as the value in the supply voltage source AND in the component property, VDD={VDD}.
This way to globally change the supply voltage you would simply change the ".pram VDD=9" to ".param VDD=12", for example, and now all devices would inherit the new voltage.

At any rate, the CD4000.lib library is ok to use when there are one or two CD4000 devices in use, but the CD4000_v.lib library is by far the easiest to use.
Hope this helps...

eT
 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
17,498
Yes, and I've been using that. Thanks again.

I'm using cd4000_v.lib, and I've attached the Vdd label to the positive rail of my circuit, 9.1V. This step made a big difference! But my 4017 produces outputs at ~6V.

Just now I tried adding the ".param VDD=9" statement and I also tried editing the properties of the 4017, changing SpiceLine from "VDD=5 SPEED=1.0 TRIPDT=5e-9" to "VDD=9 SPEED=1.0 TRIPDT=5e-9".

These changes seem to make no difference. The SpiceLine edit seems to disappear also, and it reverts back to Vdd=5.
 

eetech00

Joined Jun 8, 2013
3,956
Yes, and I've been using that. Thanks again.

I'm using cd4000_v.lib, and I've attached the Vdd label to the positive rail of my circuit, 9.1V. This step made a big difference! But my 4017 produces outputs at ~6V.

Just now I tried adding the ".param VDD=9" statement and I also tried editing the properties of the 4017, changing SpiceLine from "VDD=5 SPEED=1.0 TRIPDT=5e-9" to "VDD=9 SPEED=1.0 TRIPDT=5e-9".

These changes seem to make no difference. The SpiceLine edit seems to disappear also, and it reverts back to Vdd=5.
Hi wayneh,

That should have worked.

There should also, by default, be "VDD 0" in the "spicemodel" attribute field of the device component properties.
That's "VDD, a space, and the number zero" without the quotes.
This is the attribute value that actually makes the global assignment work.

Post your .asc schematic file and we'll check it...

eT
 

wayneh

Joined Sep 9, 2010
17,498
Ah, yes, you're exactly right. I speculated that back in #10 but forgot to check it in my own simulation.
If I take the current limiting resistor to 10K instead of 1K, I get the full 9V output.

So all I needed to do, using the CD4000_v.lib library, was to apply the Vdd label to the positive rail of the supply. Done.
 

eetech00

Joined Jun 8, 2013
3,956
It's just to much current for it. It will drop 1/2 volt at only 1 ma.
Yup...CD4017 can't drive that much current.

Also the include statement reads:

.include CD4000_v.lib.txt

Which is ok as long as the filename really ends with ".lib.txt".
Otherwise, I'd rename it to CD4000_v.lib and change the include statement.

eT
 

wayneh

Joined Sep 9, 2010
17,498
Otherwise, I'd rename it to CD4000_v.lib and change the include statement.
In OS X on a Mac, leaving the .txt extension on it makes sure it opens in TextEdit, the default text editor, when double-clicked. I left it that way so I could snoop around inside to see what was there. I should change it back as you recommend and I certainly will if/when I post this again as part of a finished project.
 

ericgibbs

Joined Jan 29, 2010
18,862

Attachments

Top