LTspice simulation puzzle - Page 1
Forum section: electronics / projects

author: IanB
author_rank: Super Contributor
timestamp: October 24, 2013, 05:07:09 pm
content: I had a question about puzzling behaviour from LTspice that may have been lost in another thread on a different topic, so let my try in its own thread.The puzzle is described in this post:https://www.eevblog.com/forum/projects/led-flasher-that-runs-forever!/msg315637/#msg315637Basically we have two independently created simulations of the same circuit. I made one of them, AndyC_772 made the other.My circuit simulation flat lined and did not produce the expected oscillation until I swapped the collector and emitter terminals of the PNP transisitor Q1, putting it in the wrong orientation.Andy's circuit works as expected with the PNP transistor in the right orientation, but it flat lines if I flip the transistor to the orientation that works in my circuit.Does anyone have a clue what could be going on? My circuit simulation is attached. Try as I might, I cannot get it to run with Q1 in the expected orientation with the emitter connected to the positive rail.

author: Bored@Work
author_rank: Super Contributor
timestamp: October 24, 2013, 05:40:41 pm
content: The LED makes the difference. Change it to the LXHL-BW02 and you should see the other behavior. Why? Actually, I am to lazy to study and compare the spice models provided for the LEDs by LTSpice. But it must be the models. So comparing them is left as an exercise to the reader.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2013, 05:43:52 pm
content: Not 100% certain, it seems to be right on the threshold of working and a bit hard to figure out. But I see this: your NSCW100 has a forward voltage above VCC, so it barely draws any current, Q2 saturates hard, and Q1 delivers more current into Q2. Flipping Q1 decreases beta drastically, so theeffect of the higher current on the C1/R2 node isn't as great and Q2 isn't allowed to saturate as much- edit, actually it's the exact opposite, so I'm more confusedI can also make it work by putting in a slightly more pathetic transistor for Q1 (MPSA92 works nicely) without flipping anything.

author: Rufus
author_rank: Super Contributor
timestamp: October 24, 2013, 05:45:02 pm
content: Quote from: IanB on October 24, 2013, 05:07:09 pmUpping R2 to 20M (and dropping C1 to increase the flash rate) makes it run for me. The circuit is sensitive to Q1's gain. Reversing it reduces the gain.Don't know why supposedly same circuit simulates differently on different computers - are the models the same, spice settings the same?

author: IanB
author_rank: Super Contributor
timestamp: October 24, 2013, 06:07:52 pm
content: Thanks for the help, folks!I really wasn't considering that the LED could matter. Oops.Quote from: Rufus on October 24, 2013, 05:45:02 pmActually, the same circuit simulates the same on different computers. My circuit was different from Andy's in that I had picked a different LED model as noted in the comments above and I had not considered that it could affect how the circuit works. It was an error of critical thinking on my part--I had this assumption that the LED could not be the problem and so I became blinkered to the possibility.The circuit actually expects a high brightness miniature red/green/yellow LED with a Vf around 2.2 V. I'm having trouble finding a standard library part in LTspice for such an LED. They all seem to be white LEDs with a higher Vf as far as I can tell.