Pre-lab: Ladders Revisited

The questions below are due on Friday September 27, 2024; 05:00:00 PM.
 
You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.

In this week's lab, we'll be making a digital-to-analog converter (DAC), which allows for converting between digital signals and analog voltages. In the process of designing this circuit, we'll need to analyze circuits using superposition.

Motivation and An Initial Circuit

One way that circuits demonstrate their usefulness is as transducers, converting signals from one domain (light, temperature, pressure, electrical, etc.) to another. We've seen examples of this in both of our labs so far; in lab 1, we were converting information about light and sound into electrical signals, and in lab 2, the controller was using the joysticks and buttons to measure information about the world as well.

In lab 2, we also took the additional step of including a microcontroller (in our case, a Teensy) and used it as an interface to take measurements about the real world and digitize them so that we could make use of them inside of a computer (to determine the position of the joystick as well as the buttons that were being pressed. This illustrates another amazingly-useful application of circuits: as interfaces between the real world and computation.

The Teensy microcontroller we used in week 2's lab will be making a comeback in this week's lab (you don't need to bring yours back; we have more). The Teensy is a digital electronic device. A digital electronic device operates using only two types of voltages: On and Off, with "On" being a high voltage and a "Off" voltage. In the Teensy, the "On" voltage is around 3.3 Volts and the "Off" voltage is near 0 Volts (both measured relative to the Teensy's internal "ground" / reference voltage); and, as a digital device, the Teensy does not utilize voltages in between those values internally. However, if we're thinking about interfacing with the physical world, it is often useful to be able to work with analog voltages like the ones we've mostly seen so far in lab (which can take any value). This lab will be an opportunity to explore that idea a little bit, building a 6-bit digital-to-analog converter.

The overall goal with our DAC circuit is to take the digital signals from the Teensy and use those to create myriad different voltages that are within the ranges of our "On" and "Off" values. To state the problem/situation a different way: The Teensy works in black and white, and we would like to give it the ability to produce shades of grey.

1) A First Circuit

Let's first analyze a circuit that will be useful in lab. Examine the circuit below and solve for v_{\rm out} in terms of V_1. Note that it should not be necessary to do a full nodal analysis; can you use resistor simplifications and divider relationships to solve for v_{\rm out} more directly?

For the questions below, use V_1 for V_1 and R for R.

Enter a symbolic equation for v_\text{out} in terms of V_1 and/or R.

v_\text{out}=

2) Superposition

Now let's move on to a different (but related) circuit:

We now have two sources. In the lab, these two sources will be two output pins from the Teensy, and so will each be able to be independently set to 0 Volts and 3.3 Volts.

Let's start small. Determine the output voltage v_{\rm out} when V_1 = 0{\rm V} and V_2 = 0{\rm V}. Under those conditions, enter a symbolic equation for v_{\rm out} in terms of R.

v_o=

Now let's take a look at what happens when both sources are not 0V.

Because of the multiple sources, this would get a little bit tricky using the brute-force method from earlier in the course, and even with the node method from lecture 3a, it's a little tricky. However, we can take advantage of the wonderful technique we've seen in lecture and recitation recently: superposition.

Because the circuit is comprised of only linear components (components whose constitutive equations are linear), each and every current and voltage throughout the whole circuit will be a linear combination of the values from the sources in the circuit. This allows us to solve for the respective contributions from each of the source of the circuit individually and then combine them together to get the overall result when all sources are involved.

To do this, we're going to "zero out" the values of all sources except one, solve for the value we're interested in, and then repeat the process until we've found the contribution from all sources. Let's first set V_2=0\text{V} and leave V_1 as-is. Setting V_2=0\text{V} is equivaent to replacing that voltage source with a wire. After having done this, you should now be able to use series/parallel relations and voltage/current divider to solve this circuit without writing a set of equations.

Determine the output voltage V_O when V_2 = 0 but V_1 is left as-is. Enter your answer as a Python eexpression for v_\text{out} in terms of V_1 (V_{1}), V_2 (V_2), and/or R (R).
v_\text{out}=

Similarly, determine the output voltage V_O when V_1 = 0 and V_2 is left as-is. Enter your answer as a Python eexpression for v_\text{out} in terms of V_1 (V_{1}), V_2 (V_2), and/or R (R).
v_\text{out}=

Now, using superposition, the output voltage when both sources are on is the sum of the output voltages due to each source. Determine the output voltage v_\text{out} when neither source is set to 0.
v_\text{out} =

Now, let's think of these sources as coming from the Teensy, where each will either be 3.3\text{V} or 0{\text V}. In this setting, what distinct values can v_\text{out} have? Enter your answer as a comma-separated list of all of the distrint values, each in Volts (don't provide the units):

Stepping back, we see that by independently turning on V_1, V_2, both, or neither, we can create three distinct analog voltages even if V_1 and V_2 each take on only two values (0 and V_{CC}).

It is possible to build a similar network so that we end up getting an even bigger number of possible outputs. In lab this Friday, we'll design and implement a topology that will let us get 2^n distinct analog voltages from n digital sources.