Wednesday, April 26, 2017

Week 13: Justin Schafer

Week 13: Rube Goldberg Finalization

Problem 1:
Rube Goldberg Circuit Schematic




Problem 2: A Trebuchet launches a ball into a cup, which covers a photoresistor. This in turn increases the output of a transistor, which has it's output amplified by an non-inverted op-amp. If the photoresistor is covered, then a relay is switched, turning on a clock (555 Timer.) This clock's pulses are measured and counted by the 74193 Binary Decimal Counter. This chip then outputs the count into 4 bits of binary. The binary bits are connected each to a 7 segment display. When all the displays are lit up (all binary bits are at 1,) then the clock's pulses are blocked from the Decimal Counter via a relay that shorts the wire between the two. This produces a constant signal for the next Rube Goldberg part.

Problem 3: 
Trebuchet with sling removed to reduce speed of projectile.

Circuit implemented on bread board.

Giant Target Funnel


Problem 4: 


Successful Attempt



Failed Attempt

Problem 5: 
Some failures were due to inaccuracy of the trebuchet, this was solved with making a large enough target that missing is improbable. Another issue was inconsistent results when trying to use logic gates such as NOR to make flip-flop designs. This was solved by simplifying the design and using NAND gates instead.

Monday, April 17, 2017

Week 13: Dru Pikula

Number 1: Updated Computer Drawing


Number 2: Setup Explanation

From  past blog post, Week 12: Dru Pikula;
There is 2 photocell resistors that will allow the motor to spin when they are uncovered, the circuit will activate when photocell 1 becomes uncovered from being initially covered, which because of the voltage divider active the transistor and then the relay switch to allow the motor to turn on. The motor will active the physical/mechanical part of the Rube Goldberg not yet drawn, the motor will spin in a string on a rod object that will pull it off another, on the other rod another string will pull a block over the second photocell to turn off the motor after the motor activates the next persons circuit.

Only thing I changed is adding in the 555 timer and LEDs so that half of the leds will be on when the other half is off using the nand gate as a not gate on the 555's output clock signal. The Leds will be used as a pure visual element for the Rube Goldberg.

Number 3: Photos



Number 4: Videos 


Number 5: What Failures I had
A problem that did happen is the motor not sporting a a couple of times and pulling the string off of the pencils.

Number 6: Group RG setup
My RG Setup will be triggered by the previous with a bottle slowing falling off the table and pulling a  string which will uncover my first photo resistor.  My will trigger my group mates by pulling a string and a pin on his catapult to start his RG setup.

Number 7: Video of group test run
Partner didn't show up couldn't record video.

Monday, April 10, 2017

Week 12 Justin Schafer


Rube Goldberg Trebuchet:



For the Class Rube Goldberg project I decided to use a catapult. After researching different types, I settled on the trebuchet due to the physics that would be interesting to recreate on a small scale. I found the optimal ratios for the different components as well as a sturdy, simple design.

Autodesk Inventor Schematic:

For the electronic side of my design, I have two bread boards, one that is covered and one that is not.
The first one is covered by the target, in order to keep it dark. However, a small amount of light is allowed in through the funnel. When this hole is covered, the Photoresistor will increase in resistance, which will then activate a relay after being converted into the correct voltage via a Transistor and Operational Amplifier. The relay is then connected to a 555 Timer, which has its pulses counted by a Binary Decimal Counter. The output from the counter is transferred to the other bread board.
The second bread board converts the outputs of the Binary Decimal Counter to 5 7 segment displays that spell out "gOAL!" (Has to be lowercase g due to limitations of 7 segment display.)
Bread Board Circuits:
In order to ensure that the projectile of the trebuchet does not miss, the proverbial "side of the barn" approach was used. A box was made to completely cover the first bread board, and on top of it, a large wall was made. This large wall was then connected to a hole in the top of the box via cloth. This created a soft landing for the projectile, mitigating most of the momentum of the projectile and preventing it from bouncing out. When the ball is sunk into the whole, the photoresistor activates the circuit.
Target:


Sunday, April 9, 2017

Week 12: Dru Pikula

Number 1: Computer Drawing





Number 2: Explanation of setup
There is 2 photocell resistors that will allow the motor to spin when they are uncovered, the circuit will activate when photocell 1 becomes uncovered from being initially covered, which because of the voltage divider active the transistor and then the relay switch to allow the motor to turn on. The motor will active the physical/mechanical part of the Rube Goldberg not yet drawn, the motor will spin in a string on a rod object that will pull it off another, on the other rod another string will pull a block over the second photocell to turn off the motor after the motor activates the next persons circuit.



Number 3: Photos
Whole Circuit

Voltage divider and Photocells

Relay and Transistor
Slide to slide over photo resistor

Motor and string

Number 4: Videos
Video of circuit working
Video of circuit with mechanical parts


Number 5: Failures
The main failures I've have so far have been getting the transistor to activate the relay, that was solved by bumping up the voltage to a value that would work just by slowing increasing it until it triggered.

Sunday, April 2, 2017

Week 11:

Part A: Strain Gauges:
Circular Gauge:


Flipping strength Minmun Voltage (volts) Maximum Voltage (volts)
Low -2.5 4.8
High -3.4 10


Square Gauge:

Flipping strength Minmun Voltage (volts) Maximum Voltage (volts)
Low -10.2 7.5
High 8.32 12



Part B: Half-Wave Rectifiers
Number 1:

Number 2:

Effective (rms) Calculated (volts) Measured (volts)
Input 7.64 7.52
Output 3.44 5.39

Number 3:
To get calculated RMS value of the input we multiplied the peak by .707 voltage. And to get calculated RMS  output we decided the peak by pi. The calculated and measured for the input line up well enough but not for the output we assume it's because the rectifier didn't fully remove the negative voltage signal.

Number 4:
Output voltages from above circuit:

Oscilloscope (volts) DMM (volts)
Output Voltage (P-P) 5 3.7
Output Voltage (Mean) 6.5 6.28
Number 5:

Same output voltages from Num. 4 but with a 100 nanoF capacitor.


Oscilloscope (volts) DMM (volts)
Output Voltage (P-P) 0.24 0.0567
Output Voltage (Mean) 7.17 7.16

Part C: Energy Harvesters
Number 1:
Tapping Table:

Tap Freq Duration (seconds) Outout (rms mV)
1 Flip/Sec 10 242
1 Flip/Sec 20 413
1 Flip/Sec 30 513
4 Flip/Sec 10 280
4 Flip/Sec 20 742
4 Flip/Sec 30 773
Flipping Table:
Tap Freq Duration
(seconds)
Outout (rms mV)
1 Flip/Sec 10 230
1 Flip/Sec 20 290
1 Flip/Sec 30 640
4 Flip/Sec 10 840
4 Flip/Sec 20 1430
4 Flip/Sec 30 1600

Number 2:
The longer that you tap it and/or the faster you tap it the more the circuit seems to store generate more voltage and hold that voltage for longer.

Number 3:
If we don't use the diode in the circuit then the strain gauge won't charge the capacitor  at all.

Number 4:






Monday, March 20, 2017

Week 10: MatLab

Part A: MATLAB Practice
Number 1:
MatLab Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
clear all;
close all;

x = [1 2 3 4 5];
y = 2.^x;

plot(x, y, 'LineWidth', 6)

xlabel('Numbers', 'FontSize', 12)
ylabel('Results', 'FontSize', 12)

Number 2: What does clear all do?
clear all Clears all objects in the work space.

Number 3: What does close all do?
close all Closes all figures currently open.

Number 4: Type x in the command line and press enter. how many rows and columns are there?
There are 5 columns and 1 row in the matrix x.

Number 5: Why is there a semicolon at the end of the line of x and y?
Because its the end of a statement.

Number 6: Remove the dot on the y=2.^x; line and execute the code again. what does the error message mean?

ERROR MESSAGE: "error using ^ inputs must be a scalar and a square matrix to compute element wise power, use power (.^)  instead."

This means that without the '.' it thinks we are doing a matrix math power but since we are trying to do a element by element power with want the '.' to do that.

Number 7: How does the LineWidth affect the plot?
Line width changes the width of the plot line of the graph making it thicker or thinner

Number 8: Change code to copy figure from blogsheet week 10 PART A number 8 and provide code.


MatLab Code:
1
2
3
4
5
6
7
clear all;
close all;
x = [1 2 3 4 5];
y = 2.^x;
plot(x, y, '-or', 'LineWidth',  2, 'MarkerSize', 10)
xlabel('Numbers', 'FontSize', 12)
ylabel('Results', 'FontSize', 12)
Number 9: What happens when you change x = [1 2 3 4 5]; to x = [1;2;3;4;5];
Nothing happens different when we add in [1;2;3;4;5] instead of [1 2 3 4 5] at least visibly

Number 10: Change code to copy figure from blogsheet week 10 PART A number 10 and provide code.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
clear all;
close all;

x = [1 2 3 4 5];
y = x.^2

plot(x, y, ':sk', 'LineWidth',  4, 'MarkerSize', 15)
grid on
set(gcc, 'GridLineStyle', '--'')

xlabel('Numbers', 'FontSize', 12)
ylabel('Results', 'FontSize', 12)

Number 11: Degree vs. radian in MatLab
a.) Calculate sin(30) using the Internet
sin(30) = .5

b.) Calculate sin(30) using MatLab
sin(30) = -.9880

c.) How do you modify sin(30) so we get the correct number?
Sin of 30 degrees in MatLab is sind(30) = .5

Number 12: Plot y = 10*sin(100*t) in MatLab with 2 different resolutions on the same plot. Provide Code.

MatLab Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
clear all;
close all;

tc = linspace(0,.125, 10);
tf = linspace(0,.125, 1000);

yc = 10*sin(100*tc);
yf = 10*sin(100*tf);

plot(tc, yc, '-or', 'LineWidth', 1, 'MarkerSize', 6)
hold on
plot(tf, yf, '-k', 'LineWidth', 1, 'MarkerSize', 2)

xlim([0 .14])

xlabel('Time (s)', 'FontSize', 12)
ylabel('y function', 'FontSize', 12)
legend('Coarse','Fine')

Number 13: Explain whats change in the following plot from the previous one. (fig. 5)
The plot(fig. 5) has all values above 5 removed for the fine plot.


Number 14: Replicate the plot from the blogsheet week 10 number 13 using MatLab and find.
Figure 5 Number 14 code output
MatLab Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
clear all;
close all;

tc = linspace(0,.125, 10);
tf = linspace(0,.125, 1000);

yc = 10*sin(100*tc);
yf = 10*sin(100*tf);
yff = find(yf<5);

plot(tc, yc, '-or', 'LineWidth', 1, 'MarkerSize', 6)
hold on
plot(tf(yff), yf(yff), '-k', 'LineWidth', 1, 'MarkerSize', 2)

xlim([0 .14])

xlabel('Time (s)', 'FontSize', 12)
ylabel('y function', 'FontSize', 12)
legend('Coarse','Fine')

Part B: Fliters and MATLAB
Low Pass Filter

MatLab Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
clear all;
close all;


x = [50 100 200 300 400 500 600 700 800 850 860 870 880 890 895 900 1000 1200 1400 1600 1800 2000];
y = [5.95 5.9 5.75 5.55 5.31 5.06 4.81 4.57 4.34 4.28 4.24 4.22 4.2 4.18 4.16 4.12 3.92 3.57 3.26 3.00 2.77 2.58 ];
y = y/5.94;

plot(x, y, '-or', 'LineWidth', 1, 'MarkerSize', 6)
hold on
refline(0,0.707);

xlabel('Frequency', 'FontSize', 12)
ylabel('Output/Input', 'FontSize', 12)

High Pass Filter
MatLab Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
clear all;
close all;


x = [50 100 300 600 800 850 860 870 880 890 895 900 910 920 930 940 950 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3500 4000 4500 5000];
y = [.4 .747 2 3.34 3.94 4.05 4.07 4.08 4.1 4.12 4.14 4.14 4.17 4.19 4.22 4.24 4.25 4.36 4.67 4.91 5.09 5.23 5.34 5.42 5.5 5.56 5.6 5.64 5.73 5.8 5.85 5.93];
y = y/5.94;

plot(x, y, '-or', 'LineWidth', 1, 'MarkerSize', 6)
hold on
refline(0,0.707);

xlabel('Frequency', 'FontSize', 12)
ylabel('Output/Input', 'FontSize', 12)

Sunday, March 19, 2017

Week 9: High and Low Pass Filters

Problem 1: Measure the resistance of the speaker. Compare this value with the value you would find online.

Between 8.6 and 8.7 Ohms, the listed resistance online is 8 Ohms.

Problem 2: Build the following circuit using a function generator setting the amplitude to 5V (0V offset). What happens when you change the frequency?

The pitch of the speaker changes.

Fig. 1: Speaker directly connected to function generator.


Problem 3: Add one resistor to the circuit in series with the speaker (first 47 Ω, then 820 Ω). Measure the voltage across the speaker. Briefly explain your observations. 

Resistor value Oscilloscope output  Observation
47 Ω 448 mV peak to peak Period of the wave decreases as the freq. increases
820 Ω 54 mV peak to peak Same as the other resistor


Problem 4: Build the following circuit. Add a resistor in series to the speaker to have an equivalent resistance of 100 Ω. Note that this circuit is a high pass filter. Set the amplitude of the input signal to 8 V. Change the frequency from low to high to observe the speaker sound. You should not hear anything at the beginning and start hearing the sound after a certain frequency. Use 22 nF for the capacitor. 

a.) Explain the operation. 


Fig. 2: High pass filter explanation.

b.) Fill out the following table by adding enough (10-15 data points) frequency measurements. Vout is measured with the DMM, thus it will be rms value. 

Frequency Vout (mV)(rms) Vout (rms) / Vin (rms)
10 Hz 15.4 0.002570952
50 Hz 15.6 0.002604341
100 Hz 15.4 0.002570952
200 Hz 15.3 0.002554257
300 Hz 15.6 0.002604341
500 Hz 15.6 0.002604341
600 Hz 15.8 0.00263773
700 Hz 15.9 0.002654424
800 Hz 16.6 0.002771285
900 Hz 17.5 0.002921536
1 KHz 16.8 0.002804674
1.2 kHz 17.2 0.002871452
1.4 kHz 17.7 0.002954925
1.6 kHz 18.4 0.003071786
1.8 kHz 18.9 0.003155259
2 kHz 20.8 0.003472454
2.5 kHz 22.1 0.003689482
3 kHz 24.3 0.004056761
3.5 kHz 25.6 0.00427379
4 kHz 28.3 0.004724541
5 kHz 34.2 0.005709516
6 kHz 41.2 0.00687813
8 kHz 56.1 0.009365609
10 kHz 71.5 0.011936561
12 kHz 87.9 0.014674457
14 kHz 102 0.017028381
16 kHz 116 0.019365609
18 kHz 130 0.021702838
20 kHz 145 0.024207012
40 kHz 294 0.049081803
80 kHz 551 0.091986644
100 kHz 630 0.105175292
200 kHz 1120 0.186978297
400 kHz 1900 0.317195326
600 kHz 1920 0.320534224
800 kHz 2320 0.387312187
1000 kHz 2660 0.444073456

c.) Draw Vout/Vin with respect to frequency using Excel. 

d.) What is the cut off frequency by looking at the plot in b?

Between 80 and 40 kHz.

e.) Draw Vout/Vin with respect to frequency using MATLAB.


f.) Calculate the cut off frequency theoretically and compare with one that was found in c. 

V(Max)*1/sqrt(2)=.44*.707=0.311mV which is about 400 Hz, which does not coincide with what was found in part c at all.

g.) Explain how the circuit works as a high pass filter.

The circuit works as a high pass filter because low frequencies are blocked by the capacitor in series due to its impedance. As the frequency goes lower, the harder it is for the voltage to pass through the capacitor.

Problem 5: Design the circuit in 4 to act as a low pass filter and show its operation. Where would you put the speaker? Repeat 4a-g using the new designed circuit.

a.) Explain the operation.



b.) Fill out the following table by adding enough (10-15 data points) frequency measurements. Vout is measured with the DMM, thus it will be rms value. 

Frequency Vout (mV)(rms) Vout (rms) / Vin (rms)
5 Hz 330 0.05509182
10 Hz 330 0.05509182
50 Hz 331 0.055258765
100 Hz 332 0.05542571
200 Hz 334 0.055759599
300 Hz 337 0.056260434
500 Hz 348 0.058096828
1 KHz 373 0.062270451
5 kHz 338 0.056427379
10 kHz 343 0.057262104
50 kHz 582 0.097161937
100 kHz 835 0.139398998
200 kHz 1200 0.20033389
300 kHz 1810 0.302170284
400 kHz 1530 0.25542571
500 kHZ 1100 0.183639399
1000 kHz 429 0.071619366
2000 kHz 182 0.030383973
3000 kHz 105 0.017529215
4000 kHz 62 0.010350584

c.) Draw Vout/Vin with respect to frequency using Excel.

d.) What is the cut off frequency by looking at the plot in b? 

300 kHz.

e.) Draw Vout/Vin with respect to frequency using MATLAB.


f.) Calculate the cut off frequency theoretically and compare with one that was found in c. 

V(Max)*1/sqrt(2)=0.3*.707=0.21mV = 300 Hz which is was similar to what was found earlier.

g.) Explain how the circuit works as a low pass filter.

The circuit works as a low pass filter by having the capacitor in parallel with the output, and having said capacitor then grounded. This means that when given a low frequency, the capacitor will offer a higher impedance to the flow of electricity, allowing the voltage to flow unhindered. However, as the frequency gets higher, the capacitor allows for the voltage to flow across it easier, and since electricity follows the path of least resistance, it will flow through the capacitor, and not to the output, thus "filtering" out the high frequencies.

Problem 6: Construct the following circuit and test the speaker with headsets. Connect the amplifier output directly to the headphone jack (without the potentiometer). Load is the headphone jack in the schematic. “Speculate” the operation of the circuit with a video.