Saturday, March 10, 2012

Lab 0: Using the Tools

Lab 0 really isn't about electronics so much as getting familiar with the circuit tools provided for use with the course. Since they gave us a handout that explains how to use the circuit tools, I'm not going to talk about that stuff. Instead, I'm posting this to get familiar with how I'm going to write about doing the labs.

If you are reading this without being a part of 6.002x, you can still simulate circuits using online circuit tools. Last week, there was a post on Slashdot about CircuitLab.com which offers very similar circuit simulation tools. That should let you follow along at home.

Note: Labs contain problems used to assess student performance. Per the honor code, lab posts will be embargoed until the course is over. However, Lab 0 doesn't count toward our grade, so here it is.

Figure 1. Test Circuit for Lab 0

Tasks

1. Enter schematic. Add the voltage source, resistors, wires and ground reference to your diagram, connected as shown in Figure 1.

Drag and drop; no problem.
2. Measure voltages. Use the tool to run a DC analysis on the circuit, i.e.., click on the DC button in the toolbar. This will annotate each node/voltage source in the circuit with a voltage/current. If the the components are wired correctly, the voltage for node D should be reported as 0V since it's connected to the ground reference and the voltage for node A should be reported as 3V since it is connected directly to the positive terminal of a 3V voltage source whose negative terminal is connected to ground. Please enter the voltages reported for nodes B and C.


So yeah, the DC analysis ("DC" along the top) doesn't label everything perfectly. The important point to keep in mind is that these logical wires have zero resistance, and so are electrically the same at every point along the wire. Thus the label "3.00V" applies to the entire wire: At the top of Vsupply, at the top of R1, and at node A. Likewise, the label "0.00V" applies to its entire wire: At the bottom of Vsupply, at the bottom of R3, and at node D.

The labels for Nodes B and C are pretty good. And fortunately those are the two lab questions. Remember that we don't enter units (V = volts), but we can enter multiplier suffixes (m = 10-3, k = 103, etc.)

Voltage for node B (volts): 2.50
Voltage for node C (volts): 1.00

3. Measure current. The DC analysis annotates each voltage source with the current it is providing to the rest of the circuit. The simulator denotes the sign of the source current as positive if the current is flowing out of the positive terminal of the source, through the rest of the circuit, and then back in to the negative terminal. And the source current sign is negative if the current is flowing out of the negative terminal of the source, through the circuit, and into the positive terminal of the source. Please report the total resistance of the path connecting the positive and negative terminals of the source, the signed current flowing from the source into the circuit, and (using the voltage value for the source) verify that Ohm's law is obeyed.

So we want the resistance of the path connecting the positive and negative terminals of the source. Fortunately, there is only one path leading from the positive terminal of Vsupply to the negative terminal of Vsupply. It has three resistors in series. The formula for resistors in series is very simple:

Rseries = R1 + R2 + R3 + ... + Rn

So, we just need to add it up

Rtotal = R1 + R2 + R3

Rtotal = 1k + 3k + 2k = 6k

As for the current, we need Ohm's Law to calculate that:

V = I*R

We know V (it's 3V from Vsupply), and we know R (it's 6k, we just calculated it), so our equation becomes:

3 = I * 6k

Re-arranging it in terms of current (I), we get the following:

I = 3 / 6k = 0.0005

Or:

I = 500u

The simulation shows -500uA at the positive terminal, so we know -500uA is flowing into the positive terminal ... or ... 500uA is flowing out of the positive terminal into the circuit. This sign indicating direction may seem a little weird, so I'll use an analogy.


You are a bouncer carding people the door of a bar. The fire codes prohibit too many people from being in the bar at once, so your job is not only to check IDs, but also to keep an accurate count of the occupants. The owner of the bar (also carding people with you) says, "I'm gonna take a bathroom break, tell me how many people come in while I'm gone."


As it turns out, nobody enters the bar while the owner is gone but two people do leave the bar. When the owner comes back, she asks, "So how many people came into the bar?" Being a witty electrical engineer, you respond "-2".


The voltage supply and the current are really no different than the bar and the people. Here -500uA are entering the voltage supply; which really means 500uA left the voltage supply.


Total resistance between pos and neg terminals (ohms): 6k
Current flowing from source into the circuit (amps, with correct sign): 500u

4. Verify KVL. The four components in the schematic form a large loop -- let's verify that Kirchoff's Voltage Law holds by summing the voltage changes across the devices. Starting with node A, travel clockwise around the loop of components, entering the voltage change across each component. Choose the sign of the change for a component using the first terminal you come to in the clockwise traversal as the reference node. Verify that these four values sum to 0.

I've added the red-bold to the last sentence, because it is a very important clue about how to solve this problem.


To understand KVL, you go back to the definition of voltage. Voltage is defined as the difference in potential between two points; a point of reference and a point of measurement. The reference point is the point that you pick to be zero (0). If the point of measurement is the same as the point of reference, then the voltage is 0V. (We're at the exact same point in space; how can the potential due to voltage be different between these two points? It can't!)


Now, pick a loop (any loop) in the circuit. Pick any point along that loop. Walk around the loop until you get back to the exact same spot where you started. What is the potential difference? (0V, as we established above; it is the exact same spot.) So the beginning of our equation forms:


Thing1 + Thing2 + Thing3 + ... + ThingN = 0


Now we go back and do the hard part; we figure out Thing1..N and plug those in. According to the problem, we start at Node A and work clockwise. So that's the top of R1. This top of R1 becomes our point of reference. The point of measurement is then the other side of the component; the bottom of R1. So we're interested in: How does the voltage change between the top of R1 and the bottom of R1?


So we go back to Ohm's Law: V = IR


We are looking for V (the change in voltage) and we know I (500u) and we know R from R1 (1k), so we figure out the equation:


V = 500u * 1k = 0.0005 * 1000 = 0.5V


Now we get into this issue of direction again. Note that the reference point, Node A, is at 3V. If the voltage changed by 0.5 in the positive direction, we'd have 3.5V and R1 would be a supply. So, the voltage must change by 0.5 in the negative direction (-0.5), so we have 2.5V and R1 is a resistor.


Now we understand why our analysis tool told us that the current was -500uA at the positive terminal. If we redo our Ohm's Law equation without flipping the sign:



V = -500u * 1k = -0.0005 * 1000 = -0.5V


Now everything seems to be working out. So let's do the equations for R2 and R3:


R2: V = -500u * 3k = -0.0005 * 3000 = -1.5V



R3: V = -500u * 2k = -0.0005 * 2000 = -1.0V


So then we arrive at the supply, ThingN, the last thing in our loop. Ut oh, this one doesn't have a resistance defined, so we can't use Ohm's Law. What do we do?

Recall that the supply is defined as a voltage. The reference point is the bottom of the supply, 0V. The point of measurement is the top of the supply / Node A / where we started. By the definition we specified for the supply, this is 3V.

So let's check our equation KVL equation:

(-0.5) + (-1.5) + (-1.0) + (3.0) = 0

And it checks out; (-3) + (3) is indeed 0.

Voltage change across R1 (volts, with correct sign): -0.5
Voltage change across R2 (volts, with correct sign): -1.5
Voltage change across R3 (volts, with correct sign): -1.0
Voltage change across Vsupply (volts, with correct sign): 3

5. Transient analysis. Change the waveform produced by the voltage source from a DC value of 3V to a sinusoid with a 1V amplitude, an offset voltage of 1V, and a frequency of 1kHz. Add scope probes to nodes A, B and C and edit their properties so that the plots will be different colors. Now run a transient analysis for 5ms (the value of 100 for the minimum number of timepoints is fine). Move the mouse over the plot until the marker (a vertical dashed line that follows the mouse when it's over the plot) is at approximately 1.25ms. Please report the measured voltages for nodes A, B and C.

This one is a little beyond my current skill to solve. It must be solvable, considering somebody wrote a program in JavaScript to show me the answer in a web browser. However, I have a feeling I'll be in 6.002x a little longer before I can solve it for myself analytically. So, I'm going to have to settle for running the experiment and reporting the results empirically. (Hey, this is almost like a real "lab" question!)


Voltage for node A (volts): 2
Voltage for node B (volts): 1.67
Voltage for node C (volts): 666m

Okay, now I feel confident at using the circuit tools provided with the course. There is also a circuit sandbox to play around with, but I think I'll come back to that one later.

2 comments:

  1. I want you to know that I'm so impressed with your work. I would like you to visit my website and hoping for your opinion to tell. I hope you would, thank you.
    Https://yhn876.com 카지노사이트

    ReplyDelete