Author Topic: Is the simulator broken?  (Read 3846 times)

0 Members and 1 Guest are viewing this topic.

Offline iletthesmokeoutTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Is the simulator broken?
« on: January 16, 2016, 11:27:28 am »
Hey, gang, I'm trying to build a really basic circuit, a simple sawtooth generator. It seems to me it ought to work, tina thinks it works... for three pulses. Then stops. This has me scratching my head. Seems to me it should work or not. Can anyone explain this observed behavior? Or should I believe tina ti is broken? Here's a screen shot of what I did and what it has to say. Thanks!
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Is the simulator broken?
« Reply #1 on: January 16, 2016, 12:15:34 pm »
for really basic proof of concept stuff i prefer falstads circuit simulator (online java applet), the more powerful the simulation package the more unknowns you have to fill in, so for proofing aim simple,

http://www.falstad.com/circuit/
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 694
Re: Is the simulator broken?
« Reply #2 on: January 16, 2016, 08:23:38 pm »

the SPICE engine might suddenly decide to increase the simulation time-step. See if there are adjustments for the maximum time-step and make that  1/100 th of the sawtooth period or smaller.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is the simulator broken?
« Reply #3 on: January 17, 2016, 01:10:09 am »
The SCR is latching-up and staying on. 

Try something like this...
 

Offline AlxDroidDev

  • Frequent Contributor
  • **
  • Posts: 471
  • Country: br
    • Arduino Web Brasil
Re: Is the simulator broken?
« Reply #4 on: January 17, 2016, 02:25:59 am »
The SCR is latching-up and staying on. 

What software is that you are using?

"The nice thing about standards is that you have so many to choose from." (Andrew S. Tanenbaum)
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is the simulator broken?
« Reply #5 on: January 17, 2016, 02:33:00 am »
That's the full version of Tina Educational from DesignSoft.

You can download a free version from TI called Tina-TI.  That's what the OP is using.  Tina-TI is somewhat limited--it won't do digital or mixed-mode simulations, for example--but it's still pretty powerful.

A lot of people on the forum use LTspice.  So if you're looking for a circuit simulator then keep it in mind as well.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Is the simulator broken?
« Reply #6 on: January 17, 2016, 02:33:45 am »
Link just in case it's hard to find :)
http://www.ti.com/tool/tina-ti
 

Offline AlxDroidDev

  • Frequent Contributor
  • **
  • Posts: 471
  • Country: br
    • Arduino Web Brasil
Re: Is the simulator broken?
« Reply #7 on: January 17, 2016, 02:38:14 am »
That's the full version of Tina Educational from DesignSoft.

Thank you. I downloaded TINA a few days ago, but I didn't install it yet. I'll check it out.
"The nice thing about standards is that you have so many to choose from." (Andrew S. Tanenbaum)
 

Offline iletthesmokeoutTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Is the simulator broken?
« Reply #8 on: January 17, 2016, 02:57:58 am »
Thanks, yes I understood it was claiming latchup was occurring; I was specifically asking how it could possibly think that occurred after 3 pulses, as opposed to happening right off or not at all. That's the bit I found most confusing.

The flaw in my circuit I don't find unexpected; I'm far from expert in circuit design. That said, THANK YOU for the suggestion of inserting that resistor; that may be the solution I was willing to grope toward on my own. You likely save me a pile of time there! :)

The SCR is latching-up and staying on. 

Try something like this...
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is the simulator broken?
« Reply #9 on: January 17, 2016, 03:11:18 am »
For what it's worth, when I tried your circuit in Tina 10.2, it pulsed once and then latched up--which is more understandable.  So, yeah, the fact that you got three pulses before the latch-up is kind of interesting.
 

Offline iletthesmokeoutTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Is the simulator broken?
« Reply #10 on: January 17, 2016, 03:57:00 am »
Okay.

So it took only a moment to verify that your fix (insertion of that resistor) works, and a bit longer, due to simulation run times, to verify it works really well. I had been experimenting with BE bleed resistors across one or both of those transistors in the SCR, and that worked, but the circuit was very sensitive to component values; when I changed the value of the current source, it broke, and I'd have to tinker the bleed resistor values. Also, the bleed resistor across the pnp was allowing current from the right hand divider to contribute to charging the cap, resulting in my nice straight ramp bowing upwards. So your fix solves all of those problems. I can vary that current source wildly, to change the frequency of the sawtooth, and it continues to work.

My current issue is I don't really understand *why* your fix works. The various sources I've found on "make your own SCR" don't discuss anything similar to that. Can you illuminate me on this, please? I'm struggling toward jedi, er, BJT mastery, but obviously have a way yet to go... could it be something subtle like changes in beta with varying collector current? (Guessing wildly here.) Thanks!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Is the simulator broken?
« Reply #11 on: January 17, 2016, 05:01:17 am »
Poke around with the simulator settings, particularly RELTOL (default 1e-3, try smaller?), ABSTOL, CHGTOL (should be approx. RELTOL * ABSTOL), GMIN and RSHUNT (GMIN = 1/RSHUNT = 1e-9 is pretty reasonable for most), TRTOL (larger makes it change the step size more gradually, related to what awallin said), and select GEAR 2 integration.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is the simulator broken?
« Reply #12 on: January 17, 2016, 05:19:59 am »
Okay.

So it took only a moment to verify that your fix (insertion of that resistor) works, and a bit longer, due to simulation run times, to verify it works really well. I had been experimenting with BE bleed resistors across one or both of those transistors in the SCR, and that worked, but the circuit was very sensitive to component values; when I changed the value of the current source, it broke, and I'd have to tinker the bleed resistor values. Also, the bleed resistor across the pnp was allowing current from the right hand divider to contribute to charging the cap, resulting in my nice straight ramp bowing upwards. So your fix solves all of those problems. I can vary that current source wildly, to change the frequency of the sawtooth, and it continues to work.

My current issue is I don't really understand *why* your fix works. The various sources I've found on "make your own SCR" don't discuss anything similar to that. Can you illuminate me on this, please? I'm struggling toward jedi, er, BJT mastery, but obviously have a way yet to go... could it be something subtle like changes in beta with varying collector current? (Guessing wildly here.) Thanks!

I don't really have a good explanation for how it works since I was just "spitballing" when I came up with it.   :-//

If you watch the PNP's base during simulation you'll notice that the resistor prevents the PNP's base from being pulled down as low as it would, otherwise.  Replacing the resistor with a diode seems to work as well and may be a better solution since it will allow more current to flow through the NPN's collector, which will allow the cap to be discharged faster.

If you think about it, the original circuit actually shouldn't work.  Or, at least, it is a dodgy design.  The SCR probably should act like it does and latch.  It is connected to a constant current source, after all, and SCRs stay on until current stops flowing through them.  The original design must have relied on the SCR's holding current to be greater than the current that the constant current source provides.
 

Offline iletthesmokeoutTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Is the simulator broken?
« Reply #13 on: January 17, 2016, 06:08:02 am »

If you think about it, the original circuit actually shouldn't work.  Or, at least, it is a dodgy design.  The SCR probably should act like it does and latch.  It is connected to a constant current source, after all, and SCRs stay on until current stops flowing through them.  The original design must have relied on the SCR's holding current to be greater than the current that the constant current source provides.

I think it is a little bit cheesy, but it's not quite as bad as all that; remember the divider on the right side. Once the cap is down and the scr's npn starts to shut down, that divider, as it has no RC time constant, can start pulling back up, shutting off the pnp. But with your fix, it's still much better. :) But I'm still pondering why it works...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf