Connect with us

Simulating with LTSpice ?

Discussion in 'Electronic Basics' started by Andy, Nov 29, 2004.

Scroll to continue with content
  1. Andy

    Andy Guest

    I am trying to simulate a buzzer circuit with
    LT Spice. The circuit is supposed to be astable,
    but the simulator doesn't get oscillating. I think
    I need an initial condition, how do I add one ?
    I include the circuit, perhaps someone can go over
    it and see if it should oscillate. The 8 ohms R is
    the speaker. This is the .asc file:

    Version 4
    SHEET 1 880 680
    WIRE 448 288 448 208
    WIRE 448 368 448 384
    WIRE 112 368 256 368
    WIRE 112 112 112 208
    WIRE 384 208 448 208
    WIRE 448 208 448 192
    WIRE 256 32 112 32
    WIRE 448 96 448 32
    WIRE 448 32 256 32
    WIRE 256 112 256 144
    WIRE 384 144 256 144
    WIRE 256 144 256 224
    WIRE 256 320 256 368
    WIRE 256 368 448 368
    WIRE 192 272 112 272
    WIRE 112 272 112 288
    WIRE 320 208 112 208
    WIRE 112 208 112 272
    WIRE -16 32 112 32
    WIRE -16 368 112 368
    WIRE -16 160 -16 32
    WIRE -16 240 -16 368
    FLAG 448 384 0
    SYMBOL res 96 16 R0
    SYMATTR InstName R1
    SYMATTR Value 95k
    SYMBOL res 96 272 R0
    SYMATTR InstName R2
    SYMATTR Value 56k
    SYMBOL res 240 16 R0
    SYMATTR InstName R3
    SYMATTR Value 470
    SYMBOL res 432 272 R0
    SYMATTR InstName R4
    SYMATTR Value 8
    SYMBOL cap 384 192 R90
    WINDOW 0 0 32 VBottom 0
    WINDOW 3 32 32 VTop 0
    SYMATTR InstName C1
    SYMATTR Value 0.02µ
    SYMBOL npn 192 224 R0
    SYMATTR InstName Q1
    SYMBOL pnp 384 192 M180
    SYMATTR InstName Q2
    SYMBOL Misc\\battery -16 144 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 24 132 Left 0
    SYMATTR InstName V2
    SYMATTR Value 9
    SYMATTR SpiceLine Rser=10
    TEXT -34 506 Left 0 !.tran 1
     
  2. <snip>

    I think the reason is because you didn't choose specific transistor
    models. I specified non-generic models and it ran OK with no initial
    conditions in both CircuitMaker and in LT Spice:
    http://www.terrypin.dial.pipex.com/Images/BuzzerCM.gif
    http://www.terrypin.dial.pipex.com/Images/BuzzerLT.gif

    In fact LT Spice did the better job, as CM seemed to need a while to
    get going.
     
  3. I think it's a function of step size. Using 200ns step size and max
    step, it starts immediately.

    BTW, How do you get the output to print out in 4 places?

    --
    Regards,
    Robert Monsen

    "Your Highness, I have no need of this hypothesis."
    - Pierre Laplace (1749-1827), to Napoleon,
    on why his works on celestial mechanics make no mention of God.
     
  4. Is that one for me, Robert? If so, can you clarify please.
     
  5. Andy

    Andy Guest

    Thank you, it is working with your transistors :)

    Andy
     
  6. Andy

    Andy Guest

    It didn't for me, when I changed the transistors as terry suggested
    it worked, but not for the generic ones. If you did manage it, kindly
    post the .asc file
    In LTSpice you just click on any node you want to monitor.
    Also, when the simulation begins you get to choose the nodes.
     
  7. Out of curiosity I just tried again with generics.

    First I replaced the 2N3906 with a generic 'pnp'. (BTW, am I right
    that you have to delete the original to accomplish this? The generic
    is not listed in 'Pick New Transistor'.) That combination worked OK,
    with no changes of the default Step/Max times.

    Then I replaced the 2N2222 with a generic npn. That failed of course,
    as it was now the original failing circuit. Implementing Robert's
    suggestion was a challenge for me, as although an experienced CM user,
    I'm new to LT Spice. I changed the Stop Time from 10 ms to 20 ms and
    the Step Time to 200 ns. (BTW, while doing this, in the Edit
    Simulation Command dialog, I noticed that there appear to be no
    default values entered for Time to Start Saving Data, and Maximum
    Timestep, just blanks. What values are being used?). On running that,
    even after several minutes I still had only two pulses. I halted it
    when the 4th pulse came up, around 13 ms. So yes, it *does* run with
    both generics - but glacially slowly.

    Finally I tried the remaining combination, i.e. npn = generic, pnp =
    2N3906. That ran OK, with your initial settings of Tran = 10 ms and
    Max = blank = ??

    So, one generic is OK, but LTS doesn't like two! Hopefully someone
    like Mike Engelhardt or Helmut Sennewald will spot this thread and
    explain.
    That query still puzzles me. Who was trying to 'get the output to
    print out in 4 places'? And how would your answer cover that?
     
  8. john jardine

    john jardine Guest

    With the LTspice prog' I never put a step time in. I'll just use something
    like, ".tran 1".
    Let the prog' sort it own steps out.
    regards
    john
     
  9. Your waveform diagrams have 4 significant digits. I can't get CM to do
    more than 3.

    --
    Regards,
    Robert Monsen

    "Your Highness, I have no need of this hypothesis."
    - Pierre Laplace (1749-1827), to Napoleon,
    on why his works on celestial mechanics make no mention of God.
     
  10. Ah - DECIMAL places! (I was thinking 'locations'.) You mean numbers
    like '4.000 V', '15.00ms' shown in
    http://www.terrypin.dial.pipex.com/Images/BuzzerCM.gif ?
    Can only see 2 there. Maybe you mean examples in other threads, like
    http://www.terrypin.dial.pipex.com/Images/CM-StepTimePuzzle1.gif
    where I do see 4 sig digits on the X-axis.

    That's just the way it displays in CM 2000 here when you zoom in on a
    section. Are you saying that for you it never goes beyond 3?

    Anyway, given the variation/inconsistency due to other factors, 4
    represents spurious accuracy IMO!
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-