Photo

Photo

Monday, April 25, 2016

Final Project Week 4

This week, we got our wood and were able to begin building our cubby! Unfortunately, as real life never turns out exactly as planned, we had to make a few changes immediately. The first thing we had to confront was the fact that the widths of the sheets of plywood were cut incorrectly. This meant that we had to scale down our design to reflect the change. In addition, as is the nature of wood, a few of our boards were slightly warped and did not lay completely flat.

Here are diagrams of our new desired dimension:



After we calculated our new dimensions, we sought out Larry's. He showed us how to safely use a table saw to cut our planks into the desired sizes. Safety rules we needed to keep in mind included turning the machine off after every cut, keeping other materials off the table when cutting, and making sure to drive the plank all the way past the blade when cutting. If you don't run the plank all the way past the end of the blade, you risk having the blade shoot the plank back at you. According to Larry the force of the table blade's saw is strong enough to fling a piece of wood into a concrete wall – so we really want to avoid that. The table saw is a very useful machine, but it is also a very dangerous piece of equipment, so we need to exercise extreme caution when using it. It is also important to note that safety glasses should always be worn and hair should be tied up.

Once, we had our pieces, we were then able to start assembling. Also huge shout out to Larry for letting us borrow his drill and drill bit! Pilot day with Becky was approaching quickly, so we had to work efficiently. The first thing we tackled was the attachment of the drawer slides. This was the hardest part of the assembly, but it also had to be one of the first things we did... We decided to attach the drawer slides toward the bottom sides of the cubby buddy because in our experiences, we've conventionally seen them placed toward the bottom of drawers. After some advice during the pilot day, we realize that we might be wrong with this decision...

The drawer slides were very difficult to put in because they needed to be attached to both the side of the cubby buddy and the side of the cubby – there wasn't a lot of space for error. Due to the amateur nature of the installation and the fact that we used dry wall screws with slotted heads (they're harder to drill in), we ended up stripping a screw or two... oops. Surprisingly we didn't split any planks during this process. This cannot be said for the rest of the assembly process.

Once, we attached the drawer slides, the rest of the assembly process felt like a breeze, although we were plagued with a few split planks every once in a while. To avoid this as much as possible, we set the drill to the lowest setting. When the screw was drilled in slanted however, the splitting was inevitable. Our solution to split planks was using some wood glue to make the splits less apparent and drilling another hole further down the plank.
For the most part the assembly didn't include any further setbacks, although we screwed on the top of the buddy before screwing in the supports. This wouldn't be a problem except for the fact that the drill didn't fit into the space between the planks, so we needed to remove the top of the buddy before we could attach the supports. Oops. This was a relatively minor setback.

By pilot day, Friday, we had our cubby buddy assembled sans the arduino portion and a few minor details. The presentations took place in the Child Study Center, so we needed to bring everything over to the CSC. This was quite the arm workout, but the cubby buddy make it over to the CSC safely and in one piece!

At the CSC, we were able to see the progress of everyone else's projects. This was really neat seeing the evolution from abstract concepts to physical prototypes. I'm very excited to see the final products!

During our meeting with Becky, we presented our project and discussed some of our and Becky's concerns. One thing we noticed was that when we pulled out the cubby buddy, since our cubby buddy is built on top of the floor of the cubby, the buddy would be 11/16ths of an inch above the ground. This instability was concerning and after some discussion we decided that adding a piece that poked out a little bit, about 1 inch, wouldn't be too much of a problem. Professor Banzaert also brought up the point that the flooring in the CSC is carpeted, something we forgot to take into consideration. She suggested that we attach a piece of delrin to the bottom of the added plank that would make sliding the buddy in and out less difficult.

As a mentioned earlier, also regarding the stability of the cubby buddy was the decision to place the drawer slides toward the bottom of the drawer. Amy Q brought up the fact that this was true, but in general drawers are built opposite the way ours is. Our design can be viewed as an upside down drawer, therefore we should've placed the slides towards the top. Unfortunately, as I mentioned a few paragraphs ago, the amateur installation of the drawer slides meant we stripped some of the nail heads... However, since we did add in right angle supports underneath the cubby buddy and our goal is supporting a 50 lb child, it shouldn't be too much of a problem. If we were to create a second cubby buddy/ cubby, this is a change we would definitely make.

We also decided to change the placement of the button from the side of the cubby to the back of the cubby. If we were to place the button on the side of the cubby, the button would be clipped every time the cubby buddy was pushed back in making it more likely to be broken. By placing it in the back, there wouldn't be a clipping effect. We also decided to add some planks to the back of the drawer because our cubby buddy doesn't extend completely to the back of the cubby and there was some concern that space towards the back could lead to the possibility of wedged items which would prevented it from being pushed back in completely.

 We also decided to add a few minor details that included placing the arduino on the top of the cubby so the children wouldn't be tempted to play with it. We would need to drill in a few holes so that the wires would extend down to where the lights would be placed and to the very bottom where the push button would be. Speaking of the lights, we decided to keep our original idea of including lights on the edge of the cubby. This would make it so that it would be more apparent that the cubby buddy wasn't pushed all the way even if big puffy winter jackets make it hard to see the sign during the colder winter months.

All in all I don't think we're in a terrible place. We have to make a few simple edits to our design and work on some soldering and the placement of our pushbuttons and LEDs. It's not going to be a cake walk, but it seems very manageable!

Monday, April 18, 2016

Final Project Week 3

We spent this past week creating a cardboard prototype of our final product and doing some research to figure out what sort of materials we needed to buy.

After doing a bit of math, mental deconstruction, and the help of Solid Works, we were able to calculate the amount of plywood that we would need for our project. We had to first decide how each piece would fit into another – does this piece go on top or does this other piece. Once we figured out all the details, we were able to conclude that one sheet of 4ft x 8ft would be enough. This is great because one sheet costs about $26.50 and we didn't want to blow our whole budget on wood. There is a very small margin of error when it comes to our wood usage, so hopefully, once
we get our hands on the plywood, the cutting will go smoothly! *knocks on wood to be safe*

In addition to the wood, we needed to buy some drawer rails. In our previous posts, we talked about how we were planning to use wheels, but after consulting Amy, she told us that drawer slides would be much easier to use. We managed to find some on Amazon that were relatively cheap – around $9 for a pair.

We also added some support pieces after consulting with Larry. After a brief discussion about our plan, Larry suggested that for added support, we should add some L brackets to the underside of our design. We thought that this was great advice and was able to find some for about $2 a piece.

When we brought up the idea of a handle to Amy, she shared with us the idea of having a hole instead of a handle. By creating a hand hole (where we've labeled handle), the children can easily open the cubby without the fear of running into them on a daily basis. Plus this lowers the initial estimated cost of our cubby.

Our initial plan includes having hand holds on the cubby for the kids to grab onto for balance when they step onto the cubby buddy. Becky was very excited about our idea, however, we are having second thoughts about having handles for fear that the kids might run into them. We are planning to include some handles in our prototype, but will definitely bring up our concerns with Becky during our Pilot Day.

We also managed to write up a working Arduino code for the
flashing LEDs. When the button is pressed, the drawer is pushed in, the LEDs should be off. When the button is unpressed, the drawer is not pushed in, the LEDs should be blinking.

It is a fairly simple code, but since we haven't worked with Arduino in a few weeks, it took a little bit of a refresher to remember how the wires lined up. With the help of our old blog posts, we were able to figure out the connections with no problem.


Here's a video of our blinking LED code:

Since we're using an Arduino board for our project, we needed to learn how to solder our wires and board together. Vivian, Rachel, and I already have a little experience with soldering from Physics 108, but we thought a refresher would be very helpful.

Soldering is the process of creating an electrical connection between two electronic parts. Using a soldering iron to heat up the pieces to be connected, we then bring a piece of conductive wire near the pieces. This wire will than melt and connect our two parts. As the melted piece of wire contains lead, it is better to err on the side of caution and avoid breathing in any fumes.


After Amy's demo of the soldering process, we were able to put together a small either robot or spaceship with blinking lights. I chose the robot!

All-in-all, I feel that our group is in a good place. The biggest challenge will definitely be getting the boards cut and assembled in time for Friday's pilot day.



Friday, April 15, 2016

Thermal Systems Part 2

For the second half of our thermal systems work in MATLAB, we got to test out our coffee simulation in real life with simple 50 ohm heater, a thermal reservoir, and a temperature sensor. After some initial setup of the MATLAB program, we are ready to begin.

Deliverable 1:

For the first deliverable, we were given a code to run and examine. By examining the graph the program produced of the rise in temperature of the heater and using a few equations we've learned about and used in part one, we were able to solve for the Rth(resistance) and C(capacitance) that would allow us to simulate a similar scenario. 

By estimating the initial slope and using our handy dandy equations, we found values of 6.9 and 16.2 for Rth and C repectively. Given the equation to the right, we calculated a theoretical time constant of 112.1 s. At time 112.1 s, the temperature of the system was 338.6. K

The time constant is defined as the time the system takes to reach 63.2% of it's final value. So, in order to calculate the actual constant, we found the total temperature change and calculated 63.2% of that. Added that number to the original temperature of the system and we calculated a temperature of 333.4 K. This tells us that our theoretical time constant is a little bit larger than the actual time constant.



Deliverable 2:

When we recreated our simulation of the heating coffee and compared it to the more realistic scenario with the heater, we founded that both graphs were very similar. The graph from deliverable 1 is scaled a little differently, but when you zoom in closer it has a very similar curve to the one we find in deliverable 2. The most apparent difference is that the room temperature from our simulation does not match up with the actual initial temperature of the heater. We also found that while our simulated version gets a temperature of ~335, in our deliverable 1, we only managed to raise our temperature to ~327 K.





Deliverable 3:



Here's a close up of the section of temperature values at the plateau

as we can see from the right side of the graph the bang bang is being implemented
Our simulated bang bang graph

Deliverable 4:

When the proportional gain is small, the system is unable to reach the control set point because it is increasing temperature at a such a small rate, the it reaches an asymptotic state long before the temperature can reach the goal of 340K. When the proportional gain is larger, the temperature rises very quickly in the beginning and plateaus. This suggests to us that the optimal gain is a Kp value around 0.2 in which the temperature more gradually reaches the goal of 340K.






Kp = 0.5 – reaches 340K really quickly

Kp = 0.2 – gradually reaches 340K
Kp = 0.05 – never reaches 340K

Overall, we found that working with circuits on the MATLAB was pretty neat, but it was not without it's challenges. In comparison to the simulations, the actual heating took a lot more time to produce really similar results. Unlike in the simulations, every time we ran the program we had to wait for the heater to run for the time determined AND the time necessary for the mechanism to cool down. This was especially frustrating when in the midst of debugging. But, all in all, this was an interesting exercise in coding and the various methods of heating an object (bang bang v. proportional).



Monday, April 11, 2016

Final Project Week 2

For our detailed proposal, we hashed out a few of our ideas of how our step-cubby/Cubby Buddy would work. Here are a few of the slides we included in our powerpoint.

Sketches of our concept and measurements
The various things we wanted to keep in mind with our project was to make sure that our product was safe, cost efficient, space efficient, and easy to use.

Our basic concept is that our cubby buddy would have two side panels and a top panel. It would not have a bottom panel, so that anything placed in the bottom cubby, usually shoes, can still be stored without hindrance. Our cubby buddy would also have wheels that would allow it to easily slide back and forth in a grooved path.

As such, we added a few details to our initial proposal. We wanted to make sure that the cubby wouldn't fall out by itself, so we took inspiration from a buckle and wanted to crete a simple locking mechanism.

We took further inspiration from around the lab decided to give our design a handle similar to the one on our tool drawer cabinet.

We also wanted to position our lights so that it would be easy for the kids to see/notice. Since the kids aren't very tall yet, it seemed like a good idea for us to place some lights under the top shelf.

We also decided to add handles that the kids could use to pull themselves up and for stability purposes. Safety is key.

After our presentation, Becky gave us her feedback. She suggested that we create some sort of sign that would help associate the colors with the sort of reaction we want to elicit from the kids.

She also told us that since children are born a little more top heavy, if we could make a design that would allow the kids to kick the drawer back into place, that would both be safer and more enjoyable for the kids. We should then somehow include a picture of a foot to indicate that the kids were allowed to kick the drawer close.

After talking in Xi Xi, we decided that for spacial reasonings, it probably won't be smart to use a force sensor. Instead, we came to the conclusion that it might be more ideal to use either a photosensor, an encoder, or ultrasonic sensor to sense the movement of the cubby away from it's resting position. This would therefore replace the force plate in our initial feedback and control system. This then simplifies our control portion of the system. Whenever the cubby buddy is in use a red led would blink repeatedly.

We also decided that we would definitely need to construct our own cubby for this project and as such we will mainly be using wood and nails/screws for our project. We will also need to buy four wheels for the feet of our cubby buddy.

Once we have our cubby built, using the measurements we took while at the CSC, we should have a better idea of any more changes we want to make!

In other news... baseball season has started and the SF Giants are at 5-2. Here's a clip of Hunter Pence's opening day grand slam against the LA Dodgers' Pedro Baez.




Sunday, April 10, 2016

Final Project Week 1

For our final project, Rachel, Vivian, and I wanted to work with the Child Study Center. A few ideas we had included, creating a step for the kid's cubbies, a sensor to measure the depth of the water, and an apparatus that helps to makes it more fun for kids to wash their hands.

Step-Cubby:



For our step-cubby idea, we wanted to created a device that is fitted into a cubby and will make it much easier for the kids at the CSC to reach the higher shelves of the cubby. The step-cubby would be pulled out by the child and they would be able to step on top of it. There would be a force plate on top of the step-cubby that would be able to sense when the child stepped off. Once the child has stepped off and the force sensor senses no force for a given number of seconds, the cubby will push itself back in.


Water Level Sensor:



At the CSC the kids have this small table filled with water and sand. Because of the nature of kids playing with water, the teachers at the CSC find themselves needing to repeatedly check to see if the pool/table needs to be refilled. Our concept is a device that is able to sense the the varying levels of water that will be able to notify teachers in the CSC when the water is at a level that requires filling.


Musical/ Light-Up Sink:



Our third idea is a solution to the problem of getting kids to wash their hands. This idea was inspired by the existing music playing toothbrush. The sink would have light sensors that would allow the system to sense the presence of a hand. From there a song would begin playing and a green light would turn on. After a predetermined amount of seconds, the light will turn yellow, which will prompt the child to apply soap. After a second predetermined time, the light will turn back to green and prompt the child to rinse after. Finally, after enough time has passed the light will turn red and the song will turn off, telling the child they have now sufficiently washed their hands.

Post Initial Pitch:

After our initial pitch to the class and after a discussion with Amy, we decided to go with our step-cubby idea. We also decided that it would be safer for the feedback and control to NOT push the step-cubby back by itself, in case of malfunction. Instead, we came to the conclusion that the force plate should instead control a set of lights. When the child stepped on the cubby a green light would turn on. When the child stepped off, a red light would blink on and off to reming the child to push the step cubby back into place.


Tuesday, April 5, 2016

Thermal Systems Part 1


To start off this assignment, Amy gave us a brief presentation of Newton's Law of Cooling and the math and physics behind thermal systems. We were then tasked with using MATLAB to examine and update a simulation of a cup of coffee being either heated or cooled. For this assignment, I worked with Rachel and Vivian who are also my final project partners.

Exercise 1

We were given the first code, which depicts the cooling of coffee. We were than told to determine how varying the parameters Rth and C would effect the program. Looking at the equation for Newton's Law of Cooling (to the right), we see that both Rth and C are inversely proportional to dT, the corresponding temperature rise. This suggests that as Rth and/or C decrease dT increases. Likewise, as Rth and/or C increase dT decreases. We tested this out by lowering Rth from .85 to .15, increasing Rth from .85 to 10, lowering C from 1k to 5, and increasing C from 1k to 1M. As we anticipated, when we decreased the value of either Rth or C, dT increased more quickly and the coffee reached it's desired temperature more quickly. When we increased either Rth or C, dT increases a much slower rate, so you can't even see the whole image on our graphs! You'd have to lengthen the tmax, duration of the simulation, in order to see when the coffee finally cools to air temperature.



Rth = .85; C = 1000
Rth = 10; C = 1,000
Rth = .15; C = 1,000

Rth = .85; C = 50
Rth = .85; C = 1,000,000


Exercise 2

In this next exercise, instead of cooling the cup of coffee, we explored the scenario of heating up a cup of coffee from room temperature. To do this we used a slight variation of the previous equation. Because we are now increasing the temperature of the cup we need to add thermal energy at a constant rate P. To determine a good value for P, we needed to use MATLAB. To do this we needed to isolate P onto one side of the equation and since the difference between the initial temperature and the temperature of the coffee is zero, we set dT/dt to zero. When we typed this equation into MATLAB, the program spit out an answer of roughly 75.














Exercise 2b

For the continuation of this problem, we were given the program for the heating of a cup of coffee and asked to deduce the thermal parameters of C and Rth when looking at a plot of the data.

In order to find Rth, we looked at the equation P = ΔT / Rth. By isolating Rth, we were left with ΔT / P on the other side. Plugging in the values for ΔT (357-293) and Rth (75), we calculated a Rth of .84. 

In order to find C, we looked at the special circumstance of t = 0. When t = 0, for a short duration of dt, we have the equation dT/dt = P/C because we can assume the difference between the temperature of the cup and the temperature of the surroundings is negligible/really close to zero. Isolating C, we get P/(dt/dT). dt/dT is also known as the slope of the equation and can be determined by eyeballing the slope at t=0. The slope, therefore, will vary person by person. I personally think it looks like it is approximately, 20 / 250. This then gives me a value of approximately 950 for C.











Exercise 3

In our next exercise, we need to create a code that raises the temperature of the coffee to the desired temperature and maintain it there. To do this, we repurposed the equations above. We turned the two statements into if/else loops and put it within a greater while loop. We also needed to increase the value of P, because a P value of 75 doesn't heat up the coffee very quickly and in order for bang bang to work, we need a scenario in which there is some over and under shooting.

This gave us our desired result. When the coffee's temperature is below 357 degrees K, the if code will be initiated and the heater will turn on. When the temperature of the coffee was greater than the desired value of 357 degrees K, the else statement command would be initiated (i.e. the heater would be turned off and the coffee will cool down). This gave us our expected zig zag type plot. As a result, the cup of coffee never stays at 357 degrees, but jumps back and forth between being a little warmer and a little cooler.




time (s) v. temperature (K) graph
a zoomed in section of the graph



Exercise 4

This next exercise is a variation on #3. Instead of using Bang Bang control, we need to create a coding use proportional control to reach and maintain the coffee's desired temperature.

To start with, we repurposed the while loop from the heating up of the coffee. We decided to make the power of the heater proportional to the difference in temperature of the room and desired, 357 degrees K. We know that when the temperature difference is 0 or when t = 0, that the heater should be on a high power and when the temperature difference reaches 84 degrees, the heater should be on low power. So we estimated appropriate power levels and plugged them into a equation for the slope of a line. After some trial and error regarding the appropriate power levels, we decided on using 200 as the max power and 75 as the minimum. This gave us a maintained temperature 0.13 K away from the desired temperature!

















Exercise 5a


For the next exercise, we needed to rewrite our bang bang control supposing there was a delay between the time the coffee reaches a given temperature and when the sensor records the temperature.
This delay made it so that our original graph gets shifted to the right.














Exercise 5b

For second part of this exercise, we needed to rewrite our proportional control supposing there was a delay.

The delay made it so that the heater didn't not turn off until well after the temperature of the cup of coffee exceeded that of the goal temperature. Therefore, this gave us an overshoot curve that you can see in our graph.











Other delays that we would expect from our thermodynamic system would include the time needed for the heater to go from x degree to y degree. This delay would have less of an impact on the proportional control code, than it would from the bang bang control, since the bang bang control, assumes the power can go from zero to maximum instantaneously.