How can I do a 10 khz square wave with LtSpice ?
 User Name Stay logged in? Password
 Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read Search

 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
 4th August 2011, 07:26 PM #1 tessier   diyAudio Member   Join Date: May 2008 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
 4th August 2011, 07:29 PM #2 sawreyrw   diyAudio Member   Join Date: Apr 2006 Location: Minnesota Use a pulsed voltage source with the correct times. Note that Trise and Tfall should not be 0.
 4th August 2011, 07:41 PM #3 tessier   diyAudio Member   Join Date: May 2008 Hi I don't know how to set the LtSpice pulsed voltage source for those frequency square waves. Thanx Paul
ingenieus
diyAudio Member

Join Date: Apr 2011
Location: Pretoria
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.
Attached Images
 sq.jpeg (48.4 KB, 1448 views)

 4th August 2011, 08:01 PM #5 tessier   diyAudio Member   Join Date: May 2008 Hi Is it the Tperiod or the Ncycles that I have to adjust to get 31 khz ? Thanx Paul
 4th August 2011, 08:07 PM #6 Tekko Banned   Join Date: Jan 2005 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µ.
 4th August 2011, 08:15 PM #7 jaycee   diyAudio Member   Join Date: Apr 2004 Location: Norwich, UK Tperiod would be 1/31000. Ton will be half that You may do: Ton = {0.5/} and Tperiod = {1/} 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.
 4th August 2011, 08:22 PM #8 tessier   diyAudio Member   Join Date: May 2008 Hi So, to get 31 khz, I set Tperiod to 31u and Ton 15u ? Thanx Paul
jcx
diyAudio Member

Join Date: Feb 2003
Location: ..
for symmetry you need to set Ton = (1/2)*(1/f) - t_rise

use curly brackets, .param to save typing
Attached Images
 sq.PNG (53.5 KB, 1058 views)

 4th August 2011, 08:51 PM #10 Pano   diyAudio Moderator     Join Date: Oct 2004 Location: SW Florida Moved to Software forum

 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 Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Site     Site Announcements     Forum Problems Amplifiers     Solid State     Pass Labs     Tubes / Valves     Chip Amps     Class D     Power Supplies     Headphone Systems Source & Line     Analogue Source     Analog Line Level     Digital Source     Digital Line Level     PC Based Loudspeakers     Multi-Way     Full Range     Subwoofers     Planars & Exotics Live Sound     PA Systems     Instruments and Amps Design & Build     Parts     Equipment & Tools     Construction Tips     Software Tools General Interest     Car Audio     diyAudio.com Articles     Music     Everything Else Member Areas     Introductions     The Lounge     Clubs & Events     In Memoriam The Moving Image Commercial Sector     Swap Meet     Group Buys     The diyAudio Store     Vendor Forums         Vendor's Bazaar         Sonic Craft         Apex Jr         Audio Sector         Acoustic Fun         Chipamp         DIY HiFi Supply         Elekit         Elektor         Mains Cables R Us         Parts Connexion         Planet 10 hifi         Quanghao Audio Design         Siliconray Online Electronics Store         Tubelab     Manufacturers         AKSA         Audio Poutine         Musicaltech         Aussie Amplifiers         CSS         exaDevices         Feastrex         GedLee         Head 'n' HiFi - Walter         Heatsink USA         miniDSP         SITO Audio         Twin Audio         Twisted Pear         Wild Burro Audio

 Similar Threads Thread Thread Starter Forum Replies Last Post maouna Solid State 2 11th December 2010 10:34 AM lineup Solid State 20 9th October 2006 01:15 AM mura Solid State 17 31st May 2005 01:19 AM

 New To Site? Need Help?

All times are GMT. The time now is 11:39 PM.