¿ªÔÆÌåÓý

Date

anybody good at hacking transistor .model directives?

rainbowsally
 

This file:
RS/my-circuits/lp339_lp2901.asc
found here


Is a schematic from TI but the default transistors (copied from the examples/Educational/NE555.asc file couldn't pull the output up so I cut and jumpered one transistor to Vcc.

I messed with the few parameters to attempt to model a smaller transistor geometry but that didn't work.

Anyway, the schematic is accurate and interesting, but there may be one error in it and if anyone can correct that without monkeying with the current sources, it would be much appreciated.

Thanks.


Re: trying to recreate a LTspice simulation

 

Thanks. I ran the simulation a few times times over the weekend, and I got more questions...

1) Why was the carrier signal set as 1 megahertz? That's not in the AM band.

2) Looking at the Transient Response

Looking at the output of the Darlington Pair at the collector of Q2, it seems it clipped the top half of the modulated signal. How did that happen? With a VDC of 9v there should be plenty of head room for the signal to swing up?

3) On the more fundamental level¡­ why Darlington pair? That is, why do we need to have a current gain at this stage?

4) How does the Q3, a Common Emitter with a feedback, work as a demodulator?

5) Looking at the AC response.
Following what I observed from the transient response, somehow I was expecting to see a filtered out frequency response of only the audio signal at the output. Yet, it look like whatever resonant frequency between L and C and antenna is carried over to Q3 output and didn't get filtered out. Can someone explain what is going on here?

--- In LTspice@..., John Woodgate <jmw@...> wrote:

In message <k0mi3j+n1fs@...>, dated Fri, 17 Aug 2012, tomshong
<tomshong@...> writes:

3) not sure if this is the right forum to ask the question on radio.
Can someone explain to me how the RF signal is slowing down from AM to
audio band? I am used to seeing receiver circuits with mixers. Looking
at the way the circuit is, I see a Darlington pair, and a Common
Emitter amplifier that looks like double as a demodulator.
It isn't a question of 'slowing down'. The amplitude of the RF signal
varies proportionally to the audio signal amplitude. When the RF signal
is **rectified** by Q3, either the positive part or the negative part
(depending on where you look in the circuit) is cut off. The 'envelope'
of the resulting signal is the audio signal, and the RF component is
filtered out.

Looking at the AC response of the Spice, it looks indeed there's no
slowing down of the input signal at the output.
In this circuit, the filtering is done by the headphones; they just
don't respond to RF.
--
OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
Instead of saying that the government is doing too little, too late or too
much, too early, say they've got is exactly right, thus throwing them into
total confusion.
John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK


Re: Bug in ltspice fourier/thd

 

--- In LTspice@..., rainbowsally <rainbowsally@...> wrote:

The .four or .fourier spice directive using the syntax in the docs does
not appear to work correctly.

When I create a net label named "OUT" and set the directive like so:
".fourier 1k v(out)"
ltspice says it can't find v(a) for the fourier analysis of THD. If I
then add a net label 'A' along side of 'OUT', it then computes the THD
correctly for node A but issues an error:

--> .fourier quantity "V(out)" not pressent in data.

If I remove the v(out) from the .fourier directive like so:
".fourier 1k"

It then works perfectly with the net label it appears to demand.

Either the docs are wrong or the program is broken.

Incidentally my third hack at kevin's amp at 100 W is Total Harmonic
Distortion: 0.052534% if we can believe that. But the components are not
final ones because I haven't yet looked at power issues with the ones used.

Also d/loaded texas instrument's tina. I like ltspice better though
tina is prettier and has a few features like 'temperature' testing that
are missing in ltspice. But tina apparently can't do THD calculations
at all.

To test THD for an amp the workaround in ltspice is as follows.

Add a spice directive (edit->text) ".four 1khz" (typically) and run the
transient analysis. Type 'ctrl-l' to view the log and scroll down to
the bottom of the fourier series to see the THD.

Works great! ...I think. Only checked one amp so far tho.

Hello,
I just tested the FOUR command. It has worked without problems.
I am sure you did something wrong in your schematic. I used
version 4.15s of LTspice.

.FOUR 1k V(OUT)

If you still have problems, then upload your schematic.
I will then check it.

Best regards,
Helmut


Bug in ltspice fourier/thd

rainbowsally
 

The .four or .fourier spice directive using the syntax in the docs does not appear to work correctly.

When I create a net label named "OUT" and set the directive like so:
".fourier 1k v(out)"
ltspice says it can't find v(a) for the fourier analysis of THD. If I then add a net label 'A' along side of 'OUT', it then computes the THD correctly for node A but issues an error:

--> .fourier quantity "V(out)" not pressent in data.

If I remove the v(out) from the .fourier directive like so:
".fourier 1k"

It then works perfectly with the net label it appears to demand.

Either the docs are wrong or the program is broken.

Incidentally my third hack at kevin's amp at 100 W is Total Harmonic Distortion: 0.052534% if we can believe that. But the components are not final ones because I haven't yet looked at power issues with the ones used.

Also d/loaded texas instrument's tina. I like ltspice better though tina is prettier and has a few features like 'temperature' testing that are missing in ltspice. But tina apparently can't do THD calculations at all.

To test THD for an amp the workaround in ltspice is as follows.

Add a spice directive (edit->text) ".four 1khz" (typically) and run the transient analysis. Type 'ctrl-l' to view the log and scroll down to the bottom of the fourier series to see the THD.

Works great! ...I think. Only checked one amp so far tho.


Re: Strange and unexpected behaviour during ac analysis with behavioural sources

 

--- In LTspice@..., "sawreyrw" <sawreyrw@...> wrote:



--- In LTspice@..., "legendary_earl_e_bird" <m-marcus@> wrote:

Hello everyone,

I have a problem with ac analysis of my circuit (can be found in Files > Temp > AC Analysis > TEC-Model.asc). The overall circuit consists of two separate circuits which are connected with each other by behaviourale sources. Transient analysis seems to work flawlessly as expected, however ac analysis doesn't unfortunately. My goal is to get the transfer function of this particular circuit with input being voltage (net name = V_input) and output being temperature (net name = T_h_TC).
To begin with I had tried the laborious way of manually determining the bode diagram by performing transient analysis at several frequencies (0.001 0.01 0.1 1)Hz with sinusoidal excitation. I then compared amplitudes and phases of input and output at each frequency to get the bode plots of my system. It works but the process takes up too much time...
All I want is to apply a ac sweep from 0.001 to 1 Hz on my system to see how the output responds, however, the output is steady with absolut no changes when doing so (as a matter of fact, there are no changes anywhere within the circuit). It seems as the output is not dependent on the input anymore when performing ac analysis and I was wondering for quite a while now why that is the case? I suspect that the behaviourale sources are the cause for this phenomenon as they connect input and output.
I was hoping an LTspice expert could help me with this issue?

Many thanks in advance already.
Hello,

.AC analysis is a small signal AC analysis. This means that the model is linearized at the DC operating point before the AC sweep is done. If you model contains BV sources of the form V=V(a)*V(b) and the DC value of either V(a) or V(b) is zero, the output of the small signal model will be zero. This is not a problem with SPICE; it is the way the math works. Your i(R_m1) terms are probably causing the result you are getting.

Rick
Hello Rick,
Thanks for pointing to the mistake.
I have uploaded the same circuit using an additional V-source
to solve the problem. It's common in SPICE to use a V-source
with 0V for current measurement.

Files > Temp > TEC-Model1.asc

Best regards,
Helmut


Recommended alternate electronics group (was Re: Re: Kevin -- Tip: a cheap full load resistor)

 

As an alternative electronics group for discussion of all things audio,
head over to www.diyaudio.com. You can bat around ideas with Nelson
Pass, Bob Cordell, John Curl and many other notable audio designers.
Spice simulation is tolerated there as well but most believe in actually
building the circuit and measuring it.

I can understand what you're saying, but not why you are quoting me.


Vlad


Re: application upgrade

 

Does the company LT spice intends to make upgrade on LTSpice to improve useability?
In case it wasn't clear already ...

This forum is essentially a user's group, a collection of LTspice
users. It is not run by Linear Technology Corporation (LTC)
(www.linear.com), and is not even moderated by them. Yes there is at
least one employee of Linear who visits here often, but he (Mike) is
not a moderator here. We are LTspice users, not LTspice program
developers.

I think the person to direct this question to, is Mike; and/or the
management of Linear Technology, the company behind LTspice. The
other 38,000 people here don't work for Linear and have no direct say
in the program's development.

However, my personal view is that LTspice is, and has continually been
improved. and I expect that this trend will likely continue. But I
don't speak for the management of LTC.

If you don't think LTspice has improved over the years, then you may
have a very narrow view of what features it needs, only to suit your
specific requirements. LTspice has a wide user base and its features
have expanded to meet the needs of that user base. It handles
3rd-party SPICE models (non-Linear Tech products) very well and I
would guess that the vast majority of users are using it with
3rd-party models. (Yes there are exceptions; encrypted HSpice models
are an example of that.) I would not expect LTspice to ship complete
with non-LTC SPICE models built-in to the program or in its libraries.

Are you looking for a statement from their Board of Directors, saying
that they intend to continue development of and improvements to the
program?

Andy


Re: Recommended alternate electronics group (was Re: Re: Kevin -- Tip: a cheap full load resistor)

 

As an alternative electronics group for discussion of all things audio,
head over to www.diyaudio.com. You can bat around ideas with Nelson
Pass, Bob Cordell, John Curl and many other notable audio designers.
Spice simulation is tolerated there as well but most believe in actually
building the circuit and measuring it.

On 8/26/2012 2:59 PM, imbvlad wrote:

You can either have quality, or quantity. It would be a shame to give
up the quality this group has, especially after preserving it for such
long (and, hopefully, for even longer).

Vlad


Re: Strange and unexpected behaviour during ac analysis with behavioural sources

 

--- In LTspice@..., "legendary_earl_e_bird" <m-marcus@...> wrote:

Hello everyone,

I have a problem with ac analysis of my circuit (can be found in Files > Temp > AC Analysis > TEC-Model.asc). The overall circuit consists of two separate circuits which are connected with each other by behaviourale sources. Transient analysis seems to work flawlessly as expected, however ac analysis doesn't unfortunately. My goal is to get the transfer function of this particular circuit with input being voltage (net name = V_input) and output being temperature (net name = T_h_TC).
To begin with I had tried the laborious way of manually determining the bode diagram by performing transient analysis at several frequencies (0.001 0.01 0.1 1)Hz with sinusoidal excitation. I then compared amplitudes and phases of input and output at each frequency to get the bode plots of my system. It works but the process takes up too much time...
All I want is to apply a ac sweep from 0.001 to 1 Hz on my system to see how the output responds, however, the output is steady with absolut no changes when doing so (as a matter of fact, there are no changes anywhere within the circuit). It seems as the output is not dependent on the input anymore when performing ac analysis and I was wondering for quite a while now why that is the case? I suspect that the behaviourale sources are the cause for this phenomenon as they connect input and output.
I was hoping an LTspice expert could help me with this issue?

Many thanks in advance already.
Hello,

.AC analysis is a small signal AC analysis. This means that the model is linearized at the DC operating point before the AC sweep is done. If you model contains BV sources of the form V=V(a)*V(b) and the DC value of either V(a) or V(b) is zero, the output of the small signal model will be zero. This is not a problem with SPICE; it is the way the math works. Your i(R_m1) terms are probably causing the result you are getting.

Rick


Strange and unexpected behaviour during ac analysis with behavioural sources

 

Hello everyone,

I have a problem with ac analysis of my circuit (can be found in Files > Temp > AC Analysis > TEC-Model.asc). The overall circuit consists of two separate circuits which are connected with each other by behaviourale sources. Transient analysis seems to work flawlessly as expected, however ac analysis doesn't unfortunately. My goal is to get the transfer function of this particular circuit with input being voltage (net name = V_input) and output being temperature (net name = T_h_TC).
To begin with I had tried the laborious way of manually determining the bode diagram by performing transient analysis at several frequencies (0.001 0.01 0.1 1)Hz with sinusoidal excitation. I then compared amplitudes and phases of input and output at each frequency to get the bode plots of my system. It works but the process takes up too much time...
All I want is to apply a ac sweep from 0.001 to 1 Hz on my system to see how the output responds, however, the output is steady with absolut no changes when doing so (as a matter of fact, there are no changes anywhere within the circuit). It seems as the output is not dependent on the input anymore when performing ac analysis and I was wondering for quite a while now why that is the case? I suspect that the behaviourale sources are the cause for this phenomenon as they connect input and output.
I was hoping an LTspice expert could help me with this issue?

Many thanks in advance already.


OT: Yahoo Problems Re: List Addresses Hacked

 

--- In LTspice@..., "ciidcao@..." <ciidcao@...> wrote:

got 300+ emails for two days...
As few as that:-)

--- In LTspice@..., "jtanalog" <ltlist@> wrote:

I don't know if the LTspice List has been hacked but I'm suddenly barraged with spam, like ~100 E-mails per day... sent to an address I use only for LTspice. So I changed my address. (Easy for me, I maintain ~200 different E-mail addresses just to cope with such situations :-)
Seriously I note from the Yahoo Group Managers Forum



(you can all drop by, the messages are open to any one to read)

that recent Yahoo problems whereby many folks could not post, upload photos, or add members to groups by the web interface have been have been attributed to flaws with its "defensive" software that I guess, stops among other things "spam submissions", "guessing on passwords" and "bot networks" from creating dummy ids, making multiple postings and harvesting e-mails etc.

Perhaps another side effect was that in order to fix the problems they had to lower the defenses for a while hence the bursts of spam.

Dave
G4UGM

PS If any one thinks this is a fairy story, then I'll happily discuss off list. From time to time I have to look at the fire wall logs for a small UK town council. (My employer). If we are deemed worthy of attack I can't conceive the onslaught that must be thrown at Yahoo.


Re: application upgrade

John Woodgate
 

In message <k1f6b3+f6lm@...>, dated Mon, 27 Aug 2012, Richard <riscy00@...> writes:

###Sorry I should make myself clear, I was referring to independent Y-axis scale of 2,3,4 type, ie one y-axis -1V to +1V and other y-axis -50V to +10V and so on. When doing noise/interference analysis, one axis show uV scale while the PSU O/P with ripple on V scale.
You can use waveform arithmetic to do that. To plot a microvolt value Vu with tens-of-volt values, click on 'Vu' at the top of the plot and enter 'Vu*1E7' in the dialogue box.
--
OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
Instead of saying that the government is doing too little, too late or too
much, too early, say they've got is exactly right, thus throwing them into
total confusion.
John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK


Re: application upgrade

 

Sorry I was referring to independent Y-axis scale link to the waveform. The current arrangement is too limited.

--- In LTspice@..., John Woodgate <jmw@...> wrote:

In message <k1d6qc+gecf@...>, dated Sun, 26 Aug 2012, Helmut
<helmutsennewald@...> writes:

For example dual or 4 y axis scale for different readout.
LTspice a feature named "Plot Panes" and automatically plots more
vertical scales if you plot items with different units. Are you aware
of that?
You can have ONE plot with a Y-axis on the left and another on the right
in certain cases, such as AC sweeps, and if you plot a current and a
voltage simultaneously.
--
OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
Instead of saying that the government is doing too little, too late or too
much, too early, say they've got is exactly right, thus throwing them into
total confusion.
John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK


Re: application upgrade

 

Hi Helmut thank for the reply, it is much appericated.

One thing I found in LTSpice is the documentation, I was reading about .measure feature which is very difficult to understand them until I went to LTSpice forum which point to example which make sense this way, then I look back to document and sorry it did not work out.

My comment under ###

--- In LTspice@..., "Helmut" <helmutsennewald@...> wrote:



--- In LTspice@..., "Richard" <riscy00@> wrote:

I was curious if there is any prospect or plan for upgrade to,
enchance LTspice or are u being restricted by LTC company.
Hello Riscy,

LTspice is SPICE. You can use any SPICE model from any
component vendor.
Why do you think it's restricted?
### I do not say Spice is restricted but feature of the LTSPice appears to be restricted because LTC, I fear only interest in supporting their products and model.


I do not see much upgrade for some time now but it is very bug
free.
I am sure Mike will add new features in the future.
### I'm not convinced. There are several features that could be upgraded by obvious demands, but it has it not for a while. I would be nice to see what Mike plan for upgrade on LTSpice.


For example dual or 4 y axis scale for different readout.
LTspice a feature named "Plot Panes" and automatically plots
more vertical scales if you plot items with different units.
Are you aware of that?
###Sorry I should make myself clear, I was referring to independent Y-axis scale of 2,3,4 type, ie one y-axis -1V to +1V and other y-axis -50V to +10V and so on. When doing noise/interference analysis, one axis show uV scale while the PSU O/P with ripple on V scale.


Direct waveform measurement like scope.
I don't expect such features like scope measurements.
### It would be good feature in any cases, it more direct than .measure.


Wizard to implement models so we can implement generic
symbol with 3rd vendor.
Some help to create a symbol is already implemented.
### Please advise, maybe I missed that.


Customized short cuts keys
They are already implemented.

Control Panel -> Drafting Options
Control Panel -> Waveforms
### thanks.


Wizard to support measure feature.
OK, it's not implemented. I think this could be very helpful.
Maybe you or somebody will write one in the future.
I'm not employee of the LTC, and it does not support 3rd party extension implementation. Maybe it would be good thing to have for community to write their own feature.


Link to forums example library and discussion
Links to the Internet are always a problem.
I recommend to search in all_files.htm of this group.
### Okay np.


We happy to pay for premium release for DIY user.
Ie lower price than pspice.
Tux
Riscy
I prefer to have only one version, the free one.
You can pay money if you like. Somebody offers an
optimizer (49$?).
### What this?, link if you please?


If you have wishes for new features in LTspice, you should
send them to Mike, the author of LTspice. His address is
the email address given in the Help -> About.

Best regards,
Helmut
### I send this copy to mike, once again thank for forum.


Re: application upgrade

 

I wish to thank as well to Helmut.
Does the company LT spice intends to make upgrade on LTSpice to improve useability?

--- In LTspice@..., "Heinz-W. Schockenbaum" <schockenbaum@...> wrote:



--- In LTspice@..., "Richard" <riscy00@> wrote:

I was curious if there is any prospect or plan for upgrade to, enchance LTspice or are u being restricted by ltc company.
LTspice is made by the company LT. So mainly it uses LT parts. And i's free.
But as LTspice is compatible with Spice, mostly you may use models developed for Spice. (and there are many) to be contrary to Hpice or Tina.

Btw Tina by TI is also free, but i think more restricted to TI parts as LTspice to lt parts.

Mike Engelhardt is the creator of LTspice and is an employee of LT. From the grapewine: An extended version of LTspice is internally used to develop new LT IC's

Helmut Sennewald, moderator of this group, is a german and not related or paid in any way by LT.
Btw: Thank you Helmut for your patience and time. Maybe we meet personally on one of next europe tour of Mike.

hws


Re: List Addresses Hacked

 

got 300+ emails for two days...

--- In LTspice@..., "jtanalog" <ltlist@...> wrote:

I don't know if the LTspice List has been hacked but I'm suddenly barraged with spam, like ~100 E-mails per day... sent to an address I use only for LTspice. So I changed my address. (Easy for me, I maintain ~200 different E-mail addresses just to cope with such situations :-)


Re: List Addresses Hacked

 

I'm not getting ANY since I changed my E-mail address >:-}


Re: Differential Filter Simulation Help Needed

 

Thanks for the suggestion, I will try this too.

--- In LTspice@..., "RobertTalty" <rtalty@...> wrote:



--- In LTspice@..., alex bukac <velkypivo@> wrote:

Can anyone help me please with simulating passive first differential low pass (R-C-R) or high pass (C-R-C) filter?
?
How do I create differential source for the filter to make this work ?


[Non-text portions of this message have been removed]
The easiest way is to use a transformer with three windings. and coupling set to ONE. The secondary of the transformer has two windings where the center tap is set at the input bias level of the differential circuit (if not AC coupled). The primary has one winding and the input is a typical voltage or current source. (note you may need to add some small series resistance to the primary)

The spice element equivalent of this is a Voltage controlled Current Source where the output has two series load resistors. the resistor mid point is biased at the correct Common mode input voltage for the differential filter.

-Robert


Re: got a "analysis timestep too small" when running transient analysis

 

--- In LTspice@..., "tomshong" <tomshong@...> wrote:

Hi experts,

I am relatively new to LTspice, so I am trying to practice using it by checking a portion of the circuits from an existing design.

I connected up the circuit as listed as far as I can tell, but when I tried run it I got a "analysis timestep too small" error message.

Can someone take a look at how I wired it up and tell me what I did wrong?

Both the schematic (I only wired up the DFF portion on the top right corner) and my Spice file can be found here:



Thanks.

Tom
Tom,

The fundamental problem you have is that the propagation delay of the FF is zero. A simple solution is to add Td=5n to the value field of the FF in the Component Attribute Editor. Put your cursor over the FF and click right to get the editor. You could also specify other dynamics for the FF; see the help file on Special Functions. Also the default logic levels are 0 and 1 volt. Again, these can be changed.

Another problem is with your signal source. As specified it swings from -2.5 to 7.5 volts. Also M means milli; use meg to get mega Hz.

Rick


Re: got a "analysis timestep too small" when running transient analysis

 

--- In LTspice@..., "tomshong" <tomshong@...> wrote:

Hi experts,

I am relatively new to LTspice, so I am trying to practice using it by checking a portion of the circuits from an existing design.

I connected up the circuit as listed as far as I can tell, but when I tried run it I got a "analysis timestep too small" error message.

Can someone take a look at how I wired it up and tell me what I did wrong?

Both the schematic (I only wired up the DFF portion on the top right corner) and my Spice file can be found here:



Thanks.

Tom
Hello Tom,

Flipflops require at least a delay or a rise time, Td=5n.
I have also added an high level of 5V, Vhigh=5.
You can enter these values, if you right-mouse-click on a
flipflop.

SpiceLine:Td=5n
SpiceLine2:Vhigh=5

I have "repaired" your circuit (DFF_excercise1.asc).
All files are now in the Temp-folder.

Files > Temp > tomshong > DFF_excercise1.asc



You can learn more about the possible attributes for digital
devices from these examples.

Files > Tut > Digital A-Devices > DIGITAL_A_DEVICES_1.ASC

Files > Tut > Digital A-Devices > Initial_state_of_FF.asc



Best regards,
Helmut