Pre-lab: Ladders Revisited
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.
1) Motivation and An Initial Circuit
This week we will introduce the RP2040 microcontroller. The RP2040 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 "Off" being a low voltage. In the RP2040, the "On" voltage is around 3.3 Volts and the "Off" voltage is near 0 Volts (both measured relative to the RP2040's internal "ground" / reference voltage); and, as a digital device, the RP2040 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 RP2040 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 RP2040 works in black and white, and we would like to give it the ability to produce shades of grey.
2) 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} by inspection?
For the questions below, use V_1 for V_1 and R for R.
v_\text{out}=
3) 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 RP2040, and so will each be able to be independently set to 0 Volts and 3.3 Volts.
v_o=
Now let's take a look at what happens when both sources are not 0V.Lets see if 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.
V_1 (V_{1}), V_2 (V_2), and/or R (R).
v_\text{out}=
V_1 (V_{1}), V_2 (V_2), and/or R (R).
v_\text{out}=
v_\text{out} =
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, we'll design and implement a topology that will let us get 2^n distinct analog voltages from n digital sources.
4) Full Circuit
Here's the circuit we'll be using in lab this week. Parts of it should look familiar from the last problem set, but it is a little bit different.
Using any technique you would like, find the output v_\text{out}.
Please save you work, you will be asked to describe your process in Check off 1 of the lab.
Enter your answer as a Python expression, using values V_1, V_2, V_3, V_4, V_5, V_6, and R, respectively, to refer to these values.
v_\text{out} =~
5) Software Installation
Please try to carefully follow the instructions from the RP2040 Setup page to set things up for programming the RP2040 microcontroller during this week's lab.