Monday, April 29, 2013

Final Project: Photos


 Views from different angles:






We may need to work on the aesthetics aspect and more importantly (most importantly), the reader's ability to read music (we have to recalibrate the photocells).

Saturday, April 27, 2013

Final Project: Component Integration/Update

We finished our looks-like model on Solidworks and cut the pieces using the laser cutter (Thanks, Essie!).

When we first cut out all of our parts, we realized the parts were too loosely fit (so we needed to use glue and nails). I had to practice hammering because the wood was too weak for the nails and broke apart. Also, when we built our music reader, we had a little group conflict over the placement of the motor. We were split between whether to place the motor inside or outside of the wooden outer structure. In the end (without any ill feelings), we all decided to enlarge our base piece to include space for the motor. Since the original width was ideal for the photocells, we kept a middle separator in the box (wooden structure) to have that same sensor box on top (sensor box is where the photocells and the LED light are placed). Also, the first time we printed, the drawer was too low (the motherboard was not able to come out), and the sensor box had to be enlarged (because we forgot to consider the amount of space the wires take up). So, we cut out the pieces the second time with all of these changes and improvements.

 Individual parts before assembly.



Working with sensor box.


We also worried about aesthetics, so we included musical note designs on our music box. We also used wood instead of Delrin because using wood gave the reader an old, classic feel.

We are still working on placing all the wires neatly inside the box. We will have to recalibrate our photocells because they will be in a different environment (before our sensor box was made of Legos versus wood).

 Our outer wooden structure (second time we cut out the pieces. Note the middle separator. The first design did not have that piece.)

 Our Music Reader. 


Another view of our music reader. Notice the drawer, which one would open to turn on the reader.





Thursday, April 25, 2013

Final Project: Looks-Like Model

At first, my group was confused on why we had to work on works-like model before looks-like model. But, we realized this order made more sense. We had to make sure all the main components functioned correctly before considering the appearance.

For our looks-like model, we had a general understanding of what our music reader would look like (from our brainstorming step, but we made several adjustments. We measured each part (motherboard, photocells, motor, sound box, LED light, scroll moving mechanism) to help us draw accurate models using Solidworks.

We decided to use wood for our material (because of the price and our music reader would look an old music box).

Our assembly drawing on Solidworks

The drawer is where one would find the motherboard (we are planning to cover the "ugly" motherboard for aesthetics). 

The top box is where the photocells would be located. 

Music reader with motherboard.

The other side of the music reader. The musical notes are there for decoration, the bigger holes are there for wires. The smaller holes and the opening are there for the scroll ends. The upper box is where the photocells and the LED light would be located. The motor will be under the smaller holes (on the right of this drawing).

Engineering Drawing of our parts. We will be using the laser cutter to actually create our music reader.

We also created models of some of our parts using cardboard to better understand what the music reader would look like. 

Wednesday, April 17, 2013

Final Project: Works-Like Model

We had to prepare a works-like model (a model that does not necessarily look like the final model but has similar/same functions).

We experimented more and worked on the photocells so that they would detect black dots and then play a sound. The most challenging part was calibrating each of the eight photocells to make sure that they did not trigger the sound when the photocells detected white (and trigger the sound when they detected black).

We drew the first 7 or 8 notes of "Ode to Joy," and our music reader was not perfect but was able to read several of the notes.

Next time, we need to work on the scroll moving mechanism to make sure the scroll moves straight.

Our program on PICO Blocks after we calibrated each photocell.

 Our program on PICO Blocks to test for sensors (photocells), sounds, and LED light (color).

We drew a thick black band to make sure when the sensor mechanism was over the strip, all of the notes played (one by one).


We tried to test and draw the notes in "Guitar Hero" style, but this did not work too well. 

 Our works-like model. It has a lot of flaws, but we will continue working on it.



Tuesday, April 16, 2013

Final Project: Testing of Critical Elements

Today was all about testing key elements. For our project (music reader), these important parts were the photo cells and the mechanism that moved the sheet music (scroll) along.

1.) Photocells:

We first obtained 8 photocells so that the sensor mechanism can detect 8 different notes. We attached these pieces with Lego (the photocells are connected to Lego pieces). Jamie drew black circles on a white sheet of paper to check if the photo cells were able to report different numbers for when they detected white and black.

Our photocells (music reading mechanism)

We checked with the photocells to see how wide the scroll would have to be.

We drew black dots and gray dots (gray dots did not work well at first). On white, the numbers reported were in the low 800's, whereas on black surfaces, numbers around high 800 - low 900 were shown.

We then noticed that the photocell mechanism cast shadows on the white paper. To solve this problem, we thought we should build a "shield" around the photocell mechanism. However, this still cast a shadow, so we decided to use a LED light (flashlight) to make the surface (the mechanism would be focusing on) brighter.

We created this temporary "shield" with sticky note pads.

Our photocell mechanism with the "shield" (still temporary) and the LED light.

We tested the photocells to white and black surfaces.

We used PICO Cricket to program the photocells. 


Our program on PICO Blocks. We learned to program in text (versus using the blocks). We made the music reader (still in progress) chirp whenever the photocells detected light (number became greater than 550).

Conclusion:
We got to the point where we programmed four of the eight photocells to play a sound when it detected a light with value of more than 550. We also made it so that the four notes were different (in pitch).

2.) Scroll Moving Mechanism:

We had ideas of having a conveyor belt-like mechanism but decided to build a mechanism that would unwind and move the scroll (sheet music) along. 

We first tried to punch holes on the scroll ends and attach to these Lego pieces (scroll ends). But the pieces that stuck out prevented the scrolls from rolling in circles (there were occasional jerks in movement), so we tried to hold the paper in place by using paper clips. This method also failed because the paper clips were not secure (kept moving about the Lego rod). 

(Paper clip method did not work. This also created jerks in movement.)

Another problem was that we held the motor and the scroll parts to test the movement but soon realized this was not the best way to test this critical element. Therefore, we built a temporary base for the music reader with Lego pieces mainly for stability and to estimate the size of our music reader (since this scroll moving mechanism would take up the most amount of space). 

Our temporary base for the music reader.

We also realized there were jerks in the movement because the scroll was not long enough (we had taped two pieces of paper for greater length). Instead, we went to the library and obtained a longer piece of paper. 

(The video files were too great in size, so I could not upload them).

Conclusion: Obtaining a longer piece of paper (which we need anyway to have a full song) and the constructing of the base improved the mechanism and allowed for smoother movement. 





Friday, April 12, 2013

Final Project: Goal, Brainstorming, Research, Pugh Chart

Group: Hannah, Jamie, Punzi (Julia)

Goal: 

Initial rough sketch.

We wrote down our goal to make sure we knew what we were doing and where we were heading. We also added some scribbles and rough sketches to brainstorm. We thought of having conveyor belts, photo cells, and wondered if we wanted actual music notes or "guitar hero-like notes" for our sheet music.


(Rewrote our goal to be clearer and more organized.)

We talked to different professors about light sensors (photo cells, mindstorm NXT light sensors, etc.) and about programs (PICO blocks or MATLAB) as part of our research to determine which methods or ways would be ideal for our music player/reader.


Our Pugh Chart.

We created a Pugh chart to compare different methods or parts and decided we were going to use simplified natural music notes for our sheet music, photo cells for our light (black vs. white) sensing mechanism, and PICO/LOGO to program our music reader.


More on Part A: Sensor and Programming

We were brainstorming and researching. We broke down our goal into three parts: (a) sensor and programming, (b) feeding and structure, and (c) ambitious goals. Our idea was that the photo cells would detect the black music notes while there is some motor or belt mechanism that moves the sheet music (scroll) along so the device can read and play a simple piece. 



Ideas on structure. (Will probably be modified.)

Ambitious Goals.

Brief Reflection:

I really enjoyed going through these engineering processes because it really helped me understand what I was doing and became more interested and passionate about my assignment.

Wednesday, April 10, 2013

Random


Worked with Bromothymol Blue (indicator) in Chemistry 205 Lab. Had fun creating these solutions. Writing the lab report was not fun.

Thermal Systems Part II


Deliverable 1:
A blog post (or section of a post) containing a MATLAB figure,
such as the one below, showing your experimentally measured heating curve along
with a derivation of the thermal parameters that you have deduced from the figure.
You should also document your time constant, and how the expected time for the
system to respond, based on that time constant, matches the actual time.

Our experimentally measured heating curve 

Values deduced from the curve above:
Rth (thermal resistance) = 18.897 K/W
C (heat capacity) = 5.476 J/K

time constant = Rth * C = 103.479972 J/W (expected)
actual time constant = 63.2% (426.5633 K - 303.7299 K) = 77.6307 J/K
They didn't match because there were several areas of possible errors (such as the error from calculating the initial slope). 

In physical terms, the time constant is defined as the time required for the system
to reach ~63.2% of its final asymptotic value.

------------------------------------------------------------------------------------------------------------

Deliverable 2: 
Your modified heatsim.m program, which generates
simulated heating curve. Comment on the ways in which the results of the
simulation agree and / or disagree with the experimentally measured results.

Modified program. (Title should be %simulation of resistor.)

Plot for the program above.

Our simulated heat curve was a lot smoother with a steeper slope until the temperature stabilized. It was a lot smoother because in real life, temperature is constantly changing due to various factors, which is why the experimentally measured plot has more oscillations. 

------------------------------------------------------------------------------------------------------------

Deliverable 3: 
Implement a bang-bang controller in MATLAB with a target
temperature of 340 K. How does the behavior of bang-bang control in actual
thermal system compare to the simulation you did last time? (You’ll need to insert
the correct values of the thermal parameters into your simulation.) Include the
answer to this last question as a comment at the beginning of the MATLAB script
you submit.


The bang-bang control causes more obvious oscillations, which is reasonable. The heat curve above showed the heating of the metal resistor until it reached its hottest point. Here, with the bang-bang controller, we had a target temperature, and in order to reach that target, power was turned on and off depending on the "current" temperature at the moment (of course, there would be some delays). 



Bang-bang controller program (We need to include more comments next time.)

Plot from our bang-bang controller

------------------------------------------------------------------------------------------------------------

Deliverable 4: 
You should turn in your results, the main one being the graphical
comparison of the simulation and experiment. Provide a short description of each figure so we
know what the data are. You should also include the MATLAB scripts that you
used to create these figures, identifying the values of the heat capacity and thermal
resistance that you deduced. Also make sure to answer the bulleted questions
below.

• Can you explain why the system does not reach the control set point when
the proportional gain is small? 
This is because if the gain is too small, the system errors or disturbances become significant and prevents the system from reaching the set point. Even when the error is large, not enough power is supplied. 

• How does the system behave when the proportional gain is high? 
When the proportional gain is too high, too much power is applied even when that amount of power is not desired (when the error is small). We do not want full or large amounts of power for the whole time. 

• What seems to be the “optimal” gain setting for your system? 

To determine the "optimal" gain for our system, first, we thought about the initial point. Our starting temperature was about 303K, while our target temperature was 340 K. This meant that the difference in temperature or our error was about 37K. To reach 340K, we needed full power which would be 100 (in percent but is actually 6.5 W in real life). 

100 = gain * 37
gain = 2.7

Our program for the Proportional Controller

Plot for the Proportional Controller

The proportional controller definitely had smaller, more unnoticeable oscillations than the bang-bang controller had. Also, compared to the experimentally obtained plot which immediately started heating up, the proportional controller had a smoother rise to this target temperature. 

Our proportional controller (with blows)

You can see that the blows caused larger oscillations, but the temperature returned to 340K or a value close to 340 K, which was what we wanted. 

------------------------------------------------------------------------------------------------------------

Deliverable 5:
Your final MATLAB script that controls the temperature of the system. Make
sure to add lots of comments explaining what your program is doing.

• Relevant experimental data, in the form of well-labeled graphs, from your
constant temperature hot-wire anemometer experiments. Your graphs should
make a compelling case for how well (or perhaps not well) your hot-wire
anemometer is working.

• Your simulation of a PI controller and a comparison to the experimental
data.

Our program using PI controller (both proportional and integral)

At first, we struggled with the gain values and noticed our target temperature was not reached or was surpassed. We realized that the "error" was significant in our "if then" statement because this "error" affected the integral error. (At first, we used integral error in our if then statement.) Also, we were initially experimenting with only the integral gain values. However, we realized we also had to change the normal gain (proportional gain) also.

Final Values: 
proportional gain = 2 (slightly less than 2.7, which was what we used for our proportional controller)
integral gain = 0.35 (after experimenting with 0.2 and 0.5). 

Plot for our PI controller

We noticed the oscillations were fewer and more spread out compared to our proportional controller and bang-bang controller. Also, compared to our experimentally obtained plot, this plot was a lot smoother. 

Plot after blowing 

The blow caused some oscillations, but the controller made the temperature return to a value close to 340 K, the target temperature. This plot looked similar to the plot created by the proportional controller after blowing. 


------------------------------------------------------------------------------------------------------------