Prelab 4

The questions below are due on Thursday March 02, 2023; 11: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 the week 4 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 (which is covered in detail in lecture 4b, but which we'll introduce here).

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 just about every lab so far; in lab 1, we were converting information about light and sound into electrical sigals, and in labs 2 and 3, we were using the joysticks and buttons to measure information about the world as well.

In lab 3, we took an 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 lab 3 will be making a comeback in week 4 (you don't need to bring yours; we'll 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 (often called V_{CC} or V_{DD}) and a "Off" voltage. In the Teensy, the "On" voltage is around 3.3 Volts and the "Off" voltage is near 0V; 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 4-bit digital-to-analog converter.

The overall goal with our DAC circuit is to create different voltages that are within the ranges of our "On" and "Off" values, but not just limiting ourselves to those two voltages. To state the problem/situation a different way: The Teensy works in Black and White, and we need to give it the ability to produce shades of grey.

Let's first analyze a circuit that will be useful in lab 4. Examine the circuit below and determine the output voltage v_\text{out} when V_1 = V_{CC}.

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_{CC} and R. v_\text{out}=

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_o when V_1 = 0 V and V_2 = 0 V.

Enter a symbolic equation for V_O 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 a new technique to help solve circuits: 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.