Monday, April 17, 2017

Blog 13 scout

1. Provide the updated computer drawing for your individual RG setup.
(Upload soon)
2. Explain your setup.
The transition of my circuit of the previous Rube goldberg circuit will lift a hoist off of a photo-sensor.  The photo-sensor is used as one of the two resistors in the non-inverting amplifier.  The voltages are close enough that once the photo sensor is given light that it then produces a high enough gain that it switched the relay.  The two outputs of the relay are connected to a diode, that is lit to show the relay hasn't switched yet. Once the relay is switched the rest of the circuit is activated. First the 7 segment display counter is activated and is counted from 1 to 9 and the motor will spin from 4 to 9.  There will be a 555 timer, 74192, xor gate, and 7447 decimal counter. The motor will spin lifting the gate which releases the ball.  As the ball falls, there a switch at the bottom which is activated when the ball hits it.  When that switch is tripped it will activate another motor dropping another ball which will hit a switch on mine and also hit another switch which activates the next circuit.
3. Provide photos of the circuit and setup.


4. Provide at least 2 new videos of your setup in action, one being a failed attempt.

(Videos will be uploaded later)

5. What failures did you have? How did you overcome them?
A failure that I had to overcome was trying to find the right resistors for the photocell when exposing it to light.  At first, we couldn't find a good enough cover for resistor, but then when adjusted the resistors it worked correctly.
6. Group task: Explain your group RG setup.
Austins circuit will trigger mine by blowing a paper off of my photocell, which causes my relay to switch.  At the end of mine a ball will fall down a ramp running into Mohamed's lamp cause it to turn on which activates his.
7. Group task: Video of a test run of your group RG.




Blog 13 Group 1

Blog 13
Explanation:
I (Austin) will begin the Rube Goldberg by turning on my power supply which will activate a motor at the top of a ramp which will pull a car with a piece of paper on top of it to cover up a photo resistor. Once this photo resistor is covered it will flip the relay powering the motor at the top of the ramp to the motor powering the lift. Once the lift begins to go up a cover uncovers another photo resistor which will flip a seperate relay to power the fan. The fan will blow a piece of paper off of Scout's photo resistor. This will switch a relay that will start an upward counting decimal counter. Once the decimal counter reaches number 4 using logic gates the first motor will run allowing a ball to fall down a mechanical contraption. Once the ball reaches the bottom of the contraption it will flip a switch. This will start another motor that will release a ball down a tube. This ball will hit another switch. This second switch will activate a lamp this lamp will activate a photocell for the following project.


Sunday, April 16, 2017

Blog 13 Austin

Blog 13

Computer Drawing:

Phase 1:




Phase 2:


Schematic:


Explanation:
One side of the first relay runs the motor atop phase 1 which powers the car to be pulled up the incline which eventually covers the photo resistor. This flips the relay to the other side which power the motor of phase 2. This causes the lift to go upward therefore, uncovering photo resistor 2 which then flips a sepperate relay to switch on powering the fan to blow a piece of paper uncovering Scout's photo resistor. Some issues I still have with my setup is that the time just barely reaches the 10 second minimum this is primarily due to when the left begins to lift up it uncovers the photo resistor beneath it so quickly that it almost instantaneously swithches the second relay. I want to make a more elaborate cover because if you look closely this was the failure in my second video. The fan starts running even before the lift begins to move because the second phtoto resistor was never covered properly. Although the above schematics look very similar it is important to note that the location of the photo resistors in relation to the op amp gives them the required functionality. The first one is used to increase the amplification when covered and the second one is used to increase the amplification when uncovered this is why they are in opposite possitions in relation to the op amp in the schematic.

Pictures:

Figure 1: shows incline of phase 1

Figure 2:Shows DC motot 1 at the top of phase 1

Figure 3: Shows phase 2

Figure 4: Shows phase 4 (the transition)

Figure 5: Circuit board

Videos:
Video 1: Sucessful Rube Goldberg

Video 2: Rube Goldberg failure

Failures:
The failure with the original circuit was primarily that I could not achieve pulling off the piece of paper with only 1 second of power so I eliminated the clock from my circuit and added in the additional relay, opamp and motor. Another issue I had was for some reason I still have not been able to understand is that on the day of the individual demos my motor on the top of phase 1 kept getting weaker after each use. I decreased the incline to provide more room for error and have since had no issues with it.





Monday, April 10, 2017

Blog 12: Scout

2. Explain your setup.
The transition of my circuit of the previous Rube goldberg circuit will lift a hoist off of a photo-sensor.  The photo-sensor is used as one of the two resistors in the non-inverting amplifier.  The voltages are close enough that once the photo sensor is given light that it then produces a high enough gain that it switched the relay.  The two outputs of the relay are connected to a diode, that is lit to show the relay hasn't switched yet. Once the relay is switched the rest of the circuit is activated. First the 7 segment display counter is activated and is counted from 1 to 9 and the motor will spin from 4 to 9.  There will be a 555 timer, 74192, xor gate, and 7447 decimal counter. The motor will spin the bridge moving the object down it the down a ramp to the next circuit.
3. Provide photos of the circuit and setup.


4. Provide at least 2 videos of your setup in action (parts or whole), at least one being a failed attempt.

5. What failures did you have? How did you overcome them?
1 big failure that I had which was hard to overcome was solving for the voltages to make the amplifier trip the relay.  I have many different voltages coming in so it was hard to make all of them work with each other the way I wanted them too.  Finally I solved for the right voltages and i was able to overcome that issue.

Sunday, April 9, 2017

Blog 12 Austin


Blog 12

Computer circuit schematic:



Explanation:
The circuit begins with the countdown on the seven segment display using the display, the clock, the driver and the decimal counter. This portion of the circuit is similar to the circuit we built in class on week 7 with some minor adjustments to make the clock count down instead of up. Then the outputs of the counter are also branched off to the series of or gates which give the output of 1 for every number beside zero. Then that output is put into a xor gate which has its output connected to an NPN transistor. This then allows a separate supply voltage current to flow through the transistor once a base voltage is supplied. This emitter current is used to power a small motor that only runs for 1 second while the clock is on zero but should theoretically be enough time to pull a cover off of the photo sensor. The photo sensor is used as R1 in the non-inverting op amp shown below and by using the photo resistor in this way when the photo resistor is covered the gain will be essentially 1 because the resistance of the covered resistance is about 30k ohms. Therefore, with R1 being about 4k when the photo resistor is uncovered it has a resistance of about 3k so by analyzing the equation provided below the gain should double when uncovered vs covered and it does. Then the output of the op amp is applied to a relay so that when the cover is removed the relay switches outputs and powers the larger motor to power the lift. This is where the circuit ends.

Photos:

Photo 1: Entire circuit minus the two motors.


Photo 2: Close up of relay, op amp and driver.


Photo 3: Close up of clock, decimal counter, and or gates.

Photo 4: Close up of Xor gate, transistor and display.


Videos:
Video 1: Shows how the clock counts down and is used to pull the paper away from the circuit.

Video 2: Shows the problem with the motor pushing the entire contraption away from itself.

Failures:
I have encountered many failures throughout the process with connection issues and also just simple design flaws. The two major failures that I am still in the process of overcoming is how to get the small motor to move the cover from the photo resistor and how to secure the motor and lift in place so that they don't push each other away. These mechanical failures are proving to be harder than anything I encountered while building the circuit. One failure I have overcome was with triggering the relay I was trying to use the photo resistor in a different way. I was trying to use it as a current divider of some sort and then I did a little reading into the op amp and realized that the op amp is just a configuration of a bunch of CMOS transistors and that no current actually flows through the input. This is when I got the idea to use it as R1 on the non inverting op amp and that worked much much better.




Monday, March 27, 2017

Blog 11 group 1

Part A: Strain Gauges:
Strain gauges are used to measure the strain or stress levels on the materials. Alternatively, pressure on the strain gauge causes a generated voltage and it can be used as an energy harvester. You will be given either the flapping or tapping type gauge. When you test the circle buzzer type gauge, you will lay it flat on the table and tap on it. If it is the long rectangle one, you will flap the piece to generate voltage.
1. Connect the oscilloscope probes to the strain gauge. Record the peak voltage values (positive and negative) by flipping/tapping the gauge with low and high pressure. Make sure to set the oscilloscope horizontal and vertical scales appropriately so you can read the values. DO NOT USE the measure tool of the oscilloscope. Adjust your oscilloscope so you can read the values from the screen. Fill out Table 1 and provide photos of the oscilloscope.

Table 1: Strain gauge characteristics

Low:
 Minimum voltage:-2V
Maximum voltage:3V

High:
Minimum voltage:-40V
Maximum voltage:45V
Image 1: Shows the output of the strain gauge
Image 2: Shows the output of the strain gauge
2. Press the “Single” button below the Autoscale button on the oscilloscope. This mode will allow you to capture a single change at the output. Adjust your time and amplitude scales so you have the best resolution for your signal when you flip/tap your strain gauge. Provide a photo of the oscilloscope graph.
Image 3:  Shows the use of the "single" button

Part B: Half-Wave Rectifiers
1. Construct the following half-wave rectifier. Measure the input and the output using the oscilloscope and provide a snapshot of the outputs.
Image 4: shows the output of the halfway rectifier 

2. Calculate the effective voltage of the input and output and compare the values with the measured ones by completing the following table.
Effect (rms) Values       Calculated     Measured
                                           3.535                  Input 3.72
                                        2.5                     Output 2.15


3. Explain how you calculated the rms values. Do calculated and measured values match?
(Come back)

4. Construct the following circuit and record the output voltage using both DMM and the oscilloscope.

Column1 Oscilloscope DMM
Output Voltage (p-p) 2.4 1.848
Output Voltage (mean) 2.84 2.79
Table 1: Shows the output voltages using the different devices

5. Replace the 1 µF capacitor with 100 µF and repeat the previous step. What has changed?

Column1 Oscilloscope DMM
Output Voltage (p-p) 120 mV 62.2 mV
Output Voltage (mean) 3.27 3.22
Table 2: Shows the output voltages for thee 100uf capacitor

Part C: Energy Harvesters
1. Construct the half-wave rectifier circuit without the resistor but with the 1 µF capacitor. Instead of the function generator, use the strain gauge. Discharge the capacitor every time you start a new measurement. Flip/tap your strain gauge and observe the output voltage. Fill out the table below:

Tap frequency Duration Output Voltage
1 flip/second 10 seconds 617 mV
1 flip/second 20 seconds 1.37
1 flip/second 30 seconds 3.07
4 flip/second 10 seconds 3.29
4 flip/second 20 seconds  4.84
4 flip/second 30 seconds 8.8
Table 3: Shows the output for flips per second

2. Briefly explain your results.
As the flips increased in speed and in a longer duration, the voltage all increased from there, the faster you tap for the longer amount of time will give you higher outputs. 

3. If we do not use the diode in the circuit (i.e. using only strain gauge to charge the capacitor), what would you observe at the output? Why?
If we didn't use a diode, the circuit would not work because the capacitor would immediately discharge and there would be no built up charge.  

4. Write a MATLAB code to plot the date in table of Part C1.
D=[10,20,30];
Va=[0.617,1.37,3.07];
Vb=[3.29,4.84,8.8];
plot(D,Va,'--r')
hold on
plot(D,Vb)
legend('1 flip/second','4 flip/second')
xlabel('Duration (s)')
ylabel('Output Voltage (V)')
title('Half-wave recitifier')


















Wednesday, March 22, 2017

Blog 10 group 1


1. Open MATLAB. Open the editor and copy paste the following code. Name your code as FirstCode.m
Save the resulting plot as a JPEG image and put it here.
Graph 1: Shows the plot of the code

2. What does clear all do?
It clears all the variables in the work space.

3. What does close all do?
It closes all the figures that are open.

4. In the command line, type x and press enter. This is a matrix. How many rows and columns are there in the matrix?
It is a 1 x 5 matrix; 1 row and 5 columns.

5. Why is there a semicolon at the end of the line of x and y?
It supresess the output so that it does not appear in the command window and therefore helps not clutter up the command window

6. Remove the dot on the y = 2.^x; line and execute the code again. What does the error message mean?
The dot is required whenever doing an operation to an input that is a matrix because the multiplication must be applied to each individual number in the array.

7. How does the LineWidth affect the plot? Explain.
It increases or decreases the width of the line in the plot which is helpful when adjusting the precision of the graph based on the range.

8. Type help plot on the command line and study the options for plot command. Provide how you would change the line for plot command to obtain the following figure (Hint: Like ‘LineWidth’, there is another property called ‘MarkerSize’)
plot(x,y,'r-o','markersize',10,'linewidth',4)


9. What happens if you change the line for x to x = [1; 2; 3; 4; 5]; ? Explain.
Nothing changes it workes exactly the same way because it is changing the matrix into a 5x1 matrix with 5 rows and 1 column.

10. Provide the code for the following figure. You need to figure out the function for y. Notice there are grids on the plot.
clear all;
close all;
x = [1; 2; 3; 4; 5;]
y = x.^2;
plot(x,y,'k:s','markersize',12,'linewidth',4)
grid ON
xlabel('Numbers', 'FontSize', 12)
ylabel('Results', 'FontSize', 12)

11. Degree vs. radian in MATLAB:
a. Calculate sinus of 30 degrees using a calculator or internet.
sin(30)=0.5

b. Type sin(30) in the command line of the MATLAB. Why is this number different? (Hint: MATLAB treats angles as radians).
Matlab outputs that sin(30) is -0.9880 because matlab treats the number inside the parenthesis as radians as opposed to degrees.

c. How can you modify sin(30) so we get the correct number?
You change the function to "sind(30)" and then get an output of 0.5

12. Plot y = 10 sin (100 t) using Matlab with two different resolutions on the same plot: 10 points per period and 1000 points per period. The plot needs to show only two periods. Commands you might need to use are linspace, plot, hold on, legend, xlabel, and ylabel. Provide your code and resulting figure. The output figure should look like the following:
clear all;
close all;
t1=[0:pi/25000:pi/25];
y=10*sin(100.*t1);
t2=[0:pi/250:pi/25];
z=10*sin(100.*t2);
plot(t1,y,'k',t2,z,'r-o')
axis([0 .14 -10 10])
xlabel('Time (s)', 'FontSize', 12)
ylabel('y function', 'FontSize',12)
legend('fine','coarse','location','NorthEast')

Graph 2:  Shows the two plotted points from the code

13. Explain what is changed in the following plot comparing to the previous one.
The only thing that is different is that the "fine" plot has a cut-off point that the other didn't have at y=5.

14. The command find was used to create this code. Study the use of find (help find) and try to replicate the plot above. Provide your code.
clear all;
close all;
t1=[0:pi/25000:pi/25];
y=10*sin(100.*t1);
a=find(y<5)
t2=[0:pi/250:pi/25];
z=10*sin(100.*t2);
plot(t2,z,'r-o',t1(a),y(a),'k')
axis([0 .14 -10 10])
xlabel('Time (s)', 'FontSize', 12)
ylabel('y function', 'FontSize',12)
legend('fine','coarse','location','NorthEast')

PART B: Filters and MATLAB
1. Build a low pass filter using a resistor and capacitor in which the cut off frequency is 1 kHz. Observe the output signal using the oscilloscope. Collect several data points particularly around the cut off frequency. Provide your data in a table.
Frequency(Hz): Vout: (pk-pk)
500 9.68
600 9.36
700 9.04
800 8.8
900 8.48
1000 8.24
1100 7.92
1200 7.6
1300 7.36
1400 7.04
1500 6.80
1600 6.56
1700 6.4
2000 5.76
2200 5.44
Table 1: Shows frequency and Vout of the low pass filter

2. Plot your data using MATLAB. Make sure to use proper labels for the plot and make your plot line and fonts readable. Provide your code and the plot.

f=[500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,2000,2200];
v=[9.68,9.36,9.04,8.8,8.48,8.24,7.92,7.6,7.36,7.04,6.80,6.56,6.4,5.76,5.44];
plot(f,v)
axis([400 2200 5 10])
xlabel('Frequency (f)', 'FontSize', 12)
ylabel('Vout', 'FontSize',12)
title('Low pass filter')


Graph 3: Shows the low pass filters outputs

3. Calculate the cut off frequency using MATLAB. find command will be used. Provide your code.

f=[500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,2000,2200];
v=[9.68,9.36,9.04,8.8,8.48,8.24,7.92,7.6,7.36,7.04,6.80,6.56,6.4,5.76,5.44];
vin=10
a=find(v<7.07)
plot(f(a),v(a))
axis([400 2200 5 10])
xlabel('Frequency (f)', 'FontSize', 12)
ylabel('Vout', 'FontSize',12)
title('Low pass filter')

4. Put a horizontal dashed line on the previous plot that passes through the cutoff frequency.

Graph 4: Shows the low pass filters outputs at the cut off frequency

5. Repeat 1-3 by modifying the circuit to a high pass filter.

A.
Frequency(Hz) Vout: (pk tp pk)
500 4.16
600 4.8
700 5.44
800 6.08
900 6.56
1000 7.01
1100 7.44
1200 7.84
1300 8
1400 8.56
1500 8.8
1600 9.04
1700 9.28
2000 9.92
2.2 10.2
3000 11
4000 11.7
5000 11.9
Table 2: Shows frequency and Vout for the high pass filter
B. 
  
Graph 5: Shows the high pass filters data plotted

f=[500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,2000,2200,3000,4000,5000];
v=[4.16,4.8,5.44,6.08,6.56,7.01,7.44,7.84,8,8.56,8.8,9.04,9.28,9.92,10.2,11,11.7,11.9];
plot(f,v)
axis ([500 5000 4 12])
xlabel('Frequency (f)', 'FontSize', 12)
ylabel('Vout', 'FontSize',12)
title('High pass filter')

C.
Graph 6: Shows the cut off frequency for the high pass filter