Monday, March 28, 2016

Week Eleven Blog

Week Eleven:

Part A: Strain Gauges:

1. Connect the oscilloscope probes to the strain gauge. Record the peak voltage values (positive and negative) by 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.


These are the values found from the oscilloscope, it seems that the higher the tapping or pressure we exert on gauge the more output voltage there is.

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 tap your strain gauge. Provide a photo of the oscilloscope graph.



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.





2. Calculate the effective voltage of the input and output and compare the values with the measured ones by completing the following table.




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






4. Replace the 1 microF capacitor with 47 microF and repeat the previous step. What has changed?


We observed a smaller output voltage when we increased the capacitor used in the circuit. This is probably due to the larger capacitor storing more of the energy than that of the smaller one.

Part C: Energy Harvesters

1. Construct the half-wave rectifier circuit without the resistor but with the 1 microF capacitor. Instead of the function generator, use the strain gauge. Discharge the capacitor every time you start a new measurement. Tap your strain gauge and observe the output voltage. Fill out the table below:


2. Briefly explain your results.

The longer the tapping went or the harder we tapped the output voltage would increase. And it would continue to increase until it got into the 100 mV range, that is when it would start fluctuating on the increasing. Once in got about 150 mV it did not want to stay up that high and would drop just as often as it would rise.

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?

We would observe no significant change in the output voltage of the capacitor. This is due to the sinusoidal curve of an AC signal. The diode allows only one polarity through (positive or negative) and that allows the capacitor to store up energy. If the whole signal comes through to the capacitor, the negative and the positive would cancel each other out at the capacitor, ensuring that the capacitor never has any energy stored in it.



Monday, March 21, 2016

Week Ten Blog

Part A:   MATLAB Practice

1. Open matlab. Copy and paste the appropriate code, name it, then post an image of the resulting plot here.



2. What does clear all do?

Clear all clears all work in the workspace.

3. What does close all do?

Close all removes specified figures. The specified figures in this case are "all", so everything prior to this command is to be closed. 

4. In the command line, type x and press enter. This is a matrix, how many rows and columns are in the matrix?

When you type x into matlab, the resulting matrix has 1 row and 5 columns for numbers 1-5.

5. Why is there a semicolon at the end of line x and y?

There is a semicolon at the end of line x and y to show that they are two different commands. Without the semicolon, matlab will read them all as one command. It basically "enters" between the commands to show that they are separate from each other. 

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

The error message says that inputs must be a scalar and a square matrix. To use exponents, you must use (.^) instead of (^). 

7. How does the linewidth affect the plot? Explain

The linewidth of a plot is the thickness of the resulting line. As you increase the linewidth, the accuracy and precision of the plot decrease. The line covers more area of the plot when the linewidth is thicker and therefore, you cant read the graph very precisely. 

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')

This is the given plot in which we should try to match

To add the circles, we use the command "ro-". The 'r' stands for red, the 'o' creates the circles at each point of slope change, and the '-' creates a solid line. We made the 'MarkerSize' to be 12, and the 'LineWidth' to be 4.



9. What happens if you change the line for x to x=[1; 2; 3; 4; 5]; ? Explain.

There is no change when you add semicolons in between the numbers.

10. Provide the code for the following figure. You need to figure out the function for y. Notice there are grids on the plot. 

Figure we should match. The equation for this line is y=x^2

To create this graph, we must label both axes, add squares around the points of interest, create a dotted line, and add a grid to the background. This is the code we used to do so.



11. Degree vs Radian in Matlab:
a. Calculate the sinus of 30 degrees using a calculator or the internet.

Sin(30) using a calculator in degree mode gives 0.5.

b. Type sin(30) in the command line of matlab. Why is this number different? (Hint: Matlab treats angles as radians)

When typing sin(30) into matlab, we get the number -0.9880. This number is different because Matlab read 30 as 30 radians instead of 30 degrees. 

c. How can you modify sin(30) so we get the correct number?

To modify the way Matlab sees 30, we should type 'sind' instead of 'sin' to show that we are using degrees, not radians. 

Our final code for calculating sin(30) is 'Sind(30)=0.5'.

12. Plot y=10sin(100t) 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 2 periods. Provide your code and resulting figure. The output figure should look like the following:


This is the code we used to create the following plot

This is the resulting plot, which matches the original plot




13. Explain what is changed in the following plot compared to the previous one.

14. The command find was used to create this code. Study the use of find and try to replicate the plot above. Show the code you used. 


Part B: Filters and MATLAB
1. Build a low pass filter in which the cutoff frequency is 1KHz. Observe the output using the oscilloscope. Collect several data points around the cutoff frequency. Provide your data in a table.

This is our data table with multiple points for the low pass filter


2. Plot your data using MATLAB. Use proper labels and make everything readable. Provide your code as well.

This is the code used to create the following plot

This is the resulting plot. As you can see, the cutoff frequency is around 1 kHz



3. Calculate the cutoff frequency using MATLAB. The find command will be used as well. Provide your code.


5. Build a high pass filter in which the cutoff frequency is 1KHz. Observe the output using the oscilloscope. Collect several data points around the cutoff frequency. Provide your data in a table.


This is our data table with multiple points for the low pass filter.

6. Plot your data using MATLAB. Use proper labels and make everything readable. Provide your code as well.




7. Calculate the cutoff frequency using MATLAB. The find command will be used as well. Provide your code.



Monday, March 14, 2016

Week Nine Blog

Week Nine Blog

1) Measure the resistance of the speaker.

The resistance measured using a DMM across the speaker is 8.2 Ohms. That means that this is an 8 Ohm speaker.

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


 The sound exerted by the speaker would change when the frequency value would change. If the frequency increases the tone of the sound will also increase (the pitch gets higher). Likewise if the frequency decreases the tone will also go down (the pitch gets lower). Throughout all of this the voltage of the circuit is unchanged, voltage controls the strength (volume) of the sound so the volume remains unchanged when the frequency varies.

This is the video explaining sound changes from the frequency changing.

Here is a table describing the different observations found at selected frequencies:

Table explaining the change in pitch

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


Table explaining our observations


4) Build the following circuit. Add a resistor in series to the speaker to have an equivalent resistance of 100 Ohm. Note that this circuit is a high pass filter. Set the amplitude of the input signal to 8V. 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.

A high pass filter uses a capacitor in series with a resistor and a speaker. This configuration causes the high notes to pass through the speaker while the lower notes are cut out. When demonstrating how a high pass filter works, you will hear that at a certain frequency, the sound "cuts off" and you can no longer hear the lower notes. This is used in applications where a speaker sounds best at certain higher frequencies, and allowing lower frequencies to pass through will distort the sound.

This is a video showing the operation of the high pass filter


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.

This is a table showing our measured values of the high pass filter

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

This is our plot of the high pass filter values of frequency vs vout/vin

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

Our plot did not have a big enough frequency range to see a certain cutoff frequency. By the looks of our plot, the slope begins to change towards 5.5 KHz. We expect the cutoff frequency to be somewhere after 5.5 KHz.

5) Design the circuit in 4 to act as a low pass filter and show its operation. Where would you put the speaker? 

The speaker is to be placed in parallel with the capacitor. Both of these come after the resistor, in series.

a) Explain the operation

A low pass filter allows the low notes to pass through the speaker, blocking out sound after a certain higher cut off frequency. The low pass filter is used in applications where a speaker sounds better with lower frequencies and will become distorted if higher frequencies are passed through it.


This is a video explaining the operation of a low pass filter


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.

This is our data table for the low pass filter

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

This is our plot of our low pass filter data


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

Looking at our plot, it looks like the attenuation started around 1KHz or before it. Everything after these values is diminished voltage. From this conclusion, the cut off frequency seems to be somewhere before 1KHz.


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.



This is a video explaining the operation of the circuit above. 






Thursday, March 3, 2016

Rube Goldberg #2

Rube Goldberg #2

At first, we will heat the temp sensor. The rise in voltage from the heat sensor will allow the counter to begin counting. Once the counter reaches 9, it goes through a series of logic gates that will produce an output voltage, only on binary 9. This will cause the motor to spin where it will knock down a set of dominoes. At the end of the domino train is Tipsy Tim, just waiting for someone to push him into his cab so that he can get home safely. Giraffes don't drink responsibly.

Here is a picture of one of our original designs:
This was one of our first set up designs, the main difference is that the
 relay sent its signal to the counter. We did not go with this plan because we
could not get the gates to do exactly what we wanted them to do.
We had many troubles when building this circuit. The first problem that we had was that the driver was outputting small voltages to segments that were off instead of 0V. This caused the gates to stay on when they're not supposed to be. Our next biggest problem involved our creative brains being temporarily shut off. We had few ideas for what materials to use because we are limited to what's inside of our dorms and the dollar store. The temperature sensor was very fussy and was at times unreliable in getting the circuit to run. We had a plan to use the temp sensor to trigger the counter but the pulse signal from the counter was too short to turn on the motor, so we rearranged the order of operations.

Here are some pictures of the construction and testing of the final circuit:
Here we are testing to see if the pressure sensor could work in this configuration
given that the weight of the object would not be very heavy. As you can see, Tipsy Tim
wanted to help us out.
Tipsy Tim also wanted to help us build the arm for the DC motor.
He also demanded that he build the domino track since he would
be the one would was getting hit by it. But Tipsy Tim didn't get his
name for no reason and after the first handful of attempts, allowed us to
build it for him.
In the end we set up our Rube Goldberg project where the temperature sensor would be amplified by a non-inverting amplifier, which would trigger the relay. The relay would start the DC motor once tripped. The motor had an arm attached to it that would knock down the dominoes, creating a ripple effect through the set up design. The dominoes near the end would branch off into two parts one would go back to the breadboard where the last domino would fall onto a pressure sensor, the other would knock Tipsy Tim off of the table and into a cardboard box below (we were on a budget). Once the pressure sensor was engaged the circuit we built in the previous week's class was turned on which caused the LED display to start counting between 0 and 9. An LED was attached through logic gates to only light up when the displayed number was 9.

Here are some videos of the different stages/ideas we were looking at throughout the week:

This is showing how the counter will work with the pressure sensor attached 
to the 555 chip.

Here we were working with logic gates to have an output signal only on a specific 
number. The original plan was to have the motor be on for the period of time but
we ended up going a different route with it.

This is us making sure that falling dominoes would in fact knock over Tipsy Tim


This is a video of us trying to get the dominoes to knock over Tipsy Tim as
well as get the dominoes to activate the counter by landing on the pressure sensor.

Our final project did in fact work, though unless you counted the time it took for the temp sensor to heat up enough, the final design did not last the full 30 seconds. When we showed the class our project everything went fine once the temperature sensor outputted enough voltage to flip the relay, the only thing that did not go the way we wanted it to was Tipsy Tim missed his box when he fell from the table.


Here is the final, complete Rube Goldberg project.