Having trouble simulating two multivibrators in LTspice - Page 1
Forum section: electronics / beginners

author: ledtester
author_rank: Super Contributor
timestamp: May 13, 2024, 02:49:14 am
content: In another post there was a discussion of modelling the classic two transistor oscillator in LTspice:https://www.eevblog.com/forum/beginners/help-with-modeling-multivibrators-in-ltspice/I'm trying to have two copies of the two-transistor oscillator in the same LTspice circuit but it's not working.multivibrator-1.asc contains the multivibrator circuit and it simulates correctly.multivibrator-2.asc contains two copies of the circuit but neither multivibrator oscillates. But if I delete the second copy the first multivibrator works.Is there something I'm overlooking?Also, if in the second circuit I detach R7 from the junction of C4 and Q3 the simulation works (i.e. the first MV oscillators).

author: ArdWar
author_rank: Frequent Contributor
timestamp: May 13, 2024, 03:11:13 am
content: With oscillators it's usually timestep problem. Try explicitly specify some small timestep and see if things work. SPICE solvers usually by default relaxes the timestep and/or parameter integration when the circuit gets more complex.

author: tggzzz
author_rank: Super Contributor
timestamp: May 13, 2024, 08:52:04 am
content: What are the node voltages when it is not oscillating?With simulation it is easy to achieve metastable behaviour during startup, and difficult to simulate it during normal operation.Try changing one of the 10kohm/1µF components by a tiny amount, to see if that disturbs startup equilibrium, and allows oscillation.Try connecting Q1 and Q3 collectors with a large resistor, to see if that changes the matrices sufficiently so the numerical solutions are changed sufficiently to allow oscillation.

author: ledtester
author_rank: Super Contributor
timestamp: May 13, 2024, 08:55:45 pm
content: Changing the max timestep to 250u makes the circuit work. In fact, this seems to be the largest maximum timestep that works.The.tranline is:Code:.tran 0 1 0 250u uic

author: tggzzz
author_rank: Super Contributor
timestamp: May 13, 2024, 09:20:10 pm
content: That is too much of a "magic incantation" for my liking.Whyis 250 the "right" number? Why not 251 or 249 or ... Is it possible that 250 that in some strange way the number is also affecting the simulation in some unknown way?I prefer, where possible, to identify a cause for a "simulation failure", e.g. a perfectly balanced circuit or disconnected node causing the matrix to become ill-conditioned.

author: ledtester
author_rank: Super Contributor
timestamp: May 13, 2024, 11:04:48 pm
content: Quote from: tggzzz on May 13, 2024, 09:20:10 pmIf I change R1, R3, R5 and R7 to 2K I need to reduce the max timestep to 4u... at 5u it doesn't work.

author: tggzzz
author_rank: Super Contributor
timestamp: May 13, 2024, 11:37:51 pm
content: Quote from: ledtester on May 13, 2024, 11:04:48 pmWhat are the nodal voltages when it doesn't start? If each side is equal then it might be starting in a metastable state. That won't happen in a real circuit due to noise and non-ideal components.Try making one of the capacitors 1% larger than the other, and see what happens.

author: ledtester
author_rank: Super Contributor
timestamp: May 13, 2024, 11:51:54 pm
content: Quote from: tggzzz on May 13, 2024, 11:37:51 pmSo I think the problem was that I thought using .ic V(C1)=... actually did anything. If I instead set the voltage of nodes n001 and n005 to 50m (DC analysis value is 33m) then I don't need the max timestep setting in the .trans directive.I have another post asking why setting the initial voltage of a cap doesn't seem to do anything.

author: tggzzz
author_rank: Super Contributor
timestamp: May 13, 2024, 11:54:13 pm
content: The other trick is to "kick" the circuit, to disturb any equilibrium. Instead of having a DC power supply, have a pulse with a risetime of, say, 1µs.Then, with a 1% variation in capacitors, one side should rise slightly faster than the other, and that's all that's needed.