¿ªÔÆÌåÓý

Date

fft and ltspice

 

ltspice group:

hi?

?suppose i have a sine wave and i sampled this wave for example with Matlab software? so? i have samples of this wave and i save them for example in a text file.

how can i do fft of these sample in ltspice( this work can be done easly in Matlab but i want do in ltspice) and how import the samples in ltspice?

thanks


Subcircuit in ASCII for HV9110

 

Hallo,


i want to creat a new symbol, but i need the subcircuit in ASCII. because i can't create the subcircuit myself.


best regards.


Evan


Re: Single supply VCO

 

Nekvstr,

The MODULATE FM input works just like a numerically controlled oscillator.? It increments the phase in an internal accumulator based on the instantaneous frequency at each time step. It then takes the sin(phase)*AM to produce the output.? This is not complicated nor mysterious.

Here is a simple netlist that implements the FM modulation equation without need of the MODULATE function.It modulates a 100kHz carrier with +/-10kHz deviation using a 1kHz modulating signal

* FM Simulation
B1 0 FM I=sin(2*pi*FC*time + 2*pi*DEVIATION*idt(i(r2)))
R1 FM 0 1
I1 0 modulation SINE(0 1 {MF} 5m)
R2 modulation 0 1
.param FC=100K
.param MF=1K
.param DEVIATION=10K
.tran 0 40mS 0 100n
.backanno
.end

Note that LTspice needs a "hint" to slow down the simulation by restricting the maximum time step so as to not skip ahead too much.? Otherwise the integrator idt() misses too much information.

??


Re: Cannot download IR2117_test.zip because of certificate error

 

From here (eastern USA), the downloads work every time (assuming I'm starting from the webpage and that the webpage was recently refreshed.? But I have had those problems from time to time (not for the last few weeks).? Several successful downloads of that file, today.

It appears that western USA is affected by this problem.

The URL starting with "" came from the error message.? It wasn't where he started.? He started by clicking on the "Files" tab on the group's website.

It's odd that the URL starting with "" was missing the VERY long stream of characters that they always have.

My suggestion is to keep trying.? Usually when this happens to me, it's temporary, and intermittent.? So it might fail 75% of the time and work the other 25%.? But occasionally it fails on 100% of tries.? Make sure to periodically refresh the webpage where you click on the file.

It MIGHT also depend on web browser (though I haven't seen any proof of this).? So, if you have another browser, try that too.

Regards,
Andy



Re: Single supply VCO

 

That's pretty much true.? There are a handful of (former) Linear Technology and Analog Devices employees here, but you're right that most of them don't know LTspice internals or its code.? However, Mike is still "here", though he visits here rarely (and pretty much in "write-only mode") so he is never going to see a question here directed at him.

Andy



Re: LTSpice Model for Photo Triac - VOM160

 

Eric asked, "How do I now permanently save the part that has already MOC3083 on it instead of? LED_TRIAC_ZCS, ..."

That's easy.? Edit the symbol and save it.? Open the symbol file in LTspice.? You can right-click on it when it's on your schematic, then click Open Symbol.? Then right-click on that text and change it.? It happens to be an Attribute of the symbol.? Then save the file.? If you want to, you could save it under a different filename, but then you'd probably want to edit your schematics too.

? ? "...?and what needs to be done?so I don't have to add the directive? ?.lib MOC308x.lib? everytime I use this part?"

There are ways to put the library filename into the symbol itself, but to be honest I don't remember them.? I think there is more than one way, but they come with side-effects which is one reason why I tend to avoid it.? If you read through the LTspice Help (remember that?) it lists at least one of them.? I think one of the consequences is that you can no longer open or edit the symbol from a schematic page.? Which might not be an issue for you.

Some of the symbol attributes work in unexpected ways.

Regards,
Andy



Re: Cannot download IR2117_test.zip because of certificate error

 

¿ªÔÆÌåÓý

Helmut,

? With respect he didn¡¯t click on the temporary URL what he said was

?

>????? ¡°I am trying to download the IR2117_test.zip file found under "Files"¡±

?

So It would appear to me that he has gone to the ¡°files¡± page and found ¡°IR2117_test.zip¡±

?

>???????? ¡°Clicking on the link takes me to website?¡±,

?

That is what happens. All the links on the files page re-direct to ¡°xa.yimg.com¡±

?

>????? ¡°This is what happens but I get error message?±··¡°Õ::·¡¸é¸é³å°ä·¡¸é°Õ³å´¡±«°Õ±á°¿¸é±õ°Õ³Û³å±õ±·³Õ´¡³¢±õ¶Ù¡±

?

His browser does not recognise the certificate on the re-directed link. He never clicked on it, he was re-directed there.

>??? Am I the only one that cannot access the download files under TAB Files?

To which my answer is still ¡°no¡±. It seems to happen from time to time.

?

Dave

?

?

From: LTspice@...
Sent: 22 November 2018 10:39
To: LTspice@...
Subject: RE: [LTspice] Cannot download IR2117_test.zip because of certificate error

?




Hello Dave,

?

Have you seen Tony's answer?

He tried with the wrong web-address?

One will get such temporay adresses with a right-mouse-click and "Copy link" on the filename in the Files section.

?

The corerct address is below.

IR2117_test.zip

?

Best regards,

Helmut





Re: Cannot download IR2117_test.zip because of certificate error

 

¿ªÔÆÌåÓý

Helmut,

?

Yes I have, but the problem is not related to the temporary nature of the link. What was reported was the error message from the web browser.

When you click on:-

?

?

and then on

?

IR2117_test.zip

?

It ALWAYS redirects to one of those temporary links. If there is an error the reported failed URL will be the temporary link to which you have been re-directed.

In this case it was a certificate error. If there is a certificate error then the failing URL will always be one of those links and that¡¯s what the browser will report.

You will NEVER get an error that shows the original URL. Re-visiting the links as per above usually hides the problem, I believe because ¡°xa.ying.com¡± ?is actually a load balanced cluster.

When you repeat the process you usually get a different server and it works.

?

Dave

?

From: LTspice@... <LTspice@...>
Sent: 22 November 2018 11:03
To: LTspice@...
Subject: RE: [LTspice] Cannot download IR2117_test.zip because of certificate error

?




Helmut wrote:

?

"Have you seen Tony's answer?"

?

Maybe not, because most of my messages don't seem to get relayed by email; they are only visible on Yahoo! groups site.

?

I use several different computers with different email clients, and I often find I don't receive quite a few messages - not just mine - by email. Sometimes I receive an answer to a question, but not the original question. I have to go to the Yahoo! site to see all the messages in a thread.


Perhaps it's because I access the Yahoo! groups with a non-Yahoo! email address? I don't know, but it used to work properly, years ago. Yahoo! is now just basically unreliable. If my business depended on Yahoo!, I would find a new provider.

?

Regards,

Tony





Re: Cannot download IR2117_test.zip because of certificate error

 

Helmut wrote:

"Have you seen Tony's answer?"

Maybe not, because most of my messages don't seem to get relayed by email; they are only visible on Yahoo! groups site.

I use several different computers with different email clients, and I often find I don't receive quite a few messages - not just mine - by email. Sometimes I receive an answer to a question, but not the original question. I have to go to the Yahoo! site to see all the messages in a thread.

Perhaps it's because I access the Yahoo! groups with a non-Yahoo! email address? I don't know, but it used to work properly, years ago. Yahoo! is now just basically unreliable. If my business depended on Yahoo!, I would find a new provider.

Regards,
Tony


Re: Cannot download IR2117_test.zip because of certificate error

 

Hello Dave,

Have you seen Tony's answer?
He tried with the wrong web-address?
One will get such temporay adresses with a right-mouse-click and "Copy link" on the filename in the Files section.

The corerct address is below.
IR2117_test.zip

Best regards,
Helmut


Re: Cannot download IR2117_test.zip because of certificate error

 

¿ªÔÆÌåÓý

Probably not the only person. The error says your PC does not trust the certificates on xa.yimg.com. I have seen several reports of this here and on other groups. The info you have given is not enough to know if the error is with the server which has an invalid certificate, or with your PC which is missing a root certificate, or if you are in a commercial environment and there is a proxy that¡¯s messing things up

?

E.g.

?

https://superuser.com/questions/1083766/how-do-i-deal-with-neterr-cert-authority-invalid-in-chrome

?

Hopefully clearing the browser cache and starting from the top of the files section will sort things out.

If not make sure your browser is up to date. It looks like you are using CHROME and chrome needs to be up to date for its certificate checking to work reliably¡­

Also note that xa.yming.com will actually be an array of load balanced servers so it could just be one has of the array has some issue. If so some times it will work and at other times it won¡¯t.

?

.. hope this helps..

?

?

Dave

G4UGM

?

?

?

?

?

?

On Nov 21, 2018, at 10:18 PM, vermaak.jj@... [LTspice] <LTspice@...> wrote:

?

?

I am trying to download the IR2117_test.zip file found under "Files"
Clicking on the link takes me to website?, but I get error message?NET::ERR_CERT_AUTHORITY_INVALID

Am I the only one that cannot access the download files under TAB Files?


?

?


Re: Cannot download IR2117_test.zip because of certificate error

 

vermaak.jj@... wrote:

"I am trying to download the IR2117_test.zip file found under "Files"
Clicking on the link takes me to website?, but I get error message?NET::ERR_CERT_AUTHORITY_INVALID

Am I the only one that cannot access the download files under TAB Files?"

That sounds a bit like paranoia... The URI you posted is incomplete, and in its entirety, is a transient URI valid for only a short time, and likely valid for only one user - this is a peculiarity of Yahoo! platform, and frequently causes consternation in this group.

The real URI for the file you seek is:

Clicking on this link will probably just take you to Files > Lib. Use Ctrl-F to find the file on that page, which is quite long.

I just checked it and the file you seek is there and downloadable.

Regards,
Tony


Re: Cannot download IR2117_test.zip because of certificate error

 

¿ªÔÆÌåÓý

I get ¡°Requested resource is not available¡± ?from Apple Safari browser.

Jim

James Wagner
Oregon Research Electronics




On Nov 21, 2018, at 10:18 PM, vermaak.jj@... [LTspice] <LTspice@...> wrote:


I am trying to download the IR2117_test.zip file found under "Files"
Clicking on the link takes me to website?, but I get error message?NET::ERR_CERT_AUTHORITY_INVALID

Am I the only one that cannot access the download files under TAB Files?






Re: Single supply VCO

 

Hello

Would you, please, reveal the math performed by the MODULATE block on the
"FM" input?
If I am wrong, I apologize, but not Helmut, nor anyone here, work at
LTspice or are affiliated with them. Therefore, asking to "reveal"
whatever LTspice thinks is not a request that anyone here can, or
could divulge.

--

Vlad
______________________
ltspicegoodies.ltwiki.org -- holding, among others:
a universal analog/digital filter, block-level models
for power electronics (and not only), math blocks
with a more stream-lined approach, some digital
ADC, DAC, (synchronous-)counter, JKflop, etc.


Re: LTSpice Model for Photo Triac - VOM160

 

Hi Andy,
Sorry for the incomplete upload. Learning woes I guess.
Actually the one modified from the original circuit ran. I think because I didn't delete any text that was on the original schematic.

While the fresh? made one? wouldn't and has the error. So I got puzzled again what was going on. I actually did step 2 before but still it wouldn't run. I did not do step 3. So now I do both and wallah it runs!

Please would like to request one more help. How do I now permanently save the part that has already MOC3083 on it instead of? LED_TRIAC_ZCS, and what needs to be done
so I don't have to add the directive? ?.lib MOC308x.lib? everytime I use this part?

Thanks and best regards,
Eric


On Thu, Nov 22, 2018 at 1:28 AM Andy ai.egrps@... [LTspice] <LTspice@...> wrote:
?

Eric wrote:

? ? "I uploaded both circuits so you can maybe is it okay you can take a look."

What you uploaded didn't include the symbol and library files.? We like to have all uploads be complete, so that they don't depend on other files elsewhere.

So I copied over the two files (LED_TRIAC_ZCS.asy and?MOC308x.lib) that I said you needed.

When I run "Heater-circuit-MOC3083_modified.asc", it won't run because that schematic tries to load "st_standard_snubberless_triacs_LTspice.lib" which isn't there either.? I don't think it's needed in that schematic, is it?? So then I copied that file over too, anyway.? Now when I run it, it runs without any errors.? Is this the one you said had an "Unknown subcircuit" error?

When I run "Heater-circuit-MOC3083-fresh drawn.asc" (after having added the symbol and library files), I get the error about "Unknown subcircuit".? The reason is because you forgot to do steps (2) and (3) that I described earlier.? The text immediately under the symbol needs to be changed to "MOC3083", and there must be the line to include the library file that has its subcircuit definition:

? ? .lib MOC308x.lib

Fix those two, then it should work.

Regards,
Andy



Re: LTSpice Model for Photo Triac - VOM160

 

Eric wrote:

? ? "I uploaded both circuits so you can maybe is it okay you can take a look."

What you uploaded didn't include the symbol and library files.? We like to have all uploads be complete, so that they don't depend on other files elsewhere.

So I copied over the two files (LED_TRIAC_ZCS.asy and?MOC308x.lib) that I said you needed.

When I run "Heater-circuit-MOC3083_modified.asc", it won't run because that schematic tries to load "st_standard_snubberless_triacs_LTspice.lib" which isn't there either.? I don't think it's needed in that schematic, is it?? So then I copied that file over too, anyway.? Now when I run it, it runs without any errors.? Is this the one you said had an "Unknown subcircuit" error?

When I run "Heater-circuit-MOC3083-fresh drawn.asc" (after having added the symbol and library files), I get the error about "Unknown subcircuit".? The reason is because you forgot to do steps (2) and (3) that I described earlier.? The text immediately under the symbol needs to be changed to "MOC3083", and there must be the line to include the library file that has its subcircuit definition:

? ? .lib MOC308x.lib

Fix those two, then it should work.

Regards,
Andy



Cannot download IR2117_test.zip because of certificate error

 

I am trying to download the IR2117_test.zip file found under "Files"
Clicking on the link takes me to website?, but I get error message?NET::ERR_CERT_AUTHORITY_INVALID

Am I the only one that cannot access the download files under TAB Files?




Re: LTSpice Model for Photo Triac - VOM160

 

Hi Eric,

If you run LTspice with the schematic that's inside the ZIP file, then that is the problem.? When you open something in a ZIP archive, Windows creates a temporary copy of JUST that one file, nothing else.? So none of the library and symbol files are there with it.? They are still in the ZIP file, but not in the temporary folder where Windows put the schematic file before sending it to LTspice.

You have to extract the contents of the ZIP file.? Then you can run it.? Running from a ZIP file works only if there are no other files involved.

(I don't think it matters, but I use a separate program for opening ZIP files on my PC.? I'm aware that MS-Windows itself can open ZIP files, but I don't let it do that.)

There is no need to move any files to other locations, not with this ZIP file.

? ? "By the way, the LTSpice XXVII program is on my C drive while I save all my trial schematics on my D drive. Is this an issue?"

Nope.

More later.

Regards,
Andy



Re: Single supply VCO

 

I completely agree with Helmut, that the MODULATE block works correctly.? It has whenever I have used it.

None of us knows the actual code.? Well, Panama Mike does.? But he is not likely to reveal it.

You can create your own FM modulator circuit (using a B source) with idt() to integrate the FM input voltage, and apply it to the phase of a sine wave, thus producing a correct frequency modulated signal.? The MODULATE block's output is the same.? Therefore I conclude that it PROBABLY also integrates the input voltage and adds it to the phase.

Why are you asking?

Andy



Re: LTSpice Model for Photo Triac - VOM160

 

Hi Andy,

I have LTSpice XVII which was just updated then. When I opened the zip file, I just clicked into the heater circuit schematic file? and it opened automatically in the LTSpice space.??
So I clicked Run but I remember it displayed something like MOC308x.lib can't be found. I didn't know what was going on and I thought you will also see the same thing when you open it.? Thus I posted it .
After reading your instructions, I loaded the .lib files to "sub" directory, and all symbols to the "sym" directory, and loaded the schematics to my drive D simulations file. Then on LTSpice space, I opened the saved
schematics and Run it. Wallah it ran:). By the way, the LTSpice XXVII program is on my C drive while I save all my trial schematics on my D drive. Is this an issue?

So now I tried to draw a simple fresh schematic using the newly loaded??LED_TRIAC_ZCS?part. It wouldn't run. It flagged this issue " Unknown subcircuit called in: xu2 n002 0 n003 0 led_triac_ZCS.

So I tried to copy the original heater schematic, paste it into a new schematic page in LTSpice space, then modify it to be exactly like my fresh circuit, it works. So I'm not sure where the problem is.?

I uploaded both circuits so you can maybe is it okay you can take a look. The description? is MOC3083 Trial Circuit Comparison.

Thanks and best regards,
Eric


On Wed, Nov 21, 2018 at 11:08 AM Eric Henares <eohenares@...> wrote:
Hi Andy,
Thank you very much for your very quick reply and taking your time to explain details. I will continue with this query after my personal errand.?
Best regards,
Eric

On Wed, Nov 21, 2018 at 12:41 AM Andy ai.egrps@... [LTspice] <LTspice@...> wrote:
?

Eric wrote:

? ? "I found the MOC308x phototriac circuit simulation (solved) from the htm files.? I tried to RUN it but it won't."

I downloaded it (it's the same file that was uploaded here around a month ago), extracted it, and it ran.? There were a bunch of "heightened def con" messages in the .log file, but those are not necessarily bad, and they don't indicate failure.

So, it always helps to tell us what didn't work.? Did your computer shut off, or burst into flames?? Was there an error message?? If there was, what was it?? Try to be specific.? Also tell us which version of LTspice you used: LTspice IV or LTspice XVII.

All I did was create a brand new folder, extract the contents of the ZIP file into that folder, open the .asc file in LTspice, and press RUN.? There was nothing else to do.? You didn't move any of the files anywhere else, did you?

Have you altered your LTspice settings?? You might have changed the settings in the Control Panel at some point.? If you think you might have done that, open the Control Panel (hammer icon), press "Reset to Default Values", and OK.? Then try running the simulation again.

? ? "How do I load this part into my library?"

I think you need only these two files:
? ? LED_TRIAC_ZCS..asy
? ? MOC308x.lib
You can either put them in the folder with the schematic(s) that will use them, or add them to LTspice's libraries.? I prefer the former, but you could do either.

To add them to LTspice's libraries, move or copy LED_TRIAC_ZCS.asy here:
? ? Documents\LTspiceXVII\lib\sym\
or to a subdirectory of it.? Move or copy MOC308x.lib here:
? ? Documents\LTspiceXVII\lib\sub\
(must be that folder, not a subdirectory of it).

If you leave both files in the folder with your schematic, you'll need to do one extra step when putting the symbol on a schematic.? Open the schematic file in LTspice (if it's new, make sure to save it so that its file is in the current folder).? Go to the Add Components menu.? At the top, there is a line for "Top Directory" with two choices.? One is LTspice's library; the other is the current directory.? Change it to the current directory.? Now the LED_TRIAC_ZCS symbol should be in the menu and can be selected.

Whichever method you used, follow these steps:

(1)? Add a LED_TRIAC_ZCS symbol to the schematic.
(2)? Right-click on the text LED_TRIAC_ZCS under the symbol, and change it to MOC3083.
(3)? Add this line as a SPICE Directive:

? ? .lib MOC308x.lib

I am not 100% certain that the above steps work, but I think they should be right.

Regards,
Andy