Saturday, February 25, 2012

Electronics Lab - Day 7

Lab 8-5 : Current Source

This measures how a non inverting amplifier compares as an output current source.

We found that the current of this circuit stays the same no matter how we turned the potentiometer. So it is a very stable current source that is independent of the second resistor in the circuit.


Lab 8-6 : Current to Voltage Converter

In these circuits, we were using diodes as sources of current which feed into the opAmp circuit to create a corresponding output voltage. We set this experiment up but, unfortunately, it didn't work for some reason and because Professor Berg was also unable to discover the answer to our problems we forewent this lab and moved onto the next one.


Lab 8-7 : Summing Amplifier

When we have two sources of current feeding into the input of the opAmp, the two currents will be summed at the junction. We can figure out the output voltage using V=IR where the current is the sum of the two currents. If the resistors over the two input currents are the same, then the output voltage is proportional to the sum of the input voltages.
In this experiment, we used one DC voltage source and one AC voltage source. In the output, we just saw the amplification of the AC input voltage with a DC offset.

Electronics Lab - Day 6

Today we learned all about Operational Amplifiers which just amplify the input signal.

Lab 8-1 : Open Loop Gain

We created the circuit below with a potentiometer to supply the variable resistance which allows us to vary the voltage between -12v and +12v.


We found that with a positive input voltage, the output is the maximum 12 v for the opAmp and with a negative input voltage, the output is the minimum 12 v for the opAmp.


These results imply that the gain is so high that the opAmp is maxing out its voltages no matter how small of an input voltage we put in.


Lab 8-2 : Inverting Amplifier

In order to lower the gain of the opAmp circuit so that we aren't always hitting the maximum voltage, we added negative feedback to the circuit.

When we have negative feedback in place, we have to keep in mind two golden rules:

1. The opAmp will keep the voltages at the two inputs the same.
2. The inputs draw virtually no current.

With these two rules in mind, we calculated in class that the gain between the output and input voltages would be.
In the circuit that we created, R1=1 kohm and R2=10 kohm. So we calculated that the gain should be -10. We found this to be true experimentally since Vin=1.5v and Vout=-15v.




We noticed at high frequencies the amplification is bad and that there was a phase shift between the output and input voltages.

We were also asked to measure the input and output impedances of this circuit. We measured the input impedance to be Zin = 1 kohm. For the output impedance, we added a 56 ohm load resistor and found that Vin~= Vout which implies that the output impedance of the circuit is much smaller than the 56 ohm load resistor.


Lab 8-3 : Non-Inverting Amplifier

As the name implies, this opAmp circuit does not invert the input voltage at the output as the inverting amplifier does.
Again, we used the golden rules for an opAmp circuit with negative feedback to calculate that the gain for this type of circuit is:
Again we made R1 = 1 kohm and R2 = 10 kohm and calculated our gain to be 11. Experimentally, our gain almost matches the theoretical gain. Our maximum input voltage was 0.5 v and our maximum output voltage was around 5 v which gives us a gain of 10.

We also measured the input impedance of this circuit and found it to be very high. Vin=500mV and Vout=450mV so we calculated that Zin was just very large. This is because the input is connected directly to the input of the opAmp and the impedance of the opAmp is very large. The output impedance was still very small but it seemed to be higher than that of the inverting amplifier.


Lab 8-4 : Follower

The follower circuit is basically a non inverting amplifier with R1=infinity and R2=0. This means that according to the formula for a non inverting amplifier, the gain for this circuit should be 1 and the input and output voltages should be the same.
We found that the input and output voltages were the same for this circuit.

Electronics Lab - Day 5

Lab 2-6 : Garbage Detector

We created a high pass filter in order to see the "garbage" on the regular 110v power lines. We used a transformer to reduce the voltage to a safe level and introduced that as the input voltage of the high pass filter. The input voltage looked like a clean classical sine wave but the output of the filter looked like this:


Which is all of the high frequency garbage that is sitting on top of the power line.


Lab 2-8 : Blocking Capacitor

In this section, we were trying to figure out how to add an offset to a time dependent frequency(sine wave). In order to do this, we obviously need a function generator to give us the sine wave and also a DC power source to provide the offset. However, if we connect these two power sources, they are going to "compete" for dominance of the circuit and in this case, the AC power source will "win". Therefore, we add in a blocking capacitor in this diagram:

This configuration allows the AC voltage to ride on top of the DC voltage so that we have correct output function with a DC offset.


Resistance of a Diode

We connected a 1N914 diode to an ohmmeter to measure the resistance as a function of current. As we changed the scale on it, the ohmmeter changes the amount of current that it is putting out. Smaller scales of the meter use larger currents and we found that the decreased at smaller scales. This makes sense because a diode tries to stay at a constant voltage, V=IR, so when we increase the current the resistance must drop in order to keep a constant voltage.


Lab 3-2 : Half Wave Rectifier

The question that we were trying to answer in this section was: How do we change an AC current source into a DC current source? First we built this circuit.
This circuit only allows through the positive current. This is because, in practice, diodes only let through current in one direction. When the input voltage is much lower than 0.6v, the diode has a very high resistance because it's still trying to maintain a 0.6 v drop. On the other hand when the input voltage is much higher than 0.6v, the diode has a very small resistance and therefore the voltage at output will be almost the input voltage minus the 0.6 v drop across the diode. This can be seen clearly in our resulting output voltage.




Ripple

Now we added a capacitor in parallel with the resistor. This adds an RC time lag to the circuit as the capacitor discharges meaning that the capacitor is not going to fully discharge in the time that the voltage drops below the maximum voltage. We calculated what the voltage drop would be using:
R = 2.2kohms
C = 10 uF
Vmax = 11v
and we found that the change in V = 5.8v. Which matches with our experimental results below where we estimated the change in voltage to be 5v.



Lab 3-5 : Signal Diode

We created the circuit below, which has all the components of a differentiator and a half wave rectifier.
We found that this circuit does in fact just combine the effects of a differentiator and a half wave rectifier. When we put in a square wave, the result was upward spikes of voltage where dVin/dt was positive and there were no corresponding spikes when dVin/dt were negative.



Lab 3-7 : Diode Limiter

This type of circuit limits the maximum output voltage to 0.6 volts. Because diodes only let current through in one direction, we also need to add another in the other direction, parallel to the first diode. In this way, both the positive and negative voltages are replicated with a maximum of 0.6 v and a minimum of -0.6 v.

Tuesday, February 14, 2012

Electronics Lab - Day 4 cntd.

Lab 2-4 : Low Pass Filter

At an input voltage of 4V, we figured that the maximum output voltage at the 3dB point would be 2.8V. Calculating the 3dB point using f=1/(2pi*RC) we found that f3dB = 1061 Hz and experimentally, we found that Vout = 2.8V when f=800Hz.


We were also asked the find the phase shifts for the 3dB point, at very low frequencies and at very high frequencies.

At a low frequency (f=50 Hz) we found the phase shift to be almost zero.


At the 3dB point, we measured the phase shift to be around pi/6=30 degrees. (It should be around 45 degrees).


And at a high frequency (f=10 kHz) we found that phase shift to be just about 90 degrees.

We were also asked to measure the attenuation levels at different frequencies.

f=20*f3dB = 16 kHz --> Vout = 80 mV


f=10*f3dB = 8 kHz --> Vout = 400 mV


f=4*f3dB = 3.2 kHz --> Vout = 1.84 V


f=2*f3dB = 1.6 kHz --> Vout = 1.08 V


Lab 2-5 : High Pass Filter

Because we used the same components for our high pass filter as we did for the low pass filter, the calculations for the cutoff frequency were the same where fo= 1061 Hz. We found that the frequency at which Vout = 2.8 V (which is Vin/sqrt(2)) is f = 1.2 kHz.

We also measured the attenuations at frequencies well below the cutoff frequency.

f=60 Hz --> Vout = 248 mV


f=50 Hz --> Vout = 224 mV


f=40 Hz --> Vout = 184 mV

We also measured the limiting phase shifts for the high pass filter.

At low frequencies (f=40 Hz) the phase shift was 90 degrees.


At high frequencies (f= 10 kHz) the phase shift was zero.


These limiting phase shifts are, not surprisingly, opposite of those that we found for the low pass filter.

Sunday, February 12, 2012

Electronics Lab - Day 4

Today we learned about different types of useful RC circuits. The first of these was thedifferentiator circuit which basically looks like this:


And produces an output voltage Vout=RC (dVin/dt), the derivative of the input voltage as long as the frequency of the input voltage, w, is much smaller than the time constant of the circuit, T=1/RC. (w<<1/RC).

Lab 2-2

After building an RC circuit that would give an output voltage that is the derivative of the input voltage over time, we were asked to drive this circuit with a square wave. We observed the input and output voltages with an oscilloscope:

The output voltage is consistent with what a differentiator would do in that it is zero over the square wave except for at the points when the voltage changes at which there's a positive or negative spike in the output voltage.

When we drove the circuit with a triangle wave:

The output voltage is a square wave.

And when we drove a sine wave:

The output voltage is a cosine wave. Although there is a phase shift that was explained later on in the lab.

For a DC voltage source, this circuit will present an infinite resistance because the capacitor can be thought of having an infinite frequency with a DC circuit. For an infinite frequency voltage source, this capacitor will present almost no impedance and the impedance of the circuit is just the resistance that the parallel resistor presents.

When we change the frequency so that w<<1/RC is no longer satisfied. (So that the input frequency is no longer much smaller than the time constant of the RC circuit). The output frequencies start to look odd because of the capacitor is no longer differentiating the input circuit but the capacitor is allowed to charge and discharge over time (thereby changing the impedance of the circuit overtime).


Phase Shifts - Differentiator Circuit

We learned that capacitors have a complex impedance which causes a phase shift between the input and output voltages. The complex impedance = -i/wC. As we can see, its is obviously dependent on the capacitance but also on the input frequency. From that and the formula to calculate the output voltage for a voltage divider, we find that the output frequency for this type of circuit is:


If we then plug in the w=1/RC for the input frequency we find that we should expect a 45 degree shift in the output frequency which explains the shift in our previous picture.

Note: At the 3dB point, the signal is attentuated by 1/sqrt(2). This point occurs at the cutoff frequency wo=1/RC




Monday, February 6, 2012

Electronics Lab - Day 3

Today's class was all about transistors, we added a MOSFET transistor into our circuit. We had previously found that because the logochip has such a high thevanin resistance that it was not a good power source for our little motor whereas the battery pack was an excellent power source for out motor. The problem is, that we can't program a battery pack like we can a logochip. So how can we control the motor with the logochip but power it with the battery pack? A transistor of course. So we added that in and also added in more batteries to create a 9v power source.


Now our little motor is so strong that it actually takes some muscle to stall it!

We were also asked to do a series of exercises that helped us understand how capacitors work and behave in circuits.

Lab 2-1

In this lab we're asked to verify how the voltage varies across a capacitor over time. It should rise parabolically and level out as it reaches the input voltage. We also have to verify that the time constant, the time it takes to reach around 63% of its full power, is T=RC. In the circuit that we set up, we had a 10 kohm resistor and a 0.01 uF capacitor so the time constant should be T=100 us.


Our time scale is 50us and it looks to be that the voltage rises to around 60% of its full voltage within two boxes which is on the scale of 100us which agrees with the calculated value for the time constant.

Logochip Capacitance Meter

In this section of the lab, we used an input pin of the logochip to monitor the voltage across the capacitor using the circuit below.


Since R = 10 kohm and C = 10 uF, the time constant for this circuit should be around 100 ms. In order to verify this, used this program:

It starts the timer when the capacitor has discharged to almost zero. It then records the time when the voltage reaches 63% of its full voltage. The timer reads in ms so whatever number the program outputs should be the time time constant in ms.

We found that when we ran the program, read 96 ms for our circuit which is just about what we calculated as the ideal time constant.

In order to calibrate the program so that it reads the value of the capacitor instead of the time constant, you simply have to divide the value on the timer by the resistance in the circuit. T=RC so C=T/R.

We were also asked to evaluate what happened to he time constant when we put two capacitors either in series or in parallel. For this portion of the lab we used 0.1 uF capacitors instead of 0.01 uF. With a 10kohm resistor and a 0.01 uF capacitor, the time constant was 1 ms. When we added another capacitor in parallel, the effective capacitance is essentially doubled so we expected the time constant to also double. This was verified when the picoblocks program read an output of 2 ms. When we added another capacitor in series, the effective capacitance in effectively halved so we expected the time constant to also be halved. However, the program continued to read 1 ms with this circuit. We guessed that because the picoblocks timer was just not sensitive enough to detect 0.5 ms and we verified that the time constant was indeed smaller than 1 ms by using an oscilloscope instead of the picoblocks program.

Lab 2-3

In this lab we constructed an integrator. This circuit essentially uses the properties of a capacitor to create an output voltage that is the integration over time of the input voltage. When we input a square wave into the integrator, the output voltage looks like a triangle wave.


And when we input a triangle wave, the output voltage looks like a series of parabolas.


When we drop the input frequency, the output voltage across the capacitor is allowed to rise to a value close to that of the input voltage and the circuit no longer acts like an integrator.