Wednesday, May 30, 2012

Impedance and AC Analysis

PROBLEM
We model a "real" inductor. We must include a series resistance to account for the resistance of the many turns of wire in the inductor. The impedance looking into a real inductor: Zreal = R + jwL

METHOD
We measure the inductor's "unknown" resistance with an ohmmeter. R = 7.8 ohms



We set Rext = 68 ohms, measure and record your mounted resistor. Rext(actual) = 68.5 ohms

Energize the FG. Set the frequency to be 20kHz sinusoid. Set RMS to be 5.00. Connect a DMM to the output of the FG and ensure you have 5.00 Vrms out of the FG.

Next we construct a circuit similar to the figure.
Using a DMM, measure Vin and I in.
Vin(rms) =  5.23 V
I in(rms) = 22.11 mA

Calculate the magnitude of the impedance using the voltage and current from above.
Z=V/i = 236.5 ohms

Rewrite input impedance as a complex number: R + jwL = 7.8 + 279j ohms
|Z| = 279 ohms

What is the angular frequency at which the circuit is operating?   w = 40*pi Krad/s


7.8 + 40piKL = 236.5 >> L = 1.82 mH
Consider the circuit below. Suppose our source is set to 20kHz. We wish the capacitor to cancel the inductive part of the real inductor. Calculate the value of the capacitance.
This occurs at resonance >> wL=1/wC >> C=1/(L*w^2) >> C = 28nF


Energize the scope. Connect CH1 Across the DMM. Connect CH2 to the top of the real inductor. Adjust the scope to see both waveforms. Take scope measurements at 20kHz.

Vpeak2peak(CH1) = 10 V
Vpeak2peak(CH2) = 24 V
dt = 14.5 us

phase_difference = Tx(f)(360) = 94 degrees

DATA
Frequency Vin (V) I in(A) |Z in| (ohms)
5 kHz 5.78 7.1 0.814
10 kHz 5.41 20.1 0.269
20 kHz 5.03 60.1 0.084
30 kHz 5.88 0.00 Infinite
50 kHz 8.24 0.00 Infinite



 
 
 

AC Signals

PROBLEM
Consider two signals captured in the same scope display. We find the phase difference between the two signals by measuring the time difference(tx) between corresponding parts of the two waveforms - between the positive peaks. We convert this time measurement into an angle so we need to multiply it by the angular frequency(2*pi*f) and convert the result to degrees(180/pi):

     phase_angle = tx(2pi)(f)(180/pi) = tx(f)(360)

METHOD
Set Function Generator(FG) to CH1, set the FG to produce a 10V peak-to-peak sinusoid at 1kHz.
Calculate the expected Vrms - Expected Vrms = 7.04 V
Calculate the DMM value     - Measured Vrms = 6.7 V


Turn of FG. Set Rbox to 1kOhm. We calculate the complex impedance of the capacitor where Zcap=1/2*pi*f*C >>> Zcap = 1592 ohms

We construct a circuit similar to the figure.
Connect CH1 of the scope to the FG. Connect CH2 to the top of the capacitor (between Rbox and C). Connect Rbox and C as shown. Be sure to make connections as shown. Energize the FG; connect the DMM.
DATA

Measure the peak-to-peak capacitor voltage on CH2: Vcap = 18 V , Vrms(DMM) = 6.36 V
Measure Tx from the two waveforms (Tx is time difference) -- Tx= 0.06 s
Compute the phase angle: phase_angle = 34.3 degrees

CH1 leads CH2 by phase_angle


Increase the FG frequency to 10kHz. Calculate new complex impedance of capacitor.
Zcap = 159 Ohm

Measure the peak-peak capacitor voltage on CH2: Vcap = 3.75 V
Record Vrms from DMM: Vcap(rms) =  0.89 V
Measure Tx from the two waveforms (Tx is time difference) -- Tx= 8 us
Compute the phase angle: phase_angle = 28.8 degrees


RETURN THE FG frequency to 1kHz!!! Increase Rbox to 10kOhms.
Measure the peak-peak capacitor voltage on CH2: Vcap = 1.6 V
Record Vrms from DMM: Vcap(rms) =  1.12 V
Measure Tx from the two waveforms (Tx is time difference) -- Tx= 150 us
Compute the phase angle: phase_angle = 54 degrees

Adjust Rbox until capacitor voltage is 4V peak-to-peak. Record Rbox.  --- Rbox = 4kOhms
Record Vcap(rms) from DMM. --- Vcap(rms) = 2.56 V
Measure Tx from the two waveforms (Tx is time difference) -- Tx= 130 us
Compute the phase angle: phase_angle = 46.8 degrees


Finally, vary the FG from low to high frequency and observe the impact on the capacitor voltage amplitude.

The capacitor voltage amplitude is greatest when the frequency is in the low range, and voltage amplitude is smallest at higher frequencies. This circuit is a lowpass filter. The resistor will always lead even when we adjust the frequency. At high frequencies, the two signals tend to a Tx of 10.5 us.
 

Charging/Discharing a Capacitor

PROBLEM
Design, build, and test a charge/discharge system that utilizes a 9V DC power supply, employs a charging interval of about 20s with stored energy of 2.5mJ, and then discharges that energy energy in 2s.

METHOD
We consider charging and discharging a capacitor. We will toggle a cable connected to the capacitor's "+" terminal from the CHARGE position to the DISCHARGE position. In the CHARGE position, as long as Vs > Vcap, energy is transferred to the capacitor. In the DISCHARGE position, the energy is absorbed by the resistance Rdischarge. In either case, C, Rcharge, and Rdischarge control the rate at which energy is transferred.
Additionally, we will add a leak resistance in parallel with the capacitor to model a "real" storage capacitor and not the ideal case. A circuit is constructed similar to the figure. We compute Thevenin voltage and resistance as "seen" by the capacitor for each case.

"Real" capacitor circuit
Thevenin charge circuit

Thevenin discharge circuit
We first compute the required capacitance. W=1/2CV^2 >> C=2W/V^2 >> 2*2.5/81 = 62 uF
Next, we compute the charging resistance. T=capacitive time constant. T=charge_time/num_charge_intervals =RC >> 20/5=62R >> R=4/62uF >> Rcharge = 64.8 kOhm
Now we can compute the peak current in the charge resistance and the peak power. Where, i=(Vs/R)*e^(-t/T) = 0.936 uA  & P=Vs*i=9*0.936=8.4 uW

We use a similar technique to compute the discharge resistance. T=capacitive time constant. T=charge_time/num_charge_intervals =RC >>2/5=R62uF >> Rdischarge = 6.48 kOhm.
We calculate the peak discharge current and power. V=IR>> I =V/R >> 9/6.48k = 1.389 mA, P=R*I^2 >> (6.48k)*(1.389)^2 >> P= 0.0125 W

charging
charging & discharging



Op-Amps - LM358 & AS35 - Temperature Sensor

PROBLEM
Op-amps are often used in scaling and level-shifting applications. Scaling is simply the process of multiplying a signal voltage/current by a constant in order to change its amplitude, and level-shifting is the process of adding a constant positive or negative voltage/current to a signal. This lab uses scaling and level-shifting of a circuit to process the output signal from an electronic temperature sensor so that it produces temperature readings in Fahrenheit degrees. The sensor produces an output voltage that is proportional to the ambient air temperature according to a scale factor of 10mV/C

METHODS
A circuit is constructed similar to the scaling and level-shifting circuit shown in the figure. The output voltage is converted from a 10Mv/C scale to a 10MV/F scale.

Scaling and level-shifting circuit -- Rvar is used to create the appropriate voltage at the inverting input for the level-shift


The scaling and level-shifting equation. Tf=1.8Tc+32 -- Vc = (1+R2/R1)Vc - (R2/R1)Vref

Hence, R2/R1 = .8 -- R2 = 800 Ohm, R1 = 973 Ohm

The ambient temperature in the room that day was 23C. Tf = 1.8*23 + 32 = 73.4 F


Voltage reading Vf -- 720 mV = 72 F degrees
 The percent error is calculated: absval(actual - theoretical)/theoretical*100% = (72-73.4/72)*100 = percent error = 1.9%err


Monday, April 23, 2012

Op-Amps 1

 PROBLEM: We need to couple a sensor to a processing agent. Oftentimes the output of the sensor is not optimal for direct application to your processing agent, so we insert a signal conditioning circuit. A signal conditioning circuit is required when the range of Vsensor(output sensor voltage) is too small/large, or if there is unwanted offset, or if we wish to filter out unwanted noise, or protect the micro-controller input from an unwanted over-voltage.

METHODS:
We want to increase the voltage range of the sensor. The range of Vsensor is 0-1V and 0-10V range for the micro-controller. The operation amplifier (op-amp) offers an ideal solution to the problem. We will use the LM741 op-amp (pin diagram shown in Figure 1). The current into the LM741 must be less than 1mA; additionally, the op-amp power supplies should supply no more than 30mW of power each. The circuit should be designed with standard 1/4 W resistors. The circuit is an inverting amplifier with a gain of -10 as shown in Figure 2.
Figure 1: LM741 Pin Diagram (NC= NO CONNECTION)


We represent the sensor that produces a voltage which varies between 0V and 1V. We create a voltage divider to synthesize Vin. If Rx and Ry are much smaller than Ri, then the inverting amplifier will not appreciably "load" the divider circuit.

Calculations:
We calculate Ri using Ohm's law and the conditions for the sensor voltage and current into op-amp. 1V=Ri(1mA) >> Ri = 1kOhm
We can determine the feedback resistor Rf using the proportionality of the input and output voltages of the op-amp; we assume the op-amp to be ideal. Thus,
Vout=Rf/Ri*(Vin) >> Rf = Vout/Vin*(Ri) -- Vout=10V, Vin=1V, Ri=1kOhm >> Rf= 10kOhm

To determine Rx, we assume that we want it to be a standard 1/4 W resistor operating at half its rated power. The worst case across Rx occurs when Ry is 0. Thus,
PRx=(Vs^2)/Rx >> Rx=(Vs^2)/PRx >> PRx(Max power dissiapted by Rx)= 1/4W*1/2=1/8 W, Vs = 6V and 12 V

Accordingly, Rx = 288 Ohm, 1152 Ohm for Vs = 6V, 12 V
For Ry we use a voltage divider assuming that the op-amp does not load the sensor circuit.

Vin=(Ry*Vs)/(Rx+Ry) >> Ry = 57.6 Ohm, 26.2 Ohm for Vs = 6V, 12V

We determine the Thevenin Equivalent of the divider looking back to the left of Ri.
Where Rth = Rx + Ry and Vs = 6 V, 12 V respectively.



We see that the the Thevenin resistance is not at least 20 times less than the resistance value for Ri = 1kOhm. To achieve the output of 1V across Ri, we use a potentiometer for Ry and adjust it until we reach the desired voltage value.

DATA: 


Component Data Table

Component Nominal Value Measured Value Power/Current Rating
Ri 1 kOhm 0.96 kOhms 1/8 W
Rf 10 kOhm 10.09 kOhms 1/8 W
Rx 288/1152 Ohm 287/1152 Ohms 1/8 W
Ry 57.6/26.2 Ohm 58/27 Ohms 1 W
V1 6/12 V 6.06/12.02 V 2 Amp
V2 6/12 V 6.06/12.02 V 2 Amp


6 V Power Supplies Data Table

Vin Vout Gain Vri Iri VRf
0.00 V 0.07 V 0.00 8.9 mV 9.27 uA 90.1 mV
0.25 V 2.70 V 10.80 264 mV 0.275 mA 2.66 V
0.50 V 4.02 V 8.04 V 0.39 V 0.406 mA 4.12 V
0.75 V 4.02 V 5.36 V 0.42 V 0.438 mA 4.36 V
1.00 V 4.02 V 4.02 V 0.44 V 0.458 mA 4.62 V


12 V Power Supplies Data Table

Vin Vout Gain Vri Iri VRf
0.00 V 0.00 V 0 4.40 mV 4.58 uA 52 mV
0.25 V 2.60 V 10.4 0.25 V 0.26 mA 2.73 V
0.50 V 5.20 V 10.4 0.54 V 0.56 mA 5.61 V
0.75 V 7.70 V 10.27 0.75 V 0.78 mA 7.76 V
1.00 V 9.80 V 9.8 0.95 V 0.99 mA 9.85 V


We can see the saturation of the op-amp from the output voltages of the 6V Power Supply Data Table; hence,  the reasoning for the switching the experiment to use a 12 V power supply.

Next we insert an ammeter in series with the +/-Vcc inputs on the op-amp; we measure the current leaving each power supply, Iv1, Iv2 respectively.
Iv1 = 0.503 mA
Iv2 = 1.48 mA

Lastly we calculate the power deliver by each of the power supplies, V1 & V2. Where, V1=V2=12.02V,   Pv1= Iv1*(V1),   Pv2 =Iv2*(V2)

Pv1 = 6.05 mW
Pv2 = 17.7 mW

QUESTIONS
-If we assume the currents into the non-inverting and inverting terminals are zero, based on power supply currents and calculated current through Rf, show that KCL is satisfied for condition, Vin = 1.00V.
        -Solution:

-Do we satisfy the power supply constraint to supply no more than 30mW each? If we wanted to reduce the power drawn from the power supplies even more, how could we modify our design to accomplish this without changing the amplifier gain?


Monday, April 2, 2012

Pspice

Today we did a Pspice lab. We needed to find the Thevenin and Norton Equivalent for a circuit. Graphs were used to determine the values.

Rth = Rn = 3.33 ohms
Vth = 10 V
iN = 3 A
Pmax occurs when RL is less than 0.5 kohms







Thevinin Equivalents

PROBLEM
 Suppose you have two power supplies, and multiple loads. Given a minimum acceptable voltage across a load, determine the smallest equivalent load resistance that can be successfully used, and what is the power consumed. What voltage will exist across the terminals of the load if we remove it (open circuit/highest voltage/Voc) and what short-circuit current will flow if we replace the load by a short (isc/highest current)?

METHOD
 We model a system similar to Figure 1:
Figure 1
We want to reduce the circuit to it's Thevenin Equivalent consisting of a voltage source and a resistor -- we want to "thevenize" the left-hand side of the circuit. We remove RL2 from the circuit to find Voc=Vx=Vth.
Vs1=Vs2= 9 V
We use nodal analysis at node x to find Vx, which results in the following nodal equation:
Vx/680 + (Vx-9)/100 + (Vx-9)/39 = 0  >> Vx = 8.659 V = Voc = Vth

We find Rth two ways:
We first find Rth using equivalent resistances: Rth = Rc3 + 1/(1/Rc1 +1/Rc2) = 66 ohms

Additionally, we can find Vy using nodal analysis. Next we find isc = Vy/Rc3; finally, we can find Rth = Voc/isc= 66ohms
The nodal equation for Vy:

(Vy-9)/39 + (Vy-9)/100 + Vy/680 + Vy/39 = 0 >> Vy = 5.11 V >> isc = 5.11/39 = 0.131 A
Thus, Rth = 8.659/0.131 = 66 ohms

Finally, we have our Thevenin equivalent circuit:
Vth = 8.659 V      Rth = 66 ohms
Given that the minimum load across Vload is 8 V, we can find the smallest permissible value for RL2 using a voltage divider. We also find the isc using Ohm's Law, and the open circuit voltage by inspection.

Vload=Vth*RL2/(RL2+Rth) >> RL2 = Rth*Vload/(Vth-Vload) = 66*8/(8.659-8) = 801 ohms

isc = vload/RL2 = 8/801= 9.99 mA

Voc = Vth = 8.659 V

DATA
 Next, we build the Thevenin equivalent circuit to find the measured voltage across the load, Vload and the open current voltage Voc. Percent error is calculated.
Components Data Table

Component Nominal Value Measured Value Power/Current Rating
Rth 66 ohms 66.5 ohms 0.3 W
RL2,min 825 ohms 826 ohms 0.3 W
Vth 8.659 8.71 10.0 A

Thevenin Equivalent Experimental Data Table
Configuration Theoretical Value Measured Value Percent Error
RL2=RL2,min 8.00 V 8.04 V 0.50%
RL2=infinity 8.569 V 8.54 V 0.34%

Next, we build the system in Figure 1 on the breadboard and again measure the voltage across the load, Vload and the open current voltage Voc. We also calculate the power supplied to/absorbed by RL2 when RL2=Rth. Percent error is calculated.
Components Data Table

Component Nominal Value Measured Value Power/Current Rating
Rc1 100 ohms 100. 3 ohms 1/8 W
Rc2 39 ohms 38.1 ohms 1/8 W
Rc3 39 ohms 39.1 ohms 1/8 W
RL1 680 ohms 679 ohms 1/4 W
Vs1 9 V 8.96 V 10.0 A
Vs2 9 V 9.05 V 10.0 A

Figure 1 Circuit Experimental Data Table

Configuration Theoretical Value Measured Value Percent Error
RL2=RL2,min 8.00 V 7.94 V 0.75%
RL2=infinity 8.569 V 8.64 V 0.83%

Maximum power to RL2 when RL2=Rth:
P=((Vth)^2)/4Rth >> (8.659)^2/4*66 = .284 W
Thus, Pmax = 0.284

Finally, we verify the maximum power by adjusting values of RL2 and measuring the load voltage each time and calculating power, where Pload = ((Vload^2))/R

Power Data Table

Configuration Vload Pload
RL2=0.5Rth 2.75 V 0.229 W
RL2=Rth 4.14 V 0.259 W
RL2=2Rth 5.57 V 0.235 W