# [S.T. 1] - Semester task 1

Discussion in 'Homework Help' started by PsySc0rpi0n, Feb 20, 2015.

1. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
Hello again, almost a here after...

The past year I asked for help to complete a few home tasks we were asked to perform for the Electronic class we have in my graduation.

This year I'm repeating this class and I'll need help again to improve a little bit my graduation score for this class!

The first task is just to calculate a few currents and voltage drops of a few simple circuits using several techniques as Thevenin theorem, Kirchoff Laws or Nodal Analysis.

Well, the 1st question I have is why, in the attached circuit, are I(R1), I(R2) and I(R3) of opposite signals from my calcs??? My calcs are:

$
\left\{\begin{matrix}
i_{1}=i_{2}+i_{3}\\
i_{1}\cdot R_{1}+i_{3}\cdot R_{3}-10=0\\
i_{2}\cdot R_{2}+5-i_{3}\cdot R_{3}=0
\end{matrix}\right.\Leftrightarrow i_{1} = 7.31mA,\, i_{2} = -4.89mA,\, i_{3} = 12.21mA
[\tex]$

File size:
883 bytes
Views:
24
File size:
8.1 KB
Views:
34
2. ### MrChips Moderator

Oct 2, 2009
12,633
3,453
A negative sign indicates that the direction of the current is opposite to the one you had originally chosen.

There is nothing wrong with that. All you have to do is reverse the direction of the arrow.

3. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
I know about that, but the problem is that LTSPice gives opposite results in terms of signals to my calcs. And calcs and LTSpice should match, right?

4. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066

Notice how the schematic is converted to the actual netlist. Resistors are symetric and have two pins. The schematic symbol for a resistor can be mirrored and rotated, so can wind up in either of two orientations relative to the actual current flow.

The node voltages are unambiguous! Current always flows from a more positive node to a less positive node.

Last edited: Feb 20, 2015
5. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
What you want me to understand??? The values???

I tried to do my math to that circuit and again all four currents gave me positive values of I1 = 1A, I2 = 1A, I3 = 2A and I4 = 2A.!!! So, I'm definitely doing something wrong!

Last edited: Feb 20, 2015
6. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
The point that MikeML is trying to show you is that when you ask a simulator what the current in a resistor (or inductor or capacitor or other device) is, it give you a number. How you interpret that number depends on the defined direction of that current. You seem to be assuming that the simulator is able to read your mind and knows that YOU want i1 and i2 to be the currents from left to right and i3 to be the current from top to bottom. But they haven't perfected the CrystalBall module in most simulators yet. If you were to be thorough and define your own use of those current directions (otherwise WE have to use OUR crystal balls to read your mind to know what directions you are assuming), then it would be more likely to become apparent to you that you need to know how the simulator defines them. Simulators almost universally define the current at a pin as the current INTO the pin and, for two-terminal devices, they define the current through the device as the current INTO pin 1. Can you look at your schematic and tell which pin on each of those resistors is pin 1? I can't. But when I open your schematic in MY copy of LTSpice I can, because I edited my resistor symbols to put a small tick on the symbol at pin 1. Thus we have the result:

From this, you can see that ALL three currents are defined by the simulator to be in the opposite direction to what you assumed.

7. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,401
1,218
In some simulators, if you don't place the ground to use as node 0, it could select another node as the reference node.

File size:
22.9 KB
Views:
21
File size:
27.3 KB
Views:
24
8. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
His circuit has a ground (the bottom node).

What simulator are you using? It seems to do what makes sense -- namely pick a node as the ground and proceed.

Other simulators throw an error if there is not a Node 0 defined -- which is acceptable, particularly if a meaningful error message is given.

Yet other simulators do the simulation but give nonsensical results -- which I find unacceptable.

9. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
Thanks for all replies...

WBahn, I'm not expecting anyone to guess what I want to be the currents directions. I'm also not that childish that believe that could exist any crystal balls. I'm asking for help without disrespecting anyone's knowledge or making fun of others lack of expertise.

Anyway, what I wanted to mean was that the math we do should be currents direction independent. So, no matter the directions I would have chosen, the math should always give the correct results. What I didn't knew was the fact that LTSpice and all simulators in general take into account the components directions and that will affect the signals of any math and consequently currents directions!

Last edited: Feb 21, 2015
10. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,401
1,218
WBahn,

I use TINA, education version. The free version is TINA-TI at ti.com

Last edited: Feb 21, 2015
11. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
Ok, next question I have is about time constant in an RC circuit. I know that time constant for an RC circuit is tau = R.C

Our teacher is asking us to simulate the attached circuit and simulate it for different frequencies. But shouldn't the time constant be always the same as time constant doesn't depends on frequency, by the above given formula? Or how does time constant varies with frequency and why?

I've simulated for different periods (frequency) and the time constant looks like is not what it should be.

File size:
689 bytes
Views:
19
12. ### Jony130 AAC Fanatic!

Feb 17, 2009
3,990
1,115
Of course the time constant is constant as long as R and C are not changing. So can you tell me what led you to this conclusion ?
For me the simulation result are correct. For R = 1kΩ and C = 220μF tau is RC = 220ms all the time.
In your simulation you set Ton ≈ 11ms and Toff ≈ 9ms.
So after t = 11ms the capacitor voltage will reach Uc = 1V*( 1 - e^ (-11ms/220ms)) = 48.77mV. Now the capacitor start the discharging phase and again with the time constant equal to 220ms. So after t = 20ms the capacitor voltage will drop to Vc = 48.77mV e^-9ms/220ms = 46.815mV.
Next again the capacitor will start the charging phase and after t = 31ms the capacitor voltage will reach
(1V - 0.046815V)(1 - e^ (-11ms/220ms)) + 0.046815V = 93.3mV, notice that the capacitor will be charging with time constant tau = 220ms to the difference between Vcc and the value to which the capacitor previously was charged. And at t = 40ms Vc = 93.3mV e^(-9ms/220ms) = 89.56mV.
And at t = 51ms Vc = (1V - 89.56mV)*(1 - e^ (-11ms/220ms)) + 89.56mV = 133.96mV and so on.

Last edited: Feb 21, 2015
13. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
You very much ARE expecting people to guess what you want to be the current directions. When you say i1 = i2+i3 that gives no hint as to the how you defined your currents. It merely tells us that if i1 is defined going into the node that i2 and i3 are defined going out of it -- OR that you defined them the other way around -- OR that you defined them some other way and made a mistake in applying KCL. You don't give use the information we need in order to know which of those apply, hence we need to guess (or us a crystal ball to read your mind).

The math did give the correct answers in both cases. But both answers HAVE to take into account the defined direction of the currents otherwise there is no way to comprehend the results. YOU had to take into account the direction each current was flowing in order to apply KVL for your loop equations, didn't you? If you didn't know what direction each current was flowing (the symbolic current, not the actual current), then you couldn't have come up with the equations. Well, the simulator can't do that either.

14. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,401
1,218
Tell us about this input signal your calling "frequency"? What type of signal is it? Sine wave? Square wave, if so, what is the duty cycle? Triangle wave? Pulsating DC, again, the duty cycle?

What are your testing standards with respect to tau? Is f = 1/tau or some other discriminating factor? Can you tell me your testing plan or are you going to randomly pick a frequency?

For me, I don't use LTSpice, so without a schematic, I can only imagine your circuit.

15. ### atferrari AAC Fanatic!

Jan 6, 2004
2,664
784
Now I understand: you did not actually understand what your teacher is asking you or you do not know how to set the test in LTSpice. His request makes sense.

Open it, see what is different from yours...and then do the changes (variations) he asked for...and take the conclusions...and then comment them here.

File size:
678 bytes
Views:
18
16. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3

I setup wrong my Ton and Toff. They should be 9.998mS for both (plus 2nS from Trise and Tfall would sum to the total of the period of 20mS).

What is leading me into confusion is the fact that when I change the frequency, I can't see the 1st time constant at 220mS (~63% of the full capacitor charge)!

I have to ask a few question to avoid any misunderstandings. You use Uc for charging phase and Vc for the discharging phase. Was it on purpose??? Is there any difference?
What is exactly the formula you're using to calculate capacitor's voltage at a given time?

Is it:

where V is the previous capacitor voltage???
If so, why do you consider capacitor voltage at 11mS as 1V??? Shouldn't the capacitor theoretically reach 1V at t = + infinite???

I have posted my schematic in post #11.
We are supposed to simulate that circuit with a square wave signal for Vin with 1V peak-to-peak ignoring negative values, which means from 0V to 1V and not from -0.5V to 0.5V. Then we should make a few additional simulations for different frequencies to see what happens.
The duty cycle is supposed to be ~50%, that's why I did 20mS for period, 9.998mS for Ton and for Toff, 1nS for Trise and Tfall. If I sum these values, I guess I'll have the 20mS period...

The frequency I'm talking about is just to see what happens in the simulation. So I change the frequency by changing the period!

17. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
I certainly see your simulation's point of view... You used a very small frequency (0.33Hz->3S period) so that we can see the capacitor discharge phase. And also used a pretty high Von value of 8V.
The difference is not that much, I guess. It's only a matter choosing enough reasonable values to see the capacitor's charge and discharge phase. However our teacher said to us to use a Von peak value of 1V without negative values (from 0V to 1V).

So, this said, and knowing that a period based in seconds and not milliseconds, what would be the frequencies to use in a few additional simulations as teacher asks?

Last edited: Feb 21, 2015
18. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
You posted a file in Post #11 that requires the reader to download the file and open it in LTSpice, which JoeJester said that he doesn't use. It's fine to post a schematic in such a format so that people that happen to have that particular CAD tool can download the file and play with it if they choose. But you should also post an image of the schematic, preferably as a PNG file, in your post as well so that everyone can see your circuit.

19. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Normally an assignment like this would have one of two things as the intent. The first would be to demonstrate that changing the frequency of the input signal has no effect on rise and fall time. It makes sense to use a square wave for that. The second is to demonstrate the effect that a circuit with a fixed time constant has on a signal of differing frequencies and a sine wave is normally used for that, although a square wave can be used.

20. ### PsySc0rpi0n Thread Starter Well-Known Member

Mar 4, 2014
1,191
3
Didn't understood that... I'll post it right a way!

This was what I had before