Wednesday, April 26, 2017

(4/18/17) Day 16: Passive RC and RL Circuit Natural Response

Lecture:

In lecture today, we focused on source free circuits containing capacitors and inductors.

First, we derived the voltage as a function of time.


Then we calculated a time constant that would help predict the amount of time a capacitor would take to completely charge and discharge.


We also calculated the frequency of a circuit from that using a pretty simple formula.





This problem was to test our techniques with inductors and their own time constant formulas/equivalency rules!


This is an exercise in using the time constant/inductor techniques to find a function of current on an inductor of time (t).



Lab 1

Passive RC Circuit Natural Response

This lab was intended to examine the natural response of an RC circuit when a voltage supply is abruptly disconnected.

The circuit originally looks like the left because the voltage is placed on it.

We are then going to simulate turning off the source by "pulling" the voltage source and observing the capacitors behavior.



Prelab:

To begin, my team and I were asked to calculate the time constant Tau = RC.




Live Trial:


Due to a failure to get acceptable measurements, I was forced to continue the experiment at home, 

I then fabricated the circuit in question on a breadboard, then used every circuit as a useful tool to determine the result of pulling the voltage source from the circuit.


Here is the circuit in every circuit software


And now here is the voltage source applied to it.


I then simulated the voltage source being pulled by using a switch and opening/closing the circuit while watching the voltmeter chart created over the capacitor.


I then zoomed in on a portion of the wave that was discharging, and got this chart.



The max voltage on the capacitor (the initial during the open switch) was 3.48V. Doing a percentage error calculation on it yields... 0.0575%. Pretty spot on. 

(4/13/17) Day 15: Capacitor and Inductor Voltage-Current Relations

Day 15

Lecture

In lecture we went over the basics of analyzing capacitor circuits, including how to add up equivalent capacitances and how they behave under constant conditions.



Lab 1

Capacitor Voltage-Current Relations

In this lab, my team and I observed the behavior of a capacitor under AC conditions. This taught us to further use the oscilloscope function on the analog discovery units while gaining more insight on a capacitors place in our calculations. 

Prelab:

For the prelab, we made graphs of the current through the capacitor over time against the voltage on it over time. 



During the fabrication process we made a simple circuit utilizing a capacitor of 1 microFarad and resistor of 100 ohms, along with the oscilloscope and wave generator from our analog discovery.


We ran a few different frequency waves to observe the capacitor voltage (Blue), current (Red), and input voltage (Yellow).

This is a sinusoidal wave input at 1kHz


iC = 10mA

This is a 100Hz Triangular Wave input.


iC = 1.5mA

Lastly, we tried a 2kHz sinusoidal input.


iC = 20mA

From these results, we can mostly gather that our initial sketches were way off. The behavior of a capacitor under these conditions can best be predicted using 

Lab 2

Inductor Voltage-Current Relations

This lab is mostly the same in terms of procedure and purpose. We want to see the behavior of current through an inductor as a function of the input voltage. To visually analyze this we will be using the same tools and graph format.

Prelab:

We were told to conceptualize the graph of a Cosine wave input being sent through an inductor and predict what the current would be. 


With a mental image, we sought out to test our hypothesis through a simple circuit. The set up of the analog discovery device was mostly the same as the capacitor lab.


This time however, we only tested 2 frequencies on the inductor. The charts were the same as well, the inductor voltage (Blue), current (Red), and input voltage (Yellow).

First, a 1kHz sinusoidal wave with a 2V amplitude.


iL = 20mA

Then we tested a 2kHz wave with the same 2V amplitude.


iL = 20mA

These results are a little baffling, since the graphs did not change at all in overall form.






(4/6/17) Day 14: Op Amps II and Summing/Difference Amplifiers

Day 14 (4/6/17)

Lecture:

In lecture today, we focused on ideal op amps (thankfully).
To begin, we predicted the output from an OP27 op amp package when a -100mv to 100mv square wave was input to it.


Now we predicted what the output is when we apply a 0-200mv input to it.


For this problem we had to calculate V0 if the source Vs = 0. This was done using nodal analysis, and after much simplification, a more simple equation was obtained.


And from there a value was found for one of the voltages.


As practice with difference amplifiers, we got a chance to conceptually design one focused on the criteria that it had a gain of 2 and a common mode input resistance of 10K ohms at each input. From there we were set to find what the input resistances would have to be using nodal analysis.


Lab:

Summing Amplifier

In this lab, my team and I designed, implemented, and analyzed what is known as a Summing amplifier. A configuration that will make use of an OP27 package that essentially sums up multiple inputs and outputs the result of the mathematical operation:


Where R3 is the feedback resistor and R1 is the input. Which basically means that if the resistor values on the feedback portion and the inputs are equal, your gain is 1 and the output is just the sum  of the voltages from the sources.

Prelab:

First, we got down the connections and named our resistors, inputs, outputs, and voltage supplies.


We then chose a value for the 3 resistors to be (in this case 2.2K Ohms was chosen).


The resistors were measured for their live values.


During the prototype stage, the only thing that posed a challenge was working with a new pin diagram for the OP27. Even then our lab manual made it easy to follow along.


Since the lab manual proved trustworthy thus far, we decided to also use its recommended values for the inputs during the implementation phase!

(Use channel 2 waveform for Vb at 1V, and channel 1 for the "soon to be variable" input Va)

Setting the Va input to the voltages in the 1st column below, we read the following outputs displayed on the 3rd column.


The magnificence of this amplifier isn't found in the terribly boring "constant trend" in the Vb column! No! It is in the fact that if you read each row as a summing problem, the output is the result! (-4 + 1 = 3 more or less!) Amazing!

Lab:

The Difference Amplifier

To add to the theme of operational amplifiers, we explored the behavior of a similar element that was intended to actually subtract two separate voltage inputs!

Before any fabrication or prototyping could begin, we had to predict the behavior of such a fascinating configuration! Primarily we had to understand the relationship between Va, Vb, and the output!


After a lot of Algebra, we found that the output was dictated somewhat similarly to the summing amplifier!


Once we knew what to look for, we set into fabricating the prototype! After triple checking our pin diagrams and making sure everything was kosher, this was our product.


For good measure, we recorded the live values for each of the resistors.


The relation between the output and the resistor values was then determined for our specific circuit.


A procedure similar to the previous lab was called for in which we fed two separate voltages, one fixed on -1V and the other variable from -4V to 5V. 


Summary:

A quick glance at the table here shows a similar pattern to the one from the inverting op amp where we hit a saturation region from 1V Va and higher. The beginnings can be seen at -4V Va input as well. The rest of the data points fall into the formula for difference amplifiers with an output of approximately 2(Vb-Va).



(4/4/17) Day 10: Op Amps and Inverting Voltage Amplifier

Day 10

Lecture:
Today's Lecture was primarily focused on Operational Amplifiers and their many different configurations.

This particular problem was dealing with what an op amp actually acts like internally.

Then we went through an algebra practice exercise by calculating what the values will be in symbolic fashion. We used Nodal Analysis.


This is another problem in which we had to use the internal effects from an op amp into consideration to find the closed loop gain.


Lab:

Inverting Voltage Amplifier

Prelab:

We began by creating a design for an inverting op amp that would satisfy the necessary criteria. The parameters were that the op amp would have a Gain of -2 and an input resistance of 2k Ohms. Unfortunately, in the real world there are no 2k or 4k resistors. So even conceptually we had to settle for standard e12 values.


After the planned out circuit was approved, we grabbed live components and measured their actual resistances. The blueprint was also updated to reflect this.


During the prototype stage of the lab, we made sure to use the pin diagram of our designated chip appropriately.


Finally, attaching the DMM to read the input voltage (over the 2.15K resistor), we had a negative reading (which makes sense, since we had input a negative voltage).


Then the output was examined to be the opposite, and almost lined up with our desired Gain! 
Using Gain = V(out)/V(in) = 4.22V/-2.19V = -1.93
(If you're confused about the sign, reread the title of this lab)


After gaining confidence in the function our prototype we set out to test it with a range of input voltages to analyze and predict future outputs. This was proudly done using the technologically advanced materials Mt SAC labs is best known for.

Whiteboard/Marker

And Excel

Summary:

To begin, our goal for a Gain of 2 was off because of realistic values for resistors. The values we used conceptually would have lead to:

Gain = -Rf/Ri = -4.7k/2.2k = -2.14

and using the actual values...

Gain = -Rf/Ri = -4.62/2.15 = -2.15

Using our actual gain vs the desired, a percent error can be obtained:

[| -2.15+2 | / -2]*100% = 7.5% deviation from desired result

(Hopefully this particular design never goes into medical equipment...)


Aside from the deviation in the output, there is an interesting behavior of op amps that should be put into consideration. Looking back at the graph of input/output it is clear to see that there is point in which the output is at a standstill. At approx. -2V (4.23V) and 2V (-3.42V) the op amp enters what is commonly known as the "saturation zone."

To further probe into this matter, when we put 3 Volts into the op amp we expected to see an output of approximately -6.45V. Instead we get a measly -3.41V, a telling product of the saturation tendencies of this particular element.