¿ªÔÆÌåÓý


Re: CD4000 test

 

Gentlemen, those CD4x and 74HC libraries have two required values that appear on a symbol's SpiceModel line.
ctrl-right-click a logic symbol to alter its SpiceModel line.
By default the two values are the nodes "VDD" and "0".
Creating a 12V power supply for CD4x logic and naming its output node VDD works out-of-the-box.
But assume for example, you already have a V-24 node and a V-12 node that could power the logic.
Change the logic symbol's default SpiceModel value from "VDD 0" to "V-12 V-24".
This sets logic outputs to be V(V-12)=logic-high and V(V-24)=logic-low, instead of VDD/0.
?
In either case the difference across the power pins is 12 volts, -12 to -24 volts or 12 to 0 volts has the same 12 volt difference.
To power the internal logic from 12 volts, change the symbol's default SpiceLine (not SpiceModel) value from VDD=5 to VDD=12.
The SpiceLine VDD=x value sets the model's power-pin voltage and can be anything like VDD=2.3 or 3.5, 6, 12 etc...
The three SpiceLine values control functions within the logic like, prop-delay, output drive, slew rate, etc...
The SpiceLine SPEED=1.0 and TRIPDT=5e-9 are defaulted for the logic family.
?
Changing the VDD=x value affects the speed of a given device. (i.e. CD4x is much faster at 15V than it is at 5V)
The SpiceLine SPEED=1.0 value is relative.
To model CD4x-like logic at 12 volts that is 10 times faster than normal CD4x logic, change the SpiceLine SPEED=1.0 value to SPEED=10.
?
All for now
?

Sent:?Wednesday, April 02, 2025 at 12:52 PM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:[email protected]
Subject:?Re: [LTspice] CD4000 test
On Wed, Apr 2, 2025 at 12:38 PM, DerekK wrote:
As for the circuit, I played some more but cannot get the output of the CD4013B to change. Both Q and Q* are staying at zero on the first stage when I am running a clock on the input. I even played with changing values of SET and RST with no change in the output. Something should be moving.
Your voltage source V2 drives node VDD1.? ?That? should be node VDD.? ?These CD4000 models require a power node named "VDD".
?
Andy
?


Switching Speed of a BJT

 

Hello,
My question is multiple:
1. What are the influential spice parameters that optimize the switching speed?
To my knowledge, it's mainly Bf that seems to be the most important for increasing the switching speed, which I vary like this:
.step param X LIST 100 150 200 250 300
.model myModel AKO: 2N2222 NPN (Bf={X})
2. What measurement (equation) can be used to measure the speed?
3. What circuit should I use to compare the switching speed results as a function of the influential parameter?


Re: CD4000 test

 

¿ªÔÆÌåÓý

Those messages are not significant LTspice error messages. They are probably due to over-keen syntax checks that were introduced in some 24.1.x versions of LTspice. I don't see them in my .LOG file, which is not a surprise, because they include a path that only exists on your computer. Which version of LTspice are you using?

I can't see why you can't probe the circuit, of course, but you can't probe pins that have no wire attached. Can you plot the voltage on the wire connected to Qbar of U2, for example?

On 2025-04-02 16:20, DerekK wrote:
At the end of the log file I get the following and cannot probe the circuit. I know it is a short run-time circuit. It is a portion of a larger one, and I have not played with the digital stuff before.
----------------------------
T:\Other drawings\XM27 gun\41897800 Elec Sys Assy\41897801 Ctl Box\41897802 Control box\41897817 K3 Relay assy\A154\simulation\cd4000_v.lib(91): syntax error
.param td1=1e-9*(400-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
T:\Other drawings\XM27 gun\41897800 Elec Sys Assy\41897801 Ctl Box\41897802 Control box\41897817 K3 Relay assy\A154\simulation\cd4000_v.lib(92): Expected ")" here.
.param td2=1e-9*(250-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
T:\Other drawings\XM27 gun\41897800 Elec Sys Assy\41897801 Ctl Box\41897802 Control box\41897817 K3 Relay assy\A154\simulation\cd4000_v.lib(92): syntax error
.param td2=1e-9*(250-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
T:\Other drawings\XM27 gun\41897800 Elec Sys Assy\41897801 Ctl Box\41897802 Control box\41897817 K3 Relay assy\A154\simulation\cd4000_v.lib(93): Expected ")" here.
.param td4=1e-9*(130-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
T:\Other drawings\XM27 gun\41897800 Elec Sys Assy\41897801 Ctl Box\41897802 Control box\41897817 K3 Relay assy\A154\simulation\cd4000_v.lib(93): syntax error
.param td4=1e-9*(130-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


Re: CD4000 test

 

It was the VDD1 that was the final issue. Now things are moving correctly. Thanks all for the support.


Re: CD4000 test

 

Derek,
?
I am curious whether there is a purpose to the 0.001 uF capacitor (C1) on the Q output of the last CD4013, U4?
?
Also, I assume you know node RST is floating, in the simulations you uploaded.
?
Andy
?


Re: CD4000 test

 

Also, the parameter name in the top-level schematic should be "VDD", not "VDD1".? And the parameter "Speed1" on the top-level schematic should have been named "Speed", but it was set to the default value anyway so it would not have done anything.
?
I don't know how that was changed, or why you changed it.? If I remember correctly, those CD4000 models use names such as "VDD1" internally, but the top-level names must be without the "1" added.? The library file passes the value from VDD to VDD1.
?
Andy
?
?


Re: CD4000 test

 

On Wed, Apr 2, 2025 at 12:38 PM, DerekK wrote:
As for the circuit, I played some more but cannot get the output of the CD4013B to change. Both Q and Q* are staying at zero on the first stage when I am running a clock on the input. I even played with changing values of SET and RST with no change in the output. Something should be moving.
Your voltage source V2 drives node VDD1.? ?That? should be node VDD.? ?These CD4000 models require a power node named "VDD".
?
Andy
?


Re: CD4000 test

 

OK, found the proper lib as well. Had to sort by date. We should get rid of the old stuff so that others do not download items in error.
?
As for the circuit, I played some more but cannot get the output of the CD4013B to change. Both Q and Q* are staying at zero on the first stage when I am running a clock on the input. I even played with changing values of SET and RST with no change in the output. Something should be moving.
?
Uploaded as CD_test.v3.zip. I have the .lib, .asy, .asc and .plt file included.
?


Re: CD4000 test

 

¿ªÔÆÌåÓý

On 02/04/2025 17:47, DerekK wrote:
Found it!!! It actually was an error in the .lib file. There are a few instances of "(vdd1" which should have a different bracket: "{vdd1". Now it runs. And this was from the recent download suggested.
This precise error came up here recently.The fact that you got an error shows you must be running LTspice V24.1.x. This "error" has been in the library since the beginning, but previous versions of LTspice didn't flag it and allowed it to proceed.

eetech00 uploaded a fixed library that you presumably didn't find: CD4000_v(65a).lib on Feb 21 2025.

--
Regards,
Tony


Re: CD4000 test

 

Derek,
?
Those errors depend on which version of LTspice you are using.
?
On older versions, there are no errors in the Error Log file.? It simulates "correctly" and produces the right waveforms - though you really need for the simulation time to be longer to see more action.? There are several status messages and a few warnings, but none of them are errors.
?
The error messages that you saw are the result of using the latest LTspice versions (v24.1.*) which are quite a bit more picky about syntax, than all prior versions were.? This might be considered one case where having the newest LTspice version is not to your advantage - although that is debatable.? In fact, there probably were mistakes in the library file, which had gone undetected for several years.
?
Andy
?
?


Re: CD4000 test

 

Found it!!! It actually was an error in the .lib file. There are a few instances of "(vdd1" which should have a different bracket: "{vdd1". Now it runs. And this was from the recent download suggested.


Re: CD4000 test

 

At the end of the log file I get the following and cannot probe the circuit. I know it is a short run-time circuit. It is a portion of a larger one, and I have not played with the digital stuff before.
----------------------------
C:\Users\derek\Desktop\New folder\cd4000_v.lib(91): syntax error
.param td1=1e-9*(400-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
C:\Users\derek\Desktop\New folder\cd4000_v.lib(92): Expected ")" here.
.param td2=1e-9*(250-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
C:\Users\derek\Desktop\New folder\cd4000_v.lib(92): syntax error
.param td2=1e-9*(250-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
C:\Users\derek\Desktop\New folder\cd4000_v.lib(93): Expected ")" here.
.param td4=1e-9*(130-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
C:\Users\derek\Desktop\New folder\cd4000_v.lib(93): syntax error
.param td4=1e-9*(130-40-10)*5.0/(vdd1}*{speed1}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^^^^^^^^^^
?


Re: CD4000 test

 

¿ªÔÆÌåÓý

You uploaded the .LIB file twice, instead of the .LOG file, but there was no need anyway, we can run the sim to get the .LOG file. The sim runs OK (but does it do what you want? It seems to be a short time sim.), and those Warnings in the .LOG can be disregarded: the nodes probably connect to current sources, which have infinite impedance, so don't register as connected.

On 2025-04-02 15:31, DerekK wrote:
Andy,
I updated the symbol from the suggested source. Deleted the old symbol and placed the new one. Restarted LTSpice. Still getting errors. I re-uploaded the CD_test.zip file. This time I included the log file which shows the error.
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


Re: CD4000 test

 

Andy,
I updated the symbol from the suggested source. Deleted the old symbol and placed the new one. Restarted LTSpice. Still getting errors. I re-uploaded the CD_test.zip file. This time I included the log file which shows the error.


Re: creating PNP caracteristicsby sweeping plot in LTspice from a circuit I built

 

¿ªÔÆÌåÓý

On 02/04/2025 13:59, john23 via groups.io wrote:
Hello Andy,I have taken your circuit and changed the current source into voltage source ,also Imade the voltage potential the same way put the voltage source in the collector.
I got a very close plot to what you got but the slope of the active mode is much higher.
Why is my slope shown in the attached photo much higher with respect to what you done?
You circuit is completely messed up. If you wanted to reproduce Andy's plot, why didn't you use his circuit? To get the characteristic in a datasheet, you need to exactly use the conditions quoted in the datasheet. Don't introduce spurious resistors that are not in the test circuit that the manufacturers used.

Please check: PNP_OP_Chacteristic.zip

--
Regards,
Tony


Re: creating PNP caracteristicsby sweeping plot in LTspice from a circuit I built

 

This might help answer your question:
?
Why is my slope shown in the attached photo much higher with respect to what you done?
The slope is greater because of V1 and R2.? ?As the voltage from V1 increases, Vc increases almost the same because the transistor is in saturation.? Ohm's law applied to R2 gives you the slope.
?
Andy
?


Re: creating PNP caracteristicsby sweeping plot in LTspice from a circuit I built

 

On Wed, Apr 2, 2025 at 07:59 AM, john23 wrote:
Hello Andy,I have taken your circuit and changed the current source into voltage source ,also Imade the voltage potential the same way put the voltage source in the collector.
Why do you want to modify the circuit?
?
What is the purpose of adding resistors, and changing the base drive from a stepped current source to a voltage that also depends on Vce?
?
I think you need to answer these questions before thinking about the results with your circuit.? For what purpose are you doing this?? Are you doing it just to ask annoying questions, or do you have an actual goal in mind?? Without that, your questions seem meaningless and without purpose.
?
I got a very close plot to what you got but the slope of the active mode is much higher.
Why is my slope shown in the attached photo much higher with respect to what you done?
Look at your circuit, and what you have done to it.
?
You added resistance to the transistor.? Resistance changes the slopes.
?
You applied the base drive between the base and ground, while simultaneously sweeping the emitter voltage.? Therefore, as the emitter voltage increases, the base-emitter voltage also increases (negatively), turning ON the transistor much much harder.? By the time V1 reaches 5 V, the base-emitter voltage in your circuit exceeds -1.6 V which means the transistor is being turned ON extremely hard.? The base current is unusually large for a small-signal transistor and it is fully saturated over most of the sweep range.
?
Your circuit makes no sense to me.? Please explain the function of your circuit.? Did you plan it, or did you arbitrarily connect some components?? Please help me understand why you did this.
?
Andy
?


Re: creating PNP caracteristicsby sweeping plot in LTspice from a circuit I built

 

Hello Andy,I have taken your circuit and changed the current source into voltage source ,also Imade the voltage potential the same way put the voltage source in the collector.
I got a very close plot to what you got but the slope of the active mode is much higher.
Why is my slope shown in the attached photo much higher with respect to what you done?
Thanks.


Re: CD4000 test

 

Here is your problem.? You either obtained a bad copy of your symbol file CD4013B.asy, or you (or someone in your group) modified it, and that's causing that error.
?
Download this file:?
Files > z_yahoo > Lib > Digital CD4000 > CD4000.zip
then either unzip it, or pull out just the one file (CD4013B.asy) that you need.? Use that instead of the symbol file you were using.? Depending on where you put your files, you might need to overwrite or delete the old file.
?
You might also need to delete the symbols from your schematic (Draft2.asc) and then add them back again.? There are some Attributes that are "sticky" and remain in the schematic even if the attribute in the symbol changes.? Deleting and re-adding the symbol takes care of that.
?
If this does not fix the problem, then ask again.? Your message said "errors" (plural) but did not say what they were.? So I am left wondering what error or errors you had.
?
Andy
?
?
?


Re: CD4000 test

 

On Tue, Apr 1, 2025 at 08:34 PM, DerekK wrote:
I am trying to work with the CD4000_v.lib and am getting errors when trying to run. Would someone provide me some guidance as to what is set up in error?
The error I get is:
Fatal Error: Could not open library file "CD4000.LIB"
That happens because the symbol cd4013b.asy attempts to load the library file CD4000.lib, whereas your simulation only has CD4000_v.lib.
?
Where exactly did that symbol file come from?? Did you download it from the same location (in our group's files) where the library files are?
?
Andy
?