How can I do a 10 khz square wave with LtSpice ? - Page 2 - diyAudio
Go Back   Home > Forums > Design & Build > Software Tools

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

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
Old 4th August 2011, 10:51 PM   #11
tessier is offline tessier  Canada
diyAudio Member
 
Join Date: May 2008
Quote:
Originally Posted by jcx View Post
for symmetry you need to set Ton = (1/2)*(1/f) - t_rise

use curly brackets, .param to save typing
Hi

I've try your param but it was not work ok.

Can you show me a capture image of the LtSpice Fonctions window showing the pulse parameters.

Thanx

Paul

Last edited by tessier; 4th August 2011 at 10:55 PM.
  Reply With Quote
Old 4th August 2011, 11:03 PM   #12
jcx is online now jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
clik on the attachment thumbnail?

the line:

.param f = 31k, t_edge=1u

has to be entered in the <.op> tool pop up window (far right on toolbar)

the line:

PULSE(-1 1 0 {t_edge} {t_edge} {1/2/f-t_edge} {1/f})

is the "value" entry for the Vsource, usually entered in the dialog window but can be pasted in the pop up box when rt clking on the value

[edit: paste the line in a Vsouce "Value", then rt cik Vsource body, you will see filled in parameters in window]

add new named params to control additional sources, you can have f1 = 10k, f2 = 31k on the same schematic with the Vsources each using the appropriate parameter name

Last edited by jcx; 4th August 2011 at 11:32 PM.
  Reply With Quote
Old 4th August 2011, 11:08 PM   #13
tessier is offline tessier  Canada
diyAudio Member
 
Join Date: May 2008
Hi

I was meaning the LtSpice Fonctions window like the image I show here.

Thanx

Paul
Attached Images
File Type: jpg Capture.jpg (110.1 KB, 236 views)

Last edited by tessier; 4th August 2011 at 11:11 PM.
  Reply With Quote
Old 4th August 2011, 11:29 PM   #14
diyAudio Member
 
Join Date: Apr 2006
Location: Minnesota
tessier,

Can't you figure out the period of a 31 KHz square wave? If not, you have a lot of work to do before you will learn anything from LTspice.

Rick
  Reply With Quote
Old 4th August 2011, 11:48 PM   #15
jcx is online now jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
honest questions without pretense are/should be welcomed
  Reply With Quote
Old 4th August 2011, 11:58 PM   #16
tessier is offline tessier  Canada
diyAudio Member
 
Join Date: May 2008
Hi

The 31 khz square wave are working but it's all down on the negative side like you can see in my image.

I've only used Ltspice with sine wave in amps simulations.

Thanx

Paul
Attached Images
File Type: jpg Capture3.jpg (154.9 KB, 221 views)
File Type: jpg Capture2.jpg (161.0 KB, 216 views)

Last edited by tessier; 5th August 2011 at 12:06 AM.
  Reply With Quote
Old 5th August 2011, 02:47 AM   #17
diyAudio Member
 
Join Date: Apr 2006
Location: Minnesota
OK Paul, here's some useful information. The period of a 31 KHz square (or sine) wave is 1/31 KHz=3.226 us. So to make a 31 KHz square wave in LTspice set Tperiod=3.226us, trise=.01u, tfall=.01us, and Ton=1.6us.
  Reply With Quote
Old 5th August 2011, 02:50 AM   #18
diyAudio Member
 
Join Date: Apr 2006
Location: Minnesota
jcx,

You answer is way to complex for newbies, and not very useful.

Rick
  Reply With Quote
Old 5th August 2011, 03:33 AM   #19
diyAudio Member
 
Join Date: Apr 2007
Quote:
Originally Posted by sawreyrw View Post
OK Paul, here's some useful information. The period of a 31 KHz square (or sine) wave is 1/31 KHz=3.226 us. So to make a 31 KHz square wave in LTspice set Tperiod=3.226us, trise=.01u, tfall=.01us, and Ton=1.6us.
Hello sawreyrw

There is a small typo error.

1/31 KHz should give 32.26 us

Bye

Gaetan
  Reply With Quote
Old 5th August 2011, 03:35 AM   #20
jcx is online now jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
yes it shows some more advanced spice feautures, but I thought I was clear on how they can be copy/pasted from my post

learning how to get the Spice SW do the calculation seems worth the complication if you're using oddball frequencies with primes too big to count on fingers in their factorizations
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LTspice square wave and audio amp test maouna Solid State 2 11th December 2010 09:34 AM
Sine wave - Square & Triangle wave generator using Transistors / OP-Amps lineup Solid State 20 9th October 2006 12:15 AM
10 KHz Square wave output? mura Solid State 17 31st May 2005 12:19 AM


New To Site? Need Help?

All times are GMT. The time now is 10:50 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2