0
\$\begingroup\$

I have a very simple circuit that includes a capacitor meant to provide a few seconds of battery-like backup to a few LEDs when power is removed. In real life, it does exactly that. However, when I simulate it in LTSPICE it seems that after the input voltage is removed the capacitor doesn't "pick up" to power the circuit. Being rather new to LTSPICE, is there something about how to simulate it that I'm missing?

enter image description here

\$\endgroup\$
  • \$\begingroup\$ What do you mean by "pick up"? It clearly is discharging between the 1s and 3s mark \$\endgroup\$ – PlasmaHH May 13 '16 at 12:16
  • \$\begingroup\$ In real life the capacitor provides (diminishing) voltage and current for many seconds after the voltage is completely turned off (in my simulation command at t=3s). Yet the voltage at t=3 becomes 0 and the current through the capacitor becomes 0A at t=3. \$\endgroup\$ – JimMSDN May 13 '16 at 12:20
  • 2
    \$\begingroup\$ In real life you don't have a zero impedance voltage source though. Try adding a switch to simulate real life maybe? \$\endgroup\$ – PlasmaHH May 13 '16 at 12:23
  • \$\begingroup\$ In looking through the list of components available in LTSPICE I don't see anything that resembles a switch, variable resistor, pot, etc. that I could use to do this. Is this a component I need to add or am I overlooking something? \$\endgroup\$ – JimMSDN May 13 '16 at 12:36
  • 1
    \$\begingroup\$ try searching the manual for switch, it will show you things like the sw component. \$\endgroup\$ – PlasmaHH May 13 '16 at 12:39
4
\$\begingroup\$

You might think that setting your PWL to zero makes it open circuit. It doesn't. It's generating a low impedance zero, that discharges the capacitor.

If you want to simulate removing it, then you need a switch in series with it that opens at some time, or a variable resistor that you set to a very large value.

Series diodes are often used in real life so that a collapsed main power supply doesn't drag down its backup supply. You could do the same here.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Ah ha - that's what I was missing. \$\endgroup\$ – JimMSDN May 13 '16 at 12:22
  • \$\begingroup\$ OK, now in looking through the list of components available in LTSPICE I don't see anything that resembles a switch, variable resistor, pot, etc. that I could use to do this. Is this a component I need to add or am I overlooking something? \$\endgroup\$ – JimMSDN May 13 '16 at 12:28
  • 1
    \$\begingroup\$ Jim, see this link for an example of the SW element. You have to add the element, give it a drive voltage, and add a .model S1 SW... directive. \$\endgroup\$ – rdtsc May 13 '16 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.