Sunday, April 24, 2016

Lab 14

Lab 14 Blog

A video description of our groups RG setup.



A video of a failed attempt to run our circuits together.



A video of a successful attempt to run our circuits together.


Sunday, April 17, 2016

Lab 13


Blog sheet Week 13:

This week’s blog sheet will be both individual and group.

Your blogsheet 13 tasks:
Tyler D:



1. Provide the updated computer drawing for your individual RG setup.

 
Breadboard Car setup


2. Explain your setup.
My set up is what I call a breadboard car.  It is made of LEGO type pieces and drives using a motor. The input to my car is a switch and may end up being a solar panel in the coming week. As of now it after the switch is flipped the power turns on the 555 timer and then using a resistor and capacitor on the trigger pin it is set to time out/shut off once it moves for 10 seconds. The output from the timer goes to an op am which outputs a higher voltage to a transistor which allows enough current draw for the motor to run give the cars size and weight.



3. Provide photos of the circuit and setup.



10 second Breadboard Car
Breadboard Car

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

 Breadboard car hitting the cabinet
There are 2 videos here and one of them shows the car stopping due to hitting the counter in my apartment so I considered this a fail. The other one shows the car stopping after 10 seconds, however it does look like it hit the counter.



5. What failures did you have? How did you overcome them?



The only failure I had that was never on video was the power consumption issue. At first I did not realize that the motor would require a transistor between it and the op amp. Once it was added to the circuit the motor was allowed to draw enough current to move the car. Before this was done I could not get the car to move.




Tyler L:
1.       Provide the updated computer drawing for your individual RG setup.
My Circuit....so far




2.       Explain your setup.
My circuit has the same idea as before, use a pressure sensor to trigger some voltage to go through an OpAmp to run a motor and pull back a catapult.  However I needed to increase the initial voltage coming in and add two transistors to handle the current I needed to successfully pull back to catapult. 



3.       Provide photos of the circuit and setup.
A picture of my circuit, but with only one transistor.  I added another later

A picture of the gears I added in order to wind my catapult.

A picture of my catapult.

My entire setup.




4.       Provide at least 2 new videos of your setup in action, one being a failed attempt.
This is a failed attempt at launching the ball, as you can see I need to keep the ball from hopping off the "bucket".
A successful launch of my catapult.



5.       What failures did you have? How did you overcome them?
During this week one of the biggest issues I had was getting enough current through to run the motor with all the resistance the rubber bands are giving it.  However with some help from my class mates and our professor I was able to figure out a way around this problem and properly get my catapult to wind back.  The biggest two things I did was to run the power supply linked so I was getting a 20 volt output from A and B, then the second thing I did was add two transistors to handle the load of amperage that I needed for the motor.


Tyler D & Tyler L together




6.       Group task: Explain your group RG setup.


Our group RG setup consists of a car made by Tyler D and the circuit with the catapult made by Tyler L.  The input to Tyler D's car is a switch that will be flipped by Vince using his motor setup. After my car drives for 10 seconds it hits a bunch of dominoes that will cause a magnet to fall over and be attracted to another magnet under the pressure sensor. Once this occurs the pressure applied to the sensor will be the “on” switch to Tyler L’s RG project. This in turn will trigger the motor to run, wind the catapult, and launch a ping pong ball across (hopefully) a few of the desks.





7.       Group task: Video of a test run of your group RG.
A somewhat successful run of our group RG circuits.

Sunday, April 10, 2016

Lab 12


Blog sheet Week 12:

This week’s blog sheet will be individual but you will post it on your group blog.

Your individual Rube Goldberg (RG) setup should satisfy the following:

1.       Use at least 2 of the following components:

a.       Transistor

b.       OPAMP

c.       Relay

d.       Temperature sensor

e.       Photo sensor

f.        Motor

g.       Display

h.       Strain gauge

i.         Speaker

j.         Microphone

k.       Solar panel

2.       Use a new circuit: It can be a modification to one of our lab circuits.

3.       Let your system complete its task in no shorter than 10 seconds.

4.       Make sure you are compatible with your preceding and following RG stage.


Your blog sheet 12 tasks: Tyler D.

1.       Provide the computer drawing for your individual RG setup.

Breadboard Car

2.       Explain your setup.
        The first step I took was to make the frame of the car and wheels using the components similar to LEGO pieces. Then I mounted a breadboard to the top of the frame as seen in figure below.  The next step was to power the car and the first video below displays the car moving along the table top. After this was complete I made the timer circuit on a separate breadboard to make sure I could get it to function properly. As you can see in the second video I have the timer set up so when power is applied to it an LED lights up for around 8-10 seconds before it shuts off.
       The next step was to apply the pressure sensor to the circuit so that when pressure is applied the timer would start and then after a given period of time it would shut off. Unfortunately you can see in the third video that the pressure sensor fails to activate the circuit so I will be trouble shooting this problem on Monday.
        The overall goal is to have Vince drop an object on the pressure sensor of the car and then it turn on and roll for 10 seconds at a slow speed and then stop over Tyler's pressure sensor to continue the RB circuit.

3.       Provide photos of the circuit and setup.
Initial Breadboard car setup

Timer/Shutoff Circuit




4.       Provide at least 2 videos of your setup in action, one being a failed attempt.
Breadboard Car in action
Timer Circuit powering LED for 8 seconds
Failed Attempt using Pressure Senor to Trigger Timer
5.       What failures did you have? How did you overcome them?

       The failures that I had was the unknown reason for the pressure sensor to not activate the circuit. This is the reason I did not add the pressure sensor inputs going to the 555 timer. I did not want to add them in the schematic if it did not work.  I will update the schematic once I get it to work. I also have not added the 555 timer circuit to the breadboard on the car because I was going to make sure I can get everything to work more spread out on a larger breadboard. Once I can get the pressure sensor to trigger the timer I will also replace the LED part of the circuit and add the amplifier which will connect to the motor. I did know this was going to work and be implemented so I added it to the schematic.

      Your blog sheet 12 tasks:  Tyler L.

1.       Provide the computer drawing for your individual RG setup.
Computer drawing of my circuit


2.       Explain your setup.

                   In my setup I will be using a 10V power source which runs through a pressure sensor to an non-inverting amplifier using a 1.4 kilo ohm resistor as R2 and a 273 ohm resistor as R1.  The non-inverting amplifier runs to a motor which has a string taped to it. 
                  When the pressure sensor is triggered the motor runs slowly, pulling on the string which is tied to a catapult using rubber bands as a source of tension.  When the catapult reaches around a 90 degree angle the string will slip off a smooth metal rod and launch the ping pong ball sitting in the basket.

3.       Provide photos of the circuit and setup.
My catapult

A previous idea for my circuit with a smaller motor

A previous idea for my circuit with a smaller motor
My current circuit set up

4.       Provide at least 2 videos of your setup in action, one being a failed attempt.
A video showing my circuit with the motor attached.
                                          A video showing my circuit without the motor.
                                           A video demonstrating how my catapult will work.

5.       What failures did you have? How did you overcome them?
                The greatest issue I am facing is that the OpAmp and output are not what I'm expecting.  When I do not have the motor grounded I read an output of 7 volts, which is sufficient to run the motor.  However when I ground the motor I read an output of 1 volt which is not sufficient to run the motor, and without the motor grounded it won't run anyways.  I am not sure why this is occurring and it is a continuing source of frustration.



















Sunday, April 3, 2016

Lab 11

Blog Sheet Week 11


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. 


Low flipping strength

High flipping strength


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.
Our oscilloscope in "single" mode

Part B:  Half-Wave Rectifiers

1.  Construct the following half-wave rectifier.  Measure the input and output using the oscilloscope and provide snapshots of the outputs.

Fig. 1

Half-wave rectifier input

Half-wave rectifier output

2.  Calculate the effective voltage of the input and output and compare the values with the measured ones by completing the following table:
Table 2:  calculated vs measured half-wave values
3.  Construct the following circuit and record the output voltage using both DMM and the oscilloscope.

Fig. 2
Our table of the output voltage
Since we have a partial DC signal the oscilloscope isn't able to measure the mean value of the output voltage.

4.  Replace the 1 microfarad capacitor with a 100 microfarad capacitor and repeat the previous step.  What has changed?

Our table of the output voltage with a higher capacitance

The larger capacitor is smoothing out the signal more than the previous capacitor.  Using the larger smoothing capacitor we are only seeing the DC signal.  We had an issue with the signal being close to the noise floor when we were using the AC coupling and when we changed it to the DC coupling we were able to distinguish the DC voltage ripple from the noise floor.

Part C:  Energy Harvesters

1.  Construct the half-wave rectifier circuit without the resistor but with the 1 microfarad 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:  (We're using a 47 microfarad capacitor)

Our table of measurements using the energy harvester
2.  Briefly explain your results.

As you can see from the above table, the longer you charge the capacitor the higher the output voltage.  It also increases faster the more times you tap the strain gauge per second.

3.  If we do not use the diode in the circuit (i.e. using only the strain gauge to charge the capacitor), what would you observe at the output?  Why?

When we remove the diode we observe only noise on the oscilloscope.  We are observing the capacitor charge and discharge continuously, the diode stops the charge from the capacitor going through it in the opposite direction.

Monday, March 21, 2016

Lab 10

Blogsheet week 10

In this week’s lab, you will collect more data on low pass and high pass filters and “process” them using MATLAB.
PART A: MATLAB practice.
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.
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)

This is an image of the plot we got with the above MATLAB code

       What does clear all do?
          Clear all clears all data and objects from the work space and closes the MuPAD engine which resets all of the programs assumptions.
       What does close all do?
          The close all function deletes all figured whose handles are not hidden.
       In the command line, type x and press enter. This is a matrix. How many rows and columns are there in the matrix?
          1 row 5 columns.
       Why is there a semicolon at the end of the line of x and y?
          When you are defining component equations you have to end the functions with a semicolon otherwise it will result in an error.  MATLAB needs the semicolon so it knows that is a function or definition, if you do not do this it results in an error message displaying an "unexpected MATLAB expression".
       Remove the dot on the y = 2.^x; line and execute the code again. What does the error message mean?
          The error message means that we are giving x values in vector quantities and our y is trying to display scalar quantities so if we put the dot before the exponent it will result in a vector output.
       How does the LineWidth affect the plot? Explain.
          The LineWidth 1 is equal to having a simple plot of x and y.  If you keep increasing the line width it increases the thickness of the line, possibly to make it easier to differentiate from others in the same plot.

       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’)
Fig. 1
             You would alter the line for the plot to "plot(x, y, '-ro', 'LineWidth', 4, 'MarkerSize', 16)"


       What happens if you change the line for x to x = [1; 2; 3; 4; 5]; ? Explain.
       From what we can tell nothing changes in the plot that the code executes.  Basically the semi-colon defines all the numbers in the brackets to x.  When you add a semi-colon behind each number it is doing the same thing, but in a different way.

       Degree vs. radian in MATLAB:
a.       Calculate sinus of 30 degrees using a calculator or internet.
       sin(30) = .5
b.      Type sin(30) in the command line of the MATLAB. Why is this number different? (Hint: MATLAB treats angles as radians).
      This number is different because when you use a calculator or the internet it generally calculates sin as a degree, while MATLAB gives answers as rads.
c.       How can you modify sin(30) so we get the correct number?
       sin(30*2*pi/360)
2      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:
Fig 2.
Code:
clear all;
close all;
t1 = linspace(0, (4*pi)/100, 10);
t2 = linspace(0, (4*pi)/100, 1000);
y1 = 10*sin(100*t1);
y2 = 10*sin(100*t2);
plot(t1, y1, '-ro', t2, y2)
xlabel('Time (s)')
ylabel('y function')
legend('course', 'fine')

Our graph generated by the code above
       Explain what is changed in the following plot comparing to the previous one.


Fig. 3
         In the graph in figure 3, the coarse line remains the same as in fig. 2 and the fine line differs from fig.2 because it is clipping the top of the sinusoidal line.

        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.







PART B: Filters and MATLAB

       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.


Our values for the low pass filter


       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.

clear all;
close all;
Frequency = [10 20 40 50 70 100 150 200 300 500 700 900 950 970 1000 1020 1050 1100 1200 1300 1400];
LPvoltage = [3.64 3.59 3.45 3.27 3.01 2.6 2.08 1.69 1.2 0.755 0.551 0.431 0.409 0.403 0.39 0.384 0.374 0.357 0.327 0.303 0.281]
HPvoltage = [0.356 0.692 0.885 1.57 2.01 2.49 2.94 3.17 3.38 3.5 3.57 3.58 3.64 3.63 3.58 3.55 3.53 3.58 3.58 3.58 3.58]
plot (Frequency, LPvoltage, 'o-r')
hold on;
plot (Frequency, HPvoltage, 'o-b')
hold on;
xlabel('Frequency (Hz)')
ylabel('Vout (V)')
legend('Low Pass', 'High Pass')


The plot of both our High Pass and Low Pass filters




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


clear all;
close all;
Frequency = [10 20 40 50 70 100 150 200 300 500 700 900 950 970 1000 1020 1050 1100 1200 1300 1400];
LPvoltage = [3.64 3.59 3.45 3.27 3.01 2.6 2.08 1.69 1.2 0.755 0.551 0.431 0.409 0.403 0.39 0.384 0.374 0.357 0.327 0.303 0.281]
plot (Frequency, LPvoltage, 'o-r')
hold on;
xlabel('Frequency (Hz)')
ylabel('Vout (V)')
legend('Low Pass')
y = find(LPvoltage<(.707*5));
for n=1: length(y)
    m(n)= y(n)
    a(n)= Frequency(m(n))
end
fcLP = max(a(n))
plot([fcLP,fcLP], [0,4], '--r');

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

Our values for the high pass filter

clear all;
close all;
Frequency = [10 20 40 50 70 100 150 200 300 500 700 900 950 970 1000 1020 1050 1100 1200 1300 1400];
HPvoltage = [0.356 0.692 0.885 1.57 2.01 2.49 2.94 3.17 3.38 3.5 3.57 3.58 3.64 3.63 3.58 3.55 3.53 3.58 3.58 3.58 3.58]
plot (Frequency, HPvoltage, 'o-b')
hold on;
xlabel('Frequency (Hz)')
ylabel('Vout (V)')
legend('High Pass')
x = find(HPvoltage<(.707*5));
for n=1: length(x)
    m(n)= x(n)
    z(n)= Frequency(m(n))
end
fcHP = max(z(n))
plot([fcHP,fcHP], [0,4], '--b');