Using Circuit Lab

All, I am fairly new to creating circuits and was curious how I would use Circuit Lab to do basic examples like using a switch to turn on an LED to get an idea before I go out and buy the physical components. I can easily create the circuit but not sure how to test it. How do I know if the LED turns on, or is blown from too much voltage, etc. How do I understand the time simulation?

Any "newbie" help would be appreciated.

Thanks

by romasi
December 01, 2012

Hi romasi,

This is a funny coincidence with your question and our discussion:

https://www.circuitlab.com/forums/support/topic/9x8m5kf6/7-kw-brushed-motor-rectifier-circuit-need-help-with-load/

Like all “serious” electronic circuit simulators CL does not provide simple manual operations ("flip a switch") and a “reality” feedback (or a warning).

Their aim is more in the theory (theoretical correctness), hypothetical, but “bare of all limits”.

Your question “LED “on” or blown?” will not be answered, even when using a specific type of LED.

However, if you know that your LED will be both, (somewhat) “on” and "safe" between 5 and 20 mA you can “see” that e.g. from the “Time Domain Simulation”.

There is no user action possible during computing the result, thus you have to tell your switch when it has to flip (if you need the switch action in your test circuit).

I’ve made a circuit to start with, double click the components to see their parameters. Go to Simulate -> Run … (or press F5).

Regards, Sancho

by Sancho_P
December 02, 2012

Sancho, Thanks for the awesome advice. Helps get an idea of what to expect from using Circuit Lab (which I plan to do more of). Curious if you could answer a few more basic questions though:

1) Why use a "Voltage Function Generator" vs a "Battery" or "Voltage Source"?

2) Why (and how) use the square resistor icons vs the standard resistors?

3) What are the benefits of using a Capacitor/Inductor in the circuit when they really aren't necessary to power the LED?

Apologies if #3 is rudimentary EE. I have read a bit on EE but there are some gaps that still need filling that I am working on.

Thanks again

by romasi
December 02, 2012

@1) A battery is NOT a battery is NOT a battery.

There are many kinds of batteries. OK, they give you a certain DC voltage, but that’s the end of what they have in common. This might be sufficient but often is not enough to represent your needs.

Much better is to_ clearly point out _ what you mean. In this case, a lead acid battery will have e.g. a different internal resistance as a NiMH, voltage over load curve, a.s.f.

I’ve used an “ideal” sine wave plus internal resistance, this is a kind of “real signal generator”, but not a transformer because there is no inductor used.

To play with, you could switch to square wave ...

  • You couldn’t do that with “a battery” ;-)

In the time domain simulation take care, or better, do not use “ideal” sources to supply your circuits (IC’s) until you know exactly what you are doing. Think about ramping up the power when you “plug in” your supply.

Note: This is a tricky part in (solely?) CL, I think it’s simply a bug. But I’m a newbie, too, so I may be wrong.

@2) The square resistors are the “standard” here in the EU, you can change that for each element (doesn’t work for some elements, a bug) or for all future elements:

https://www.circuitlab.com/docs/faq/#q_iec_european_resistor

(OK, this is NOT a bug but not consequently programmed: The displayed icon should not be chained to the “drawing” but to the user. Thus you would see my resistor but your icon.)

@3) The only benefit is to show you some interesting plots. This is why I’ve used a sine wave, not DC. You could play with the value of C1, though.

On the other hand, one way rectifying will result in (here 50 Hz) current pulses that can be seen when you do not fully look into the LED and move your head, very irritating (OK, NOT in the TDS).

The circuit was specially “designed” for your needs, to answer some basic questions but to raise more … ;-)

Have fun!

by Sancho_P
December 03, 2012

So I'm not new to circuits, however I don't really understand hownto use this editor. It's really cool and thanks for your help, I kinda understand the setup you made, but I'm still confused about how to make other circuits.

by SONIC_The_Hedgehog
December 04, 2012

@SONIC_The_Hedghog,

Not sure I follow your reply. Are you sure this is the thread you meant to reply to?

Whatever, have a browse around the examples and other peoples workbenches.

And of course read:

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

and:

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

and probably:

https://www.circuitlab.com/blog/

then have a play.

:)

by signality
December 04, 2012

Hi SONIC,

This is probably because CL is something you did not expect, something you were not searching for.

I can’t really explain what it is, but:

  • It is NOT a schematics editor.

  • It’s very limited (top advantage !!! )

  • It is not what the average hobbyist is looking for (that’s sad).

  • It has some, say, issues (?).

When I came here I was working on an MCU project to control a PWM cooling fan. The v-e-r-y simple sensor converter (interface) made me try CL.

See the final 555 - circuit here (my MCU is idling): Regards, Sancho

by Sancho_P
December 04, 2012

Huh, you're right. I didn't expect this, however I can say it definitely does help with layout constraints. It is interesting though, and thanks for the schematics!

by SONIC_The_Hedgehog
December 04, 2012

Sancho,

Thanks again for the feedback. Much appreciated.

As you might have suspected, your answers did invoke more questions.

1) I understand that a Sine wave is an AC signal. What is the difference between an Sine and a Square wave though?

The following question is more about EE basics that I have learned but do not know the underlying reason and am curious, feel free to brush it off if it isn't worth your time (apologies if so):

2) From my studies of "Electrical Engineering 101" (by Darren Ashby), I learned that resistors in series are additive and series in parallel divide the resistance. However, I am unclear how the resistance of resistor (R1) is affected by resistor (R2). This is a Low-Pass (passive) filter example from the book. I would figure that the electrons have to pass through R1 first and the left over voltage would then be affected by R2. Is it because the signal is AC and therefore the electrons continuously swap direction?

Thanks again, Romasi

by romasi
December 05, 2012

As I told you I’m not an expert, I can tell you the difference between a transformer and a horse when I see them side by side.

1) The “visible” difference is the form of the AC (voltage) wave over time, you can see that from the Time Domain Simulation (TDS) in CL.

Hey, don’t be a coward, go to your low - pass example and click “Simulate”, next select TDS to see the TDS harmonica. Stop time is the time frame to watch your signal, start by typing 0.004 (why? how many cycles?) and as Time Step (at least 10 to 100 times smaller) try 0.00001 (all is meant in seconds).

Next click once at your node “OUT” (the cursor should be like a ball pen at this time) and then click “Run TDS”.

OK, that’s for the sinus. Switch the source to “square” and run TDS again.

Take care, the very beginning of the square wave is not fully defined / unclear / wrong / whatever, maybe someone here can explain that, I can’t.

2) One resistance (one component) does not “affect” an other component, so it’s the same with DC (for the resistance component). The total resistance of your filter is different in DC and AC. Make sure you select words / terms carefully not to confuse yourself (and others ;-) ).

by Sancho_P
December 05, 2012

Sancho,

Thanks. I can see how looking at the TDS graphs help when one already knows the internals. I suppose in my case, the theory behind what is happening is probably more what I am going for. I could, in all honestly, build circuits and interchange components, run the TDS and analyze the results but that wouldn't give me the "why" but rather the "what". Thanks anyways.

As far as "Resistor 1 affecting resistor 2", that is how I interpreted this paragraph from the book:

"Because I like my examples to use real numbers, let's make up some values. Let [R1] = 100 Ω and let [R2] = 100 Ω and [C1] = 1 μf.

When you Thevenize a circuit, you reduce all the parts into one, where possible. In this case the resistors are in parallel, so apply the parallel rule to the resistors and you get a value of 50 Ω. Did you notice that the R value has changed considerably due to the load on the circuit?"

From that I took it that R2 changed conditions in the circuit which therefore changed the resistance value of R1 (which confused me).

Thanks again for all the help, I will leave all these nonsense EE questions for a dedicated EE forum. =)

Romasi

by romasi
December 05, 2012

https://www.circuitlab.com/circuit/qq5d7e/rc-circuit Hi there I'm a newbie learning the basic functions of an RC circuit there are a few problems with my circuit I wanted the switch to work after the charging gets completed but I'm unable to do so and the time simulation shows that there is weak amount of current passing through LED 3 how is that possible as its not even connected.A little help would be highly appreciated. thank you salahuddin.

by salahuddin.khan
December 06, 2013

@salahuddin,

Welcome to CL.

You have used a fixed switch. For a switch to change over during the sim, you need to use a time controlled switch and guess at what time you want it to switch.

A more sophisticated solution is to use a Voltage Controlled Switch and drive it from the voltage across the capacitor from whose state of charge you wish to time the switchover.

The reason there is current through LED3 even when the switch is open is covered in this thread:

https://www.circuitlab.com/forums/support/topic/gez457uy/voltage-controlled-switch-not-working/

by signality
December 06, 2013

Post a Reply

Please sign in or create an account to comment.