Wednesday, April 26, 2017

Inverting Differentiator

Today we went over differentiators and integrators. They are based on the inverting amplifier. A differentiator circuit can be obtained by replacing the feedback resistor with an inductor or replacing the input resistor with a capacitor. An integrator circuit can be obtained by replacing the feedback resistor with a capacitor or replacing the input resistor with an inductor. Since inductors are expensive and rarely used, we only use capacitor to implement differentiator or integrator.

Then the concept of singularity is introduced. There are three common singularity functions. They are unit step function, unit impulse function and unit ramp function. They can be used to represent step response.

We did a lab on inverting differentiator. Here is a schematic of the circuit
Here is the setup of the circuit

We measured the experimental resistance of the resistor

We applied three different voltage inputs to the circuit. They are 100 Hz sinusoid, 250 Hz sinusoid, and 500 Hz sinusoid. We observed the output voltage on the oscilloscope

100 Hz

250 Hz

500 Hz
The phase shift on the graph is exactly π/2, which corresponds to the phase difference between a sinusoidal function and its derivative. We also compared the amplitude of the output voltage curve and the theoretical output.

100 Hz
ExperimentalTheoreticalPercent Error
A (V)1.001.000.00%
f (Hz)100.00100.000.00%
ω (rad/s)628.32628.320.00%
R (Ω)681.00680.000.15%
C (μF)0.961.004.00%
τ (ms)0.650.683.86%
Vout (V)0.430.430.64%

250 Hz
ExperimentalTheoreticalPercent Error
A (V)1.001.000.00%
f (Hz)250.00250.000.00%
ω (rad/s)1570.801570.800.00%
R (Ω)681.00680.000.15%
C (μF)0.961.004.00%
τ (ms)0.650.683.86%
Vout (V)1.071.070.17%

500 Hz
ExperimentalTheoreticalPercent Error
A (V)1.001.000.00%
f (Hz)500.00500.000.00%
ω (rad/s)3141.593141.590.00%
R (Ω)681.00680.000.15%
C (μF)0.961.004.00%
τ (ms)0.650.683.86%
Vout (V)2.122.140.76%

Summary: Differentiators and integrators can be implemented by using capacitors and resistors. It can be used to shift the phase of a sinusoidal input. Additionally, differentiators and integrators are also operational amplifiers circuits. It shows that operational amplifiers can not only be used to implement basic operations such as addition, subtraction, multiplication and division, but also calculus operations such as differentiation and integration.

Passive RC Circuit Natural Response & Passive RL Circuit Natural Response

Today we went over the charging and discharging process of capacitors and inductors. Theoretically speaking, it takes infinite time for a capacitor or inductor to charge or discharge. In engineering world, we consider a capacitor or inductor as completely discharged after 5 time constants. After five time constants, the remaining energy is less than 1%. In other words, we can measure the time it takes to almost drop to 0 energy and divide it by 5 to get the time constant. We apply this method in the following two labs

Passive RC Circuit Natural Response

This lab examines the natural response of an RC circuit. we use manual switch and square wave voltage source to create the natural response.

Here is a schematic of the circuit with theoretical values

We observed the voltage response on the oscilloscope window

We compared the values from the oscilloscope and the theoretical values.
ExperimentalTheoreticalPercent Error
Charging Time (ms)79.9765.13%
Discharging Time (ms)242.62420.25%

Then we applied a square wave instead of manually switching it.

ExperimentalTheoreticalPercent Error
Charging Time (ms)74.03762.59%
Discharging Time (ms)273.724213.10%
Passive RL Circuit Natural Response

This lab uses an inductor instead of a capacitor. The other parts of the circuit stay the same. 

Here is a schematic of the circuit

Here is the circuit setup

We adjust the frequency to get the time constant.

Summary: The natural response of capacitors and inductors indicates that there is a maximum switching frequency. Since a capacitor or inductor in a circuit takes a certain time to drop its voltage or current to a very small amount, switching to fast would cause the a capacitor or inductor to start discharging before it is fully charged or start charging before it is fully discharged. We normally consider a capacitor or inductor is fully charged or discharged after 5 time constants. The maximum switching frequency should be less than its reciprocal.

Friday, April 14, 2017

Capacitor Voltage-current Relations & Inductor Voltage-current Relations

Today we learned about different kinds of capacitors and inductors. First let's see how dangerous being an electrical engineer can be.
The explosion was caused by a electrolytic capacitor. Remember, If you connect a electrolytic capacitor with high voltage and wrong polarity, the outcome is fantastic!

Capacitor Voltage-current Relations
Back to the lab, we set up an RC circuit and applied different voltage patterns to it. Our prediction for sinusoidal wave and triangular wave is displayed in the following picture:

We measured the resistor and the capacitor


We applied 1kHz sinusoidal wave, 2kHz sinusoidal wave and 100Hz triangular wave to the circuit and used oscilloscope in WaveGen to plot the graphs.

1kHz sinusoidal

2kHz sinusoidal

100Hz triangular

Inductor Voltage-current Relations
Then we replaced the capacitor from the previous lab with an inductor. Everything else is still the same as the previous lab. We applied 1kHz sinusoidal and 2kHz sinusoidal voltage input and used the oscilloscope in WaveGen to plot the graphs.

1kHz sinusoidal

2kHz sinusoidal

Summary: Capacitors and inductors are useful elements in circuit. They are relatively big comparing to other electronic components. Capacitor is a double plate (usually circular) separated by a layer of dielectric. Inductor is a coil of wire (solenoid). The current in RC circuit is i = 1/RC *  idt and the current in LC circuit is i = L/C * di/dt.


Thursday, April 13, 2017

Temperature Measurement System Design



Today we have a concept of combination of different operating amplifiers. A group of different types of operating amplifiers connected together is called cascaded operational amplifiers. In this lab, we use a Wheatstone bridge and a difference amplifier to measure temperature. The change in temperature results in the change in resistance. Wheatstone bridge converts the change in resistance to the change in voltage. The difference amplifier will amplify the voltage change to a specific output voltage.

We designed a circuit as following:


First we setup the Wheatstone Bridge circuit without operational amplifier portion. In order to balance the bridge, we add a potentiometer in series with one of the 10 KΩ resistor. We tune it to a specific point when the voltage between the bridge is zero in room temperature.

ExperimentalTheoreticalPercent Error
R (kΩ)9.8102.00%
Rth low (kΩ)7.1572.14%
Rth high (kΩ)11.741017.40%
ΔR (kΩ)4.59353.00%
Vin Low (V)00N/A
Vin High (V)0.5570.37548.53%
Here is a video of the Wheatstone Bridge

Then we add the difference amplifier into the circuit and form our final configuration
ExperimentalTheoreticalPercent Error
R1 (kΩ)9.8102.00%
R2 (kΩ)56.2560.36%
R3 (kΩ)9.8102.00%
R4 (kΩ)56.2560.36%
Vin Low (V)00N/A
Vin High (V)0.5570.37548.53%
Vout Low (V)00N/A
Vout High (V)2.12.10.00%
 Here is a video of the entire system
It performs as we expected. The voltage change due to temperature change is successfully amplified by the difference amplifier.

Summary: Wheatstone Bridge is a convenient mechanism that converts a resistance change to a voltage change. The drawback of Wheatstone Bridge design is that it requires three resistors with the same resistance as the changing resistor. We also have to balance the bridge before we take any measurement.

Cascaded Operational Amplifier shows how we can do composite mathematical operations. The basic building blocks are inverting amplifier, non-inverting amplifier, voltage follower, summer and difference amplifier. By applying different kinds of operational amplifiers, we can combine different operations in a expression and use a circuit to represent it. It shows the potential of using analog circuit to make a calculator. Instrumentation Amplifier is a commonly used cascaded operational amplifier. The instrumentation amplifier is an extension of the difference amplifier in that it amplifies the difference between its input signals.

Monday, April 10, 2017

Summing Amplifier & Difference Amplifier

Last week we learned how operational amplifier can be used to perform multiplication. We are able to use it for addition and subtraction also. By connecting multiple voltage inputs in parallel to the same input, we can obtain the sum of two input voltages with a gain factor on the output voltage. By connecting voltage inputs to different input, we can obtain the difference of two input voltages with a gain factor on the output voltage.

Summing Amplifier
Here is a schematic of the circuit

The completed circuit in shown in the following picture 

 After we finished the circuit, we measured the output voltage when both input voltages are 5V
The output turns out to be the negative sum of the two input voltages. It's the sum of two voltages without any gain because R3 is the same as R1 and R2. The output is negative because the two voltages are connected to inverted input.

Then we keep Vb as constant and try different values for Va. The percent error of each value is relatively small except for the ones at saturation or undefined.
Va (V)Vb (V)Experimental Vout (V)Theoretical Vout (V)Percent Error
-4
1
2.9930.33%
-20.9911.00%
-100N/A
0-0.96-14.00%
1-1.96-22.00%
2-2.96-31.33%
3-3.48-4Saturated
5-3.47-6Saturated

Difference Amplifier
We determine that Vout = 2(Vb-Va) since the Vb is connected to non-inverting input and Va is connected to inverting input. The gain factor is 2 because R2 and R4 have 2 times the resistances of R1 and R3

Here is the schematic of the lab. We chose R1 = R3 = 10kΩ, R2 = R4 = 20kΩ.

Here is the setup of the completed circuit

We set Vb to 5V and Va to -5V. The output voltage turns out to be 19.86V, which matches our assumption.

We set Vb = 1V and test Va with different voltages.
V1 (V)V2 (V)Vin=V2-V1 (V)Experimental Vout (V)Theoretical Vout (V)Percent Error
-4
1
54.2910Saturated
-234.296Saturated
-123.9641.00%
011.9821.00%
100.000N/A
3-2-3.50-4Saturated
5-4-3.49-8Saturated
Then we set Vb = -1V and test Va with different voltages.
V1 (V)V2 (V)Vin=V2-V1 (V)Experimental Vout (V)Theoretical Vout (V)Percent Error
-4
-1
34.296Saturated
-211.9920.50%
-100.000N/A
0-1-1.97-21.50%
1-2-3.52-4Saturated
3-4-3.5-8Saturated
5-6-3.5-12Saturated
The percent error of each value is relatively small except for the ones at saturation or undefined.

Summary: Summing Amplifiers and Difference Amplifiers are ways to connect operational amplifiers in order to perform addition and subtraction. Both of them are scaled by the ratio of the voltages as regular operational amplifier circuits. For Summing Amplifiers, the voltage inputs are connected to parallel. If they all go to the inverting input, the output voltage would be negative. For Difference Amplifiers, we connect to voltage inputs to both inverting input and non-inverting input. The ones that are connected to the non-inverting inputs will be subtracted by the ones connected to the inverting input when we calculate the output voltage. The output voltage always follows the pattern of addition and subtraction until they reach saturation.