diyAudio

diyAudio (http://www.diyaudio.com/forums/)
-   Software Tools (http://www.diyaudio.com/forums/software-tools/)
-   -   How can I do a 10 khz square wave with LtSpice ? (http://www.diyaudio.com/forums/software-tools/194024-how-can-i-do-10-khz-square-wave-ltspice.html)

tessier 4th August 2011 06:26 PM

How can I do a 10 khz square wave with LtSpice ?
 
Hi

How can I generate a 10 khz square wave with LtSpice ? (50 % duty cycle)

And how for a 31 khz square wave ?

Thanx

Paul

sawreyrw 4th August 2011 06:29 PM

Use a pulsed voltage source with the correct times. Note that Trise and Tfall should not be 0.

tessier 4th August 2011 06:41 PM

Hi

I don't know how to set the LtSpice pulsed voltage source for those frequency square waves.

Thanx

Paul

ingenieus 4th August 2011 06:53 PM

1 Attachment(s)
Add a voltage source to your circuit. Right click on it. A window like below should pop up. The values below gives a 10kHz square wave. Adjust for 31kHz.

tessier 4th August 2011 07:01 PM

Hi

Is it the Tperiod or the Ncycles that I have to adjust to get 31 khz ?

Thanx

Paul

Tekko 4th August 2011 07:07 PM

You can leave Ncycles alone since thats only how many cycles it'll give before it stops, leaving it blank will make a continous pulse train.

On Nperiod you put in the equivalent time for 31 kHz and Ton will be half of that value to define 50% duty cycle.

Rise and fall can be set to 1.

jaycee 4th August 2011 07:15 PM

Tperiod would be 1/31000.
Ton will be half that

You may do:
Ton = {0.5/<value in Hz>}
and
Tperiod = {1/<value in Hz>}

I would also use rise/fall times of 0.01u as this will give you a "perfect" square wave with no percievable rise/fall time.

tessier 4th August 2011 07:22 PM

Hi

So, to get 31 khz, I set Tperiod to 31u and Ton 15u ?

Thanx

Paul

jcx 4th August 2011 07:42 PM

1 Attachment(s)
for symmetry you need to set Ton = (1/2)*(1/f) - t_rise

use curly brackets, .param to save typing

Pano 4th August 2011 07:51 PM

:cop: Moved to Software forum


All times are GMT. The time now is 01:14 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