Feature Request: Time Controlled Switch Initial State Option

Although I could probably create a power level inverter to allow me to switch power off in the middle of testing, it would be nice to be able to be able to have the switch turned on at t0 and to turn off at a designated time.

by tjayh913
June 12, 2012

You cn do that with an AC source set for square wave.

by arduinohacker
June 12, 2012

That will work for DC input, but the solutions become more complicated when you wish to switch an AC input off. An example of this would be when simulating how the voltage discharges in a AC to DC power supply after you remove the input power.

by tjayh913
June 12, 2012

I think @arduinohacker meant use the square wave to turn a Voltage Controlled Switch on and off.

You could also drive it with a Digital Clock to set an arbitrary duty cycle.

If you drive the Voltage Controlled Switch with a PWL() or PWS() voltage source then you have complete control over when the switch turns on and off.

And here's a really cool trick:

This isn't the same thing as turning a switch on and off because the output impedance is always that of the behavioural source but I thought it worth posting as it may be useful in other applications.

Info on PWL() or PWS() sources is in here:

https://www.circuitlab.com/docs/expressions/

by signality
June 13, 2012

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.