Monday, February 20, 2017

Blog 7

Blog 7

1.) Force sensing resistor gives a resistance value with respect to the force that is applied on it. Try different loads (Pinching, squeezing with objects, etc.) and write down the resistance values.

Force
Measured Resistance
Light touch
23k ohms
Firm touch
2.4k ohms
Hard touch
1.08k ohms
Hard press
282 ohms
~~The harder we pressed the sensor the less amount of resistance it has. However, without being touch it reads that it has a resistance value of 0 ohms. The maximum level or resistance achieved was 335k to 1.3M ohms. This is a huge range, this is likely do to the DMM reading the resistance as pressure is being taken off of it.

2.)                                                               7 Segment display:

a. Check the manual of 7 segment display. Pdf document’s page 5 (or in the document page 4) circuit B is the one we have. Connect pin 3 or pin 14 to 5 V. Connect a 330 Ω resistor to pin 1. Other end of the resistor goes to ground. Which line lit up? Using package dimensions and function for B (page 4 in pdf), explain the operation of the 7 segment display by lighting up different segments. (EXPLAIN with VIDEO). 
~~ When we connected power to pin 3 and a 330 ohm to pin one the upper segment of the 7 segment display lit up.

Video showing how each of the seven segments can be powered in 7 segment display


b. Using resistors for each segment, make the display show 0 and 5. (EXPLAIN with PHOTOs)

Fig 1: Picture of a 5 being displayed on a 7-segment display

Fig 2: Picture of a 0 being displayed on a7-segment display
~~The number that gets displayed is dependent on which pins are powered. There are 14 pins and 8 of those pins are used to power LED inside the 7-segment display. A combination of the correct pins can be used to display a number of choice.

3.) Display driver (7447). This integrated circuit (IC) is designed to drive 7 segment display through resistors. Check the data sheet. A, B, C, and D are binary inputs. Pins 9 through 15 are outputs that go to the display. Pin 8 is ground and pin 16 is 5 V.

a. By connecting inputs either 0 V or 5 V, check the output voltages of the driver. Explain how the inputs and outputs are related. Provide two different input combinations. (EXPLAIN with PHOTOs and TRUTH TABLE)
Displaying 20170222_084101.jpg
Input combination 1: This corresponds to the number '8' because the D input is the only high voltage input the rest are grounded. All the of the output pins light up the LED.
Displaying 20170222_083942.jpg
Input combination 2: This corresponds to the number '1' because the A input is the only high voltage input the rest are grounded. Only the b and c output pins light up the LED.
b. Connect the display driver to the 7 segment display. 330 Ω resistors need to be used between the display driver outputs and the display (a total of 7 resistors). Verify your question 3a outputs with those input combinations. (EXPLAIN with VIDEO)




555 Timer

4.) a. Construct the circuit in Fig. 14 of the 555 timer data sheet. VCC = 5V. No RL (no connection to pin 3). RA = 150 kΩ, RB = 300 kΩ, and C = 1 µF (smaller sized capacitor). 0.01 µF capacitor is somewhat larger in size. Observe your output voltage at pin 3 by oscilloscope. (Breadboard and Oscilloscope PHOTOs) 

Fig 3: Picture of the breadboard of the 555 timer which is hooked up to the oscilloscope


Fig 4: Picture of the oscilloscopes readings that were obtained from the circuit featured in Fig 3.
~~ From this picture (Fig 4) we can see that the 555 timer is generating a pulse. In terms of the graph, the circuit is outputting an actual signal, so "on" during the upper section of the pulse. While on the lower part of the graph the 555 is not outputting a signal, so it in an "off" state.

~~ We can also see from Fig 4 that the 555 timer is on for slightly longer than it is off.

b. Does your frequency and duty cycle match with the theoretical value? Explain your work.

~~The measured frequency and the measured duty cycle are as follow: 1.74Hz and the duty cycle is ON for 56.5% of the time, OFF for 43.4% today.

~~I obtained the numbers by using the oscilliscope. Each box being 500ms. It shows that the system is 'off' for 500ms and On for 1.3 boxes or about 650ms.

~~The frequency is obtain by the equation F=1/T, where T is the period. We know it takes 1.15 seconds for a two periods to occur. So... F= 1/(1.15*.5) 1.74 Hz

~~ The theorectical values should be 50% on and off for the duty cycle. So no we do not match the theoretical values. However, we are very close.

c. Connect the force sensing resistor in series with RA. How can you make the circuit give an output? Can the frequency of the output be modified with the force sensing resistor? (Explain with VIDEO)
Video showing how a pressure sensor can be used with a 555 timer

74192

5. Connect your 555 timer output to pin 5 of 74192. Observe the input and each output on the oscilloscope. (EXPLAIN with VIDEO and TRUTH TABLE)


Count
D
C
B
A
0
0
0
0
0
1
0
0
0
1
2
0
0
1
0
3
0
0
1
1
4
0
1
0
0
5
0
1
0
1
6
0
1
1
0
7
0
1
1
1
8
1
0
0
0
9
1
0
0
1

~~Here we have a truth table for the 74192 IC. Depending on what output pins you are reading you will observe a different count. For example, if you are reading an output from pin A and B you will get a count of 3. This is viewed by the oscilloscope as a faster frequency than a count of a lesser value.

Frequency of 9 (count) > 1 (count)

Video showing the different frequencies achieved by various outputs of the 74192


7486 XOR gate


6. 7486 (XOR gate). Pin diagram of the circuit is given in the logic gates pin diagram pdf file. Ground pin is 7. Pin 14 will be connected to 5 V. There are 4 XOR gates. Pins are numbered. Connect a 330 Ω resistor at the output of one of the XOR gates.

~a. Put an LED in series to the resistor. Negative end of the LED (shorter wire) should be connected to the ground. By choosing different input combinations (DC 0V and DC 5 V), prove XOR operation through LED. (EXPLAIN with VIDEO)


Video showing the properties of an XOR gate


~b. Connect XOR’s inputs to the BCD counters C and D outputs. Explain your observation. (EXPLAIN with VIDEO)
Video showing how the 17492 can be used with a XOR gate


~c. For 6b, draw the following signals together: 555 timer (clock), A, B, C, and D outputs of 74192, and the XOR output. (EXPLAIN with VIDEO)
Video showing the relationship between the different output frequencies


Connect


7. Connect the entire circuit: Force sensing resistor triggers the 555 timer. 555 timer’s output is used as clock for the counter. Counter is then connected to the driver (Counter’s A, B, C, D to driver’s A, B, C, D). Driver is connected to the display through resistors. XOR gate is connected to the counter’s C and D inputs as well and an LED with a resistor is connected to the XOR output. Draw the circuit schematic. (VIDEO and PHOTO) 


Video of the completed circuit with everything connected together

Fig 5: Picture of the entire circuit

Fig 6: Picture of the breadboard featured on the right in FIG 5

Fig 7: Picture of the breadboard featured on the left in FIG 5

Fig 8: Schematic of the above circuit.




OR Gate

8. Using other logic gates provided (AND and OR), come up with a different LED lighting scheme. (EXPLAIN with VIDEO)
Video showing how an OR gate be used in series with the XOR gate to turn on an LED. 

(an AND gate would have worked as well just would have need to signals to the input pins as apposed to 1 or 2 for the OR gate.)

Monday, February 13, 2017

Week 6

Week 6 Blog

Operational Amplifiers




1. You will use the OPAMP in “open-loop” configuration in this part, where input signals will be applied directly to the pins 2 and 3.


Figure 1: Image of IC chip, and schematics of (Non)-Inverting Amplifiers
~~a. Apply 0 V to the inverting input. Sweep the non-inverting input (Vin) from -5 V to 5 V with 1 V steps. Take more steps around 0 V (both positive and negative). Create a table for Vin and Vout. Plot the data (Vout vs Vin). Discuss your results. What would be the ideal plot?



Figure 1a) An OP-AMP cannot exceed the supply voltage, in this case +5 V and -5 V. This is illustrated by the orange line. However, since ideal measurements are only theoretical, our measured values only were at -3.6 and +4.5 V. The other main difference between our measured and ideal values is that, because the gain is so high, the graph looks like a vertical line at 0. At 0, our DMM read -3.6 V.

~~b. Apply 0 V to the non-inverting input. Sweep the inverting input (Vin) from -5 V to 5 V with 1 V steps. Take more steps around 0 V (both positive and negative). Create a table for Vin and Vout. Plot the data (Vout vs Vin). Discuss your results. What would be the ideal plot? 
Figure 1b) As you can see, this graph is essentially the reverse of Figure 1a. This makes sense because the circuit was mostly the same, except for the fact that our input voltage was connected to the inverting input. The same still holds true for the limits of the output voltage. However, at 0 our DMM read 4.54 V. The fact that no OP-AMP is ideal is why the orange and blue lines are not the same.


2. Create a non-inverting amplifier. (R2 = 2 kΩ, R1 = 1 kΩ). Sweep Vin from -5 V to 5 V with 1 V steps. Create a table for Vin and Vout. Plot the measured and calculated data together. 
Figure 1c) Our calculated values show what an ideal non inverting OP-AMP graph would look like. As you can see the values we measured were higher/lower than ideal, which is what one would expect. The gain for this circuit was 3. 

3. Create an inverting amplifier. (Rf = 2 kΩ, Rin = 1 kΩ). Sweep Vin from -5 V to 5 V with 1 V steps. Create a table for Vin and Vout. Plot the measured and calculated data together.
Figure 1d) Our calculated values show what an ideal inverting amp graph would look like. As you can see the values we measured were lower/higher than ideal, which is what one would expect. The gain for this circuit was -2. As the name indicates, an inverting amplifier takes a negative input voltage and outputs a positive voltage, and vice versa.

4. Explain how an OPAMP works. How come is the gain of the OPAMP in the open loop configuration too high but inverting/non-inverting amplifier configurations provide such a small gain? 
~~The OPAMP works by using two inputs (+ and -) to receive electricity. If more voltage goes through into the + than the - then it outputs as much voltage as it can. Visa Versa, if more voltage enters into the - than the + then it outputs no voltage.
~~The OPAMP in the open loop has a gain much higher than the inverting/non-inverting configuration. If we simply look at the equations we see
Open loop gain: ( Vout )/( V+ V-  )
Inverting gain: -(Rf / Rin)
Non-inverting gain:1+ (R2 / R1)

***REFER TO FIGURE 1 FOR DETAILS PERTAINING TO THE RESISTORS***

~~Generally the reason why the gain is smaller is because the resistors dampen the abilities to produce higher gain.


Temperature Controlled LED System

1. Connect your DC power supply to pin 2 and ground pin 5. Set your power supply to 0V. Switch your multimeter to measure the resistance mode; use your multimeter to measure the resistance between pin 4 and pin 1. Do the same measurement between pin 3 and pin 1. Explain your findings (EXPLAIN).


Vin
Pins 1 to 3
Pins 1 to 4
0 V
0.953
OL
1 V
0.949
OL
2 V
0.961
OL
3 V
0.959
OL
4 V
0.976
OL
5 V
0.996
OL
6 V
OL
0.960
7 V
OL
0.962
8 V
OL
0.963

2. Now sweep your DC power supply from 0V to 8V and back to 0V. What do you observe at the multimeter (resistance measurements similar to #1)? Did you hear a clicking sound? How many times? What is the “threshold voltage values” that cause the “switching?” (EXPLAIN with a VIDEO).
Video explaining how the relay clicks during energizing and de-energizing phases

*Further explaination: For pins 1 to 3 and pins 1 to 4 the multimeter was reading the same as number 1. I heard 4 clicks when I did the operation for both trials. The clicks closer to the 0V was a deeper click and the clicks closer to the 8V had a higher toned pitch. The Threshold voltage is about 6 voltages when it energizes and then about 2 V is the lower side when it de energized.

3. How does the relay work? Apply a separate DC voltage of 5 V to pin 1. Check the voltage value of pin 3 and pin 4 (each with respect to ground) while switching the relay (EXPLAIN with a VIDEO).
Video explaining how a relay works as a switch and an amplifier 

Pin 3
Pin 4
1.2 ohms
1.1 ohms
OL
OL
 *These are the numbers we got when running this experiment

LED + Relay 


1. Connect positive end of the LED diode to the pin 3 of the relay and negative end to a 100 ohm resistor. Ground the other end of the resistor. Negative end of the diode will be the shorter wire.

2. Apply 3 V to pin 1

3. Turn LED on/off by switching the relay. Explain your results in the video. Draw the circuit schematic (VIDEO)
Video showing how the relay is amplifying the signal to power the LED


This is the schematic of our LED+Relay Circuit.

Operational Amplifier

 1. Connect the power supplies to the op-amp (+10V and 0V). Show the operation of LM 124 operational amplifier in DC mode with a non-inverting amplifier configuration. Choose any opamp in the IC. Method: Use several R1 and R2 configurations and change your input voltage (voltages between 0 and 10V) and record your output voltage. (EXPLAIN with a TABLE)


Input
Output (R1= 100 ohm, R2=100 ohm)
Output (R1= 1000 ohm, R2=100 ohm)
Output (R1= 1200 ohm, R2=100 ohm)
1
1.3
1.8
2.1
5
4.91
6.33
6.8
7
7.6
7.7
7.9
    *Table displaying our results from the op-amp experiment     

2. Use your temperature sensor as your input. Do you think you can generate enough voltage to trigger the relay? (EXPLAIN)

*CAN'T DO NO TEMPERATURE SENSOR TO USE.

But if we had to hypothesize then no I don't believe our temperature sensor alone can trigger our relay, because it won't have enough voltage to it.

3. Design a system where LED light turns on when you heat up the temperature sensor. (CIRCUIT schematic and explanation in a VIDEO)

*CAN'T DO NO TEMPERATURE SENSOR TO USE.

But if we had to only draw the circuit out this is what we would get started with below:

*Note we didn't include the voltages or the resistance, because without trying the circuit we don't actually know the real numbers to it. So we just labeled everything ambiguously (V1,V2 and R1).





Monday, February 6, 2017

Blog Week 5

Week 5 Blog

1. Functional check: Oscilloscope manual page 5. Perform the functional check (photo).
 
A picture of a successful functional test


2. Perform manual probe compensation (Oscilloscope manual page 8) (Photo of overcompensation and proper compensation).

Picture of Overcompensation


Picture of proper compensation


3. What does probe attenuation (1x vs 10x) do (Oscilloscope manual page 9)?
~~Probe attenuation adjusts the voltage of the incoming signal by increasing impedance. This is done so that more accurate measurements can be taken. The 1x and 10x designation determines to which factor the voltage decreases/impedance increases. 1x doesn't change anything, it is a 1:1 ratio. This setting is used for voltages that are small enough on their own already that they do not need to be attenuated for a more accurate reading. However, 10x decreases the incoming voltage (amplitude of the signal) by a factor of 10. This makes it much easier to take readings on the oscilloscope of signals that are higher voltages. If you have a high voltage/amplitude it is harder to see details of the signal because the scale of the Y axis would be too large. There are even higher (100x) scopes for even larger voltages.

4. How do vertical and horizontal controls work? Why would you need it (Oscilloscope manual pages 34-35)?
~~The vertical and horizontal knobs adjust the respective position of the function. By rotating the horizontal knob you can change the function along the X axis. By rotating the vertical knob you can change the function along the Y axis. This is a useful function if your function has a very large wavelength or amplitude and you are trying to see the entire wave. This is also helpful for times when the function is not directly centered in the oscilloscope.

5. Generate a 1 kHz, 0.5 Vpp around a DC 1 V from the function generator (use the output connector). DO NOT USE oscilloscope probes for the function generator. There is a separate BNC cable for the function generator.

>>a. Connect this to the oscilloscope and verify the input signal using the horizontal and vertical readings (photo).
Picture of the 1kHz wave with ~0.5 Vpp

Picture of 1kHz and 0.5 Vpp. .25v is needed to generate 0.5 Vpp


>>b. Figure out how to measure the signal properties using menu buttons on the scope
~~After you have the function generated you have to hit the measure button at the top of the oscilloscope. Five empty CH1 boxes will appear. You can enter in values for the oscilloscope to measure by selecting the CH1 box, and switching through the menus to select the value you wish to measure.
*Note: Our function generator could only reach an offset DC value of .37 V, it would then say 'setting conflict'. When we asked Dr. Kaya he assumed our function generator was at it's max.

Picture showing the different options of measuring

6. Connect function generator and oscilloscope probes switched (red to black, black to red). What happens? Why?
~~When you switch the cables from red to black, to black to red. The function becomes very noisy and is useless.

7. After calibrating the second probe, implement the voltage divider circuit below (UPDATE! V2 should be 0.5Vac and 2Vdc). Measure the following voltages using the Oscilloscope and comment on your results:




>>a. Va and Vb at the same time (Photo)
The Circuit of resistors in series with .5Vac and 2Vdc

For Va and Vb at the same time we got

>>b. Voltage across R4. 
~~ 0.115 v

8. For the same circuit above, measure Va and Vb using the handheld DMM both in AC and DC mode. What are your findings? Explain.
              
Va AC
 0.119V
Vb AC
 0.117 V
Va DC
 17.6 mV
Vb DC
 17.3 mV


This table represents the results for Va and Vb for both AC and DC. As you can see the results we got for DC were much smaller than what we got for AC. We also know that Vb=2Va. And the difference between AC and DC is that AC is an alternating current which means that other than DC, which is direct current and only moves in one direction, the alternating current moves in two different directions. The AC Voltage we are getting is what the amplitude is, and DC we are reading the Voltage divided by the 3 resistors in parallel. 

9. For the circuit below

>>a. Calculate R so given voltage values are satisfied. Explain your work (video)


Video showing how we calculated the missing R7 value


>>b. Construct the circuit and measure the values with the DMM and oscilloscope (video). Hint: 1kΩ cannot be probed directly by the scope. But R6 and R7 are in series and it does not matter which one is connected to the function generator.
~Alec

10. Operational amplifier basics: Construct the following circuits using the pin diagram of the opamp. The half circle on top of the pin diagram corresponds to the notch on the integrated circuit (IC). Explanations of the pin numbers are below:



>>a. Inverting amplifier: Rin = 1kΩ, Rf = 5kΩ (do not forget -10 V and +10 V). Apply 1 Vpp @ 1kHz. Observe input and output at the same time. What happens if you slowly increase the input voltage up to 5 V? Explain your findings. (Video)
Video showing how an inverting amplifier affects the AC sine function


>>b. Non-inverting amplifier: R1 = 1kΩ, R2 = 5kΩ (do not forget -10 V and +10 V). Apply 1 Vpp @ 1kHz. Observe input and output at the same time. What happens if you slowly increase the input voltage up to 5 V? Explain your findings. (Video)
Video showing how an non-inverting amplifier affects the AC sine function