Thursday, June 14, 2012

Freemat Part II

#1,2,3

#4


AC Signals

The analyzation of AC circuit is a very big and important part of electrical engineering. One way to solve for unknowns in AC circuit is using differential equations, however this method could be very time consuming and open to making errors. As a result using phasor analysis for AC circuit has become very popular because of its simplicity compare to differential equation. At first this method might seem a little confusing to beginners but after a while it will get easier and eventually would be preferred over other methods.
In this lab while trying to learn about different aspects of a simple RC circuit, we tried to solve problems using phasors.
First we connected our function generator(FG) to channel 1 of our oscilloscope(O-Scope) and set the FG for a 10V peak to peak sinusoid at 1kHz. With screen readings of 2V per division the Vrms became 3.354 V. Then we connected the FG to DMM to measure VAC and Vrms became 3.3V. The 3.3 V shown by the meter is off because these meters are not designed to operate in high frequencies.
If we were to connect a 100 nF capacitor to this circuit, its impedance would be -1592jΩ.
After the calculations we constructed the above circuit.
Vcap, peak_peak=8.2V
Vcap,rms calculated = 2.9 V
Vcap,rms measured = 2.78 V
In this case values are close since we are not using very high voltages.
tx is the time difference between the two waveforms.
tx=83.78 μs
Φ is the phase angle between the two wave form and it can be obtained using Φ=2πft=0.526 rad or 30.16 degrees.
The following is a graph of the two wave form.
tx had to be small enough to place the angle between 0 and 2π. so we set 2πft equal to 2π and 0 which gave us time scale between 0 and 1 ms.


 For the next part of the experiment we increased the FG frequency to 10kHz. This brought down the capacitor impedance by a factor of 10 to -152.9kΩ, which in turn changed the Vcap, peak_peak to 1.68V.
Vcap,rms calculated = 0.6 V
Vcap,rms measured = 0.429 V
this shows as we increase the frequency the DMM proves to be less efficient.
tx=22.16 μs
Φ=1.39 rad or 79.8 degrees


This graph clearly shows that the offset has increased.
Next we brought the frequency back to 1kHz but increased the resistor box to 10kΩ.
Vcap, peak_peak=1.69V
Vcap,rms calculated = 0.597 V
Vcap,rms measured = 0.6V
since we are back at the low frequency DMM measures accurately.
tx=216.22 μs

Φ=1.36 rad or 77.84 degrees
Next we toggled the value of the resistor box to get exactly 4V peak to peak.
For that to happen the value was 4kΩ.

Vcap, peak_peak=4V
Vcap,rms calculated = 1.414 V
Vcap,rms measured = 1.4 V
tx=183.78 μs 
Φ=1.155 rad or 66.16 degrees
As we went from lower to higher frequencies, the capacitor voltage amplitude decreased. So this current circuit would be more efficient as a low-pass filter since for high frequencies it does not create big enough voltages. As we increase the frequency the phase angle between the waveforms increases. 

Capacitor Charging and Discharging

We just learned that capacitors are electrical components that can store energy. They have the advantage over batteries in a way that they allow rapid extraction of energy. Thus making them very useful in places that a big amount of energy is needed to be delivered in a short amount of time.
To understand how a capacitor works first we went over a theoretical model of a capacitor circuit and then we conduct an experiment observing the capacitor behavior.
In the following circuit when switch is in the left position the capacitor stores energy delivered by the battery. later after switching to the right position, the capacitor delivers its energy to the resistor.
Capacitor is Charging 

Capacitor is Discharging
In first position the equation governing voltages is:
And the equation for the second part is:
solutions for these two equations are as follow:
In both cases current follows the ohm's law.
However these theory assume an ideal capacitor. A real capacitor loses energy due to contact losses and also leakage. In our experiment we ignore the contact losses since they are minimal but leakage we have to model as a parallel resistor.
As the equation show in order to control the charge or dischargee rate we have to change the values for Rcharge and Rdischarge. The bigger these two the bigger the rate will be.
For the lab we were asked to design a circuit in which a 9V DC voltage supply charges a capacitor in 20 seconds with total energy delivered of 2.5 mJ and then discharges completely in 2 seconds.
For our circuit if we assume an ideal capacitor, we can obtain the capacitance by using the energy formula. Assuming VC is 9V that means C=62.7μF.
It takes 4.6≈5 time constants for the capacitor to charge to 99% of 9V. Using this value and the equation for tau=4, Rcharge becomes 64.8 kΩ.Following the same procedure we obtain Rdischarge=6.48 kΩ.
Dividing VC by the Rcharge we see that the maximum current becomes 13.9 mA and Pmax=1.25 mW.
Repeating the same method yields that max discharge current  is 1.39 mA and 
Pmax=0.0125 W. Neither is big enough for the resistance box to handle.
Here is a picture of our setup:

In the actual experiment since we no longer could assume that the capacitor is ideal, we started with values calculated theoretically. However we observed that the charge and discharge times do not match the 20 and 2 seconds accordingly. As a result we recalculated the value for the capacitor but this time including the Rleak. C=64.5 μF. From there we calculated the values for Rleak and Vf which is the maximum charged voltage of the capacitor. 
Vf=8.8 V
Rleak=0.872 MΩ
with these values the charge and discharge times are 22.15s and 2.3 s respectively. 
The capacitor discharges in 2.3 s. This is due to the fact that we made some simplifying assumption like getting rid of contact losses and ignoring resistance in wires and the scope, also the fact that the meters might not be operating perfectly.
Vth for charging period is equal to Vc which was 8.8 V.
Vth in discharging mode is equal to 0 for absence of any power supply. and Rth is combination of Rleak and Rdischarge which is 6.432 kΩ.
As stated before charge and discharge times are 22.15s and 2.3 s respectively. Using these values we obtain tau to be 4.3. However in initial calculation we found that it takes 4.6 time steps to reach 99% of maximum charge but we rounded this number to 5. This might be the reason why we have a slightly different tau.

The above graphs are drawn in Freemat using the values measured in the circuit.

Op-Amp 1 and Temperature Converter combo pack (2 blogs in 1)

An Operational amplifier is a very useful electronic piece that is used in many different applications of electrical circuit. In this lab we tried to use both amplifying and level shifting aspect of op-amps. We used a LM-741 to amplify temperature readings of the environment in 10mV/C and then do a level shift to convert this value to corresponding degree in Fahrenheit.
Following is the internal block diagram of LM-741.
Since we have to amplify the analog signals received by the temperature probe by a factor of 1.8 and also a negative output is not desired, we chose to use the non-inverting input of the circuit which is at leg 3 of the op-amp.
Below is a schematic of a simple non-inverting op-amp.


The gain in such op-amps is: A=(1+Rf/Ri)

However before approaching the temperature problem, to get a better understanding of the circuit design and operation we just tried to construct a circuit with a gain of 10. Later we used the experience to address the requirements for the temperature converter.
For the first part the design agreed on in the group was the following:


The combination of the 9k and 1k ohm resistors according to the formula should give us the gain of 10.
A=(1+9/1)=10
In this setup the left block with the 5 volt battery supply represents the sensor which in this case is just a voltage divider to ensure that the current limitation is met.
To construct the circuit these components were used:


After constructing the circuit the measurements read:
The gain error percentage for most tries is less than 5%
after this we were ready to change some values in components in order to achieve the gain of 1.8.
According to equations given, TF=1.8TC+32.
Translation of this formula to something achievable by circuit element is:
Where 1+R2/R1 is the gain which has to be equal to 1.8. VC is the output voltage of AS35, the temperature probe, also input of the non-inverting op-amp. Vref is chosen in a way that after multiplying by R2/R1 result would be 32.
We kept our R2 as 1k ohm as a result to get a ratio of 0.8 from R2/R1,  R2 had to be 800 ohm.
As for the Vref we used 0.4V since 0.4*0.8 gave us 0.32.


To gain the 800 ohm resistance we used a resistor box.  


the room temperature was about 23 degrees and reading on the meter showed 0.71
which corresponds to the 72 degree Fahrenheit.