Thursday, April 27, 2017

Day fifteen - Inverting Differentiator 4/25/2017

Hello guys, today we briefly talked about integrator and differentiator. They are some variations of inverting op-amp.

After that, we talked about the step function, impulse function, and ramp function.
For simplification, impulse is the derivative of step function and ramp is the integration of step function.


Step function is called step function because it is either 0 or 1. (of course can multiply something)
Impulse function is called impulse function because it is approaching infinity when the step function suddenly put the voltage from 0 to 1.
Ramp function is called ramp function because the voltage is constant.

Pre-Lab

This is our pre-lab result.

Here is the schematic and the actual resistance.

Result


This is with 100hz

This is with 250 hz

This is with 500 hz

Here is the result showing the value.

Summary:
Today lesson, I learned about the step, impulse, and ramp function which can be applied to real circumstances when there are sudden change. I also learned how to implement a differentiator, and the result is very reliable comparing to the measured value.

Tuesday, April 18, 2017

Day fourteen - RC and RL 4/18/2017

Hey guys, today we talked about two first-order circuits, RC and RL circuits.

There are two ways of exciting the RC and RL circuits. The first method is by the source-free circuit and the second method is by independent sources.

The source-free circuit is triggered when the dc source is suddenly disconnected.
When applying source-free circuit to the RC and RL circuit, a response called natural response will occur, and this response is characterized by the initial energy stored and the physical characteristics of the circuit without being affected by the external voltage or current source.

It turns out that the voltage in both RC and RL circuits triggered by the source-free circuit will behave like exponential decay equations.



LAB - Passive RC Circuit Natural Response


Pre-Lab


Here is the schematic of the circuit I implemented.

Using the given values of resistors, we calculated that the initial voltage of the capacitor is       
v = 5/(1k+2.2k)*(2.2k) = 3.4375volt and the initial time constant is RC = (2.2k)(22*10^-6) = 0.484s

Result
Actual Resistance values are 0.977k for 1k and 2.16k for 2.2k resistors.
However, we are not able to measure the value of the capacitor.


This is our result from part 2(a), and we measured with a 3.454volt at the peak. If we compare this value to our calculation using the actual values, the difference is only 3.454 - 3.442 = 0.011volt which is like smaller than 1% of percent error.
Our measured time constant is measured by assuming the voltage will decrease 99% of the original voltage, so we measured the time of voltage dropping from 3.454V to 33.97mV, and takes this time as 5RC, then we get 27.58ms.
Comparing to our calculated value of 5RC = 0.2376s, the percent error is 16%, without knowing the actual value of the capacitor, the percent error might still verify the voltage difference of natural response.


This is our result from 2(b). Our measured values of initial voltage = 3.494volt, and our calculated values using actual values is v = 3.442volt, by comparing them, we get 1.5% error. This error is acceptable because every circuit component is not perfect, there can be some voltage leak on each component. Similar to 2(a), we get the time of 5RC and compare it with calculated value.
Calculated 5RC = 5(0.014799) = 0.073995.
Approximate measured 5RC = 81.58ms.
Comparing both values, we have 10% error, and this should be considered as successful verification
because the measured value is an approximation, and this approximation can apply to all experiment today we have done.

LAB - Passive RL Circuit Natural Response

Pre-Lab
The initial current is I = 5/1k = 5*10^-3A because the inductor is simply a short-circuit to a dc. The time constant L/R = (0.001H)(2.2k) = 4.5454*10^-7s
Actual resistance values of resistors are 0.977k (R1) and 2.16k (R2) ohms.

Result

This is the result of part 2(a). 

This should be the result of part 2(b); however, we are unable to collect the actual data of this experiment because my computer shut down after I got the data. This lab will be redo.

Summary:
From today lecture and experiment, I learned that the natural response of both RC and RL circuits will undergo exponential decay, and when the time is 5(time constant), the value will be 0.01% of the original value, so we consider time constant = 5 as all energy is used. One important point to remind ourselves is that on a dc circuit, the capacitor is a open circuit and the inductor is a short circuit.

Day Thirteen - Capacitor Voltage-current Relations and Inductor Voltage-current Relations 4/13/2017

Today, we talked about two more basic component in electrical engineering Capacitors and Inductors.
Capacitors are to store energy (electrical) and oppose any abrupt change in voltage while inductors are to store energy (magnetic) and oppose any abrupt change in current. It is an important point to show that both capacitors and inductors are frequency sensitive.

Note: Capacitors can also be used as differentiator and integrator op-amps, and inductors are not useful tool to filter out because it has significant resistance.

Capacitive Reactance - It is the capacitor resistive value varying with applied frequency.

LAB - Capacitor Voltage-Current Relations:

Pre-Lab

This picture is our prediction of how the graph of capacitor voltage might look like with sinusoidal and triangular waves.

Lab Result
This one is the result for the sinusoidal input voltage with frequency = 1kHz, amplitude = 2V showing the value of the current.

This one is the result for the sinusoidal input voltage with frequency = 2kHz, amplitude = 2V
showing the value of the current.


This one is the result for the triangular input voltage with frequency = 100Hz, amplitude = 4V
showing the value of the current.


LAB - Inductor Voltage-Current Relations:

The prediction graph will be similar to the prediction graph in the capacitor lab.

Lab Result
This one is the result for the sinusoidal input voltage with frequency = 1kHz, amplitude = 2V showing the value of the current.
This one is the result for the sinusoidal input voltage with frequency = 2kHz, amplitude = 2V showing the value of the current.

Summary:
Today, we learned about the relations of capacitor and inductor with voltage and current.
We can see that as the applied voltage to a capacitor is a sinosidal wave, the current will also be sinosidal because of this equation: i = C (dv/dt). Similar to the capacitor, when the applied voltage to a inductor is a sinosidal wave, the current will also be sinosidal because of this equation: v = L(di/dt).


Wednesday, April 12, 2017

Day Twelve - Temperature Measurement System Design with Wheatstone Bridge Circuits 4/11/2017

Today, we talked more about on op-amps. After introducing almost all types of op-amp, we started to analyse a circuit with multiple op-amps (cascaded op-amps).

One simple rule for the cascaded op-amps is the total gain of the cascaded op-amps is the multiply of the gains of all independent op-amps.
eg. first one has A1, second one has A2, third one has A3, then the total gain of the cascaded is A(total) = A1*A2*A3.

It is critical to remember that nodal analysis is a useful tool on op-amps analysis.

Let's review the equations for summing and differential op-amps.
This is for summing, note that there is a negative because it is a variable of inverting op-amps.

This is for differential, note that the second equation must be satisfied for difference op-amps. 
V2 is the voltage supply where supplying the (+) terminal of the input.
V1 is the voltage supply where supply the (-) terminal of the input.

Then we talked about Digital to Analog Converter, which has a intuitive sense on how computer software sending 0 or 1 to operate.
Digital is 0 or 1, and we want to transfer them into a range values.

After that, we talked about instrumentation amplifier.
These are the schematic and equation for instrumentation amplifier.
Note that this amplifier is just a combination of three amplifiers. It seems like a combination of two non-inverting and one differential amplifiers.
The purpose of the instrumentation amplifier is to simplify the changing of the gain. For example, R4 is the Rgain, R3 = R1 = R2, and by varying the values of R4, we can easily change the overall gain. 

Lab:
Part One - Balancing the Wheatstone Bridge
In order to design our temperature measurement system, we have to build a circuit which has zero voltage output at normal condition and has non-zero voltage output at abnormal condition(changing resistance). This circuit comes out as the Wheatstone Bridge.
Here is the sketch of the circuit to convert resistance variation to voltage variation.
Note R1 is the potentiometer that will change to get the balance, and Rnom is the variable resistance sensor.

During room temperature, the output voltage is 0V, and the output voltage is 1.05V with the temperature of human.
                                    
Part Two - Applying to Difference Amplifier Design
This is the schematic we draw for the whole circuit, and we want a gain of 5.333
Actual values: R2 = 56.1k, R1 = 8.25k, R2 = 8.75k and R1 = 55.8k ohms.
From our measurement, the range of the amplified voltage output is from 0V with room temperature to 4.12V with human temperature.

This is a video of the entire system working.




Summary and Discussion:
From this lab, we learned that the op-amps can be used to enlarge the output voltage of a small device which only has a small voltage output, for example, the temperature measurement system without using op-amps. Using op-amps in real life can give the system a more obvious increase of voltage, and thus a more accurate result for any measurement system. However, from our experiment, the actual voltage gain is not necessary the same as the calculation because there are always +VCC,         -VCC, and offset voltage of the device affecting the voltage output.

Monday, April 10, 2017

Day Eleven - Summing Amplifier and Difference (Differential) Amplifier - 4/6/17

Hello, today we continued our topic on op-amp. We revisited some materials on inverting and non-inverting amplifiers and talked more on other types of amplifier, for examples, unity buffer, summing, and difference amplifier.

Note that both inverting and non-inverting amplifier only depend on the external resistance.
Top is for inverting. Bottom is for non-inverting.

For unity buffer amplifier, the purpose of this amplifier is to keep the voltage constant while increasing the output current.


For summing amplifier, which is a variation of inverting amplifier, the purpose of this amplifier is to perform summation of input voltages.

For difference amplifier, the purpose of this amplifier is to perform subtraction of input voltages.

LAB - Summing Amplifier

Design:
Since we need Vout = Va + Vb, R1 must be equal to R3 in order to get Vout = -(Va+Vb).
The actual resistance for R1,R2,R3 we used are 6.73k, 6.67k, and 6.71k ohms. 


Result: 
Using the V- as -5V, V+ as +5V, 1V for one of the input and varying another input voltage, we measured the output voltage as:

Comparing the calculated and measured values of the output voltages, we have exactly almost the same result. Note that the only inaccurate result is found at the output voltage exceeded the saturation voltage. At that point of output voltage, the result is not reliable because the voltage has met the maximum or minimum output. We only consider the linear part for the operation. 

LAB - Difference Amplifier

Design:

Differential Amplifier is also called as a difference amplifier because it receives both the voltage inputs from positive terminal and negative terminal, then find the difference of the input voltages.

Result:
The actual resistance values we used are R1 = 9.94k, R2 = 19.9k, R3 = 9.98k, R4 = 19.7k ohms resistors.


Using Vb = 1V, V+ = +5v, V- = -5v , and varying Va, we get the output voltages as above.

From the graph above, we get the similar curve that we get from previous labs.
The curve can be divided into three parts.
Positive saturation part, linear part, and Negative saturation part.

Comparing the measured values to the calculated values, we found that this data set has relatively more error because the saturation is small, and the output voltage can easily be bigger or smaller than the VCC.

Summary:
We saw that op-amp is a important device for electrical engineering because of their variations on its operations. Summing and Difference amplifiers are the basic op-amp which not only perform the basic mathematical operation but also enable the existences of digital-to-analog converter and instrumentation amplifier. But there is a point to remember, "Always remember they will saturate at some point".

Thursday, April 6, 2017

Day Nine is Exam Day, Day Ten - Inverting Voltage Amplifier - 4/4/2017

Today, we talked about the operational amplifier, which has the basic ability of mathematical operations, such as addition, multiplication, differentiation, and integration.
Because of its comprehensive functionalities, it is a useful tool on any circuit.
There are two types of operational amplifier we talked about, inverting(-) and non-inverting(+) operational amplifier.
The inverting amplifier is called "inverting" because the output is the input multiplied by a negative constant, and the non-inverting amplifier is called "non-inverting" because the output is the input multiplied by a positive constant. Those negative and positive constant are called the open-loop voltage gain (A). However, when there is a feedback feeding from the output back to the input, we called the ratio of output voltage to input voltage is closed-loop voltage gain. Feedback is negative when it is fed to the inverting terminal of the "op-amp", and it is positive when it is fed to the non-inverting terminal.
Here is the schematic of the non-ideal operational amplifier.
Non-Ideal Operational Amplifier is called "non-ideal" because an ideal op amp must have 1. an infinite open-loop gain, 2. infinite input resistance, and 3. zero output resistance.

There are three modes of the op amp.
1. Positive saturation, where the voltage is limited by the supply voltage.
2. A linear region, where we find that useful.
3. Negation saturation, where the voltage is limited by the supply voltage.

Note: There are two voltage supplies (+) and (-) to make the operational amplifier in use, and if one of the voltage supply is connected to ground, that output will also be zero.
(eg. The negative voltage supply is connected to zero, then all the output voltage below zero will be zero, but not negative.)

We had some circuit drawings which transforms the op-amp into a real circuit element.


After that, we had our inverting voltage amplifier lab.
Designing:

Because we have to consider the guarantee voltage gain of 2 and R1 is approximately 2kohms in our inverting voltage amplifier circuit, we have to pick the closest value available in the class, which is 2.2k ohms for R1 and 4.7k ohms for R2. We also transformed the op-amp into the schematic above.

Result:
After the actual implementation of the circuit, we had the measured result for the output voltage in varying input voltage.
NOTE: The left column is the varying input voltages, and the right column is the varying output voltages.
ERROR: We probably measured the output voltage using the opposite polarity so that our voltage is not inverted.

Here is the graph of output voltages vs. input voltages. As we can see, the output voltages at the top and the bottom have reached the saturation point where no more voltage can be attained.
Comparing the gain R2/R1 = 2.136 to the actual voltages gain in the lab, which has an average of 2.133472 at the linear region without the zero point, this experiment is done successfully, and the percent error is really low.

Summary:
In day ten, we successfully verified the inverting op-amp by measuring the voltage output with varying voltage input. We used the ratio to compare with the ratio R2/R1, and we found almost zero percent error. One important point on this lab is to see that once the output voltage has passed the saturation point (usually the VCC), the output voltage is useless and inaccurate; therefore, we always use the linear region in our experiment for accuracy.