Sie sind auf Seite 1von 8

Thermal Mug Design Project By Gillette Zenner Alex Pinkham Kaleb Trotter I.

Introduction

! At the end of a long day of hard work, few things in life are better than a cold beer shared with friends. Anyone who has ever agreed to that statement, and then been forced to settle for a warm beer shared with friends, that person is our customer. Our goal is to provide people who want a cold drink with a mug that keeps their drink comfortably cold for as long as possible without making them look like Bill Nyes nerdy sidekick. ! Benets for engineers : - Experience with practical problems requiring ingenious and equally practical solutions - Experience using Arduino (and, in our case, Matlab) - Experience with common concepts (e.g., temperature) at a more involved level - Satisfaction of good teamwork - The necessity of drinking multiple cold beverages while doing homework. ! Benets for colleagues and employers - We have a strong grasp of the fundamental concept of temperature and thermal equilibrium - Not only have we experienced rst rate teamwork, they have put it to good use to overcome multiple hardware and software related obstacles. ! Why learn experiment design? - Allows us to quickly work our way to solid, reliable answers to complicated questions - Prevents frustration, maximizes productivity and fun - Produces better data than emotionally charged or frustrated experiments - More likely to nd a correct solution with an iterative approach than by trying to solve the whole problem at once

II. Technical Documentation A. MATLAB Code 1. Script to Graph Arduinos Serial Printing of Temperature vs. Time ! % Script to handle graphing temperature as a function of time.
% Anticipates receiving data as an n x 2 matrix, then plotting % the data with axes labeled with 'time' and 'degrees c/f' disp(' Graph Temperature '); temptime = input('Matrix from Arduino: '); % Assign everything in column 1 as time, everything in column 2 % as temperature

time = temptime(:, 1); temp = temptime(:, 2); plot(time, temp, '-r'); xlabel('Time (secs)'); ylabel('Temp (degrees C)');

2. Script to Find Final Temperature of a Liquid When Ice is Added


% Script that runs the math model for finding thermal heat % transfer between a warm liquid and a chilled mug that is % allowed to reach thermal equilibrium.

% Display our initial information -- let the user know what's going on disp(' Thermal Equilibrium in a Mug: '); disp(' Solves for final temperature of a mass of liquid when a mass of ice is added '); % Get our inputs: Mass of ice, mass of liquid, and initial temp of liquid massice = input('Mass of the ice = '); massliquid = input('Mass of the liquid = '); tinitial = input('Initial temperature of the liquid = '); % Define our constants: % Phase change constant of ice into water, 334 Joules / gram phasechangeconstant = 334; % Specific heat of water: 4.18 Joules / gram degrees Celsius specheatwater = 4.18; % Do our calculation tfinal = ((-phasechangeconstant * massice) / (specheatwater * massliquid)) + tinitial; % Convert the calculated number to a string so we can display it Temp = num2str(tfinal); % Create the string to display strtemp = ['Final temperature: ', Temp, ' degrees C']; % Display the results disp(strtemp);

B. Arduino Code

/** * Displays the current temperature on an LCD with color coding to * enhance the traditional numbers only display. * Reads temperature while stabilizing via the 3.3 voltage and AREF * pins on the Arduino, prints temperature and time values to the * serial monitor that are copy/paste-able into MATLAB for quick * graphical feedback and analysis * Kaleb Trotter 11/5/2012 */ // Include the libraries we need to run the liquid crystal // display. A library is just a stack of functions that make it easy

// to use a certain piece of software or hardware. Throughout this // program, you use functions from the LiquidCrystal library whenever // you do something to the LCD. #include <LiquidCrystal.h>; #include <Wire.h>; // Define our pins for the LCD. These are global constants: they are // set for the entire program and cannot be changed. #define REDLITE 3 #define GREENLITE 5 #define BLUELITE 6 // This global constant allows us to use the AREF as a reference point #define aref_voltage 3.3 // Initialize our interface pins LiquidCrystal lcd(7, 8, 9, 10, 11, 12); // Set our initial variables. These, // the course of the program. int brightness = 255; // Set the int temperaturePin = 1; // The pin int time = 0; // Allows unlike constants, can change over brightness (acceptable: 0 -> 255) we read temperature from us to keep track of time

void setup(){ // Set up how many rows and columns the lcd takes lcd.begin(16, 2); // Print an intializing message to the display lcd.setCursor(0, 0); lcd.print("Current Temp: "); // Start our Serial port monitoring, and set our analog to // reference Serial.begin(9600); Serial.print("["); analogReference(EXTERNAL);

void loop(){ // Read the voltage off of the temperature pin int reading = analogRead(temperaturePin); // Multiply our raw reading by the reference voltage, then divide by // a factor of 1024 to bring us to decimal instead of 256 bit. float voltage = reading * aref_voltage; voltage /= 1024.0; // Convert from voltage into degrees Celsius float temperatureC = (voltage - 0.5) * 100; // Print our time and temperature in the serial port in a format // that's easy to cut and paste into MATLAB so that we can graph // our results Serial.print(time); Serial.print(", "); Serial.print(temperatureC); Serial.print("; "); // Decide what color the backlight should be if(temperatureC < 10){ // If it's less than 10 degrees, background is blue

setBacklight(0, 0, 255); } else if(10 < temperatureC && temperatureC < 25){ // If it's between 10 and 25 degrees, background is green setBacklight(0, 255, 0); } else if(25 < temperatureC){ // If it's greater than 25 degrees, background is red setBacklight(255, 0, 0); } // Print out the temperature starting at the first space of // the second line (coordinate 0, 1 on the screen) lcd.setCursor(0, 1); lcd.print(temperatureC); // Follow the temperature with a degree sign and a C for celsius lcd.print((char)223); lcd.print("C"); // To the right of that, print out the number of seconds that // have passed since measurement started. lcd.setCursor(8, 1); lcd.print(time); lcd.print("secs"); // Count up our time as we go time++; delay(1000);

void setBacklight(uint8_t r, uint8_t g, uint8_t b){ // The red backlight is brighter than the rest -- let's apply a // scaling function to bring down the brightness a bit. r = map(r, 0, 255, 0, 100); g = map(g, 0, 255, 0, 150); // The LCD r = map(r, g = map(g, b = map(b, requires that we invert our numbers 0, 255, 255, 0); 0, 255, 255, 0); 0, 255, 255, 0);

// Make those change to the LCD. Notice that we're using the // "analogWrite" function while using the Digital Pins. That's // possible by using pulse width modulation. For more info on // PWM, visit http://www.arduino.cc/en/Tutorial/PWM analogWrite(REDLITE, r); analogWrite(GREENLITE, g); analogWrite(BLUELITE, b);

C. System Diagram
Computer for processing by MATLAB

*
*Note: Our green display worked
wonderfully, but our camera was unable to capture the difference in contrast.

III. Results A. Prototype Photo

Contrast controlling Temperature potentiometer sensor wires

LCD with colorReference pin for more appropriate backlight accurate temperature and time counter

B. Photo of Temperature Sensor ! !

Temperature Wax seal sensor head completed with

Ziploc bag around temp

Wires connected to

Waterproong our temperature sensor proved extremely difcult for us. We broke one of our groups three temperature sensors by wiring it backwards, and a second had a lead snap off inside the black casing while we were trying to soder it to the wires. The third sensor is pictured here. We attempted to melt wax over the leads where they were connected to the wires, tape over those connections, and then place that inside a plastic bag. Our nal assembly leaked a large amount of liquid into the bag, damaging our last temperature sensor beyond reliability.

C. Our Recommended Design 1. Performance Parameters: a) Cool ~400 g (mass of a full glass of our control substance, water) down from slightly above room temperature (22C) to about the recommended temperature for a cold beer (4C) 2. Key Feature List a) Phase change material mass 90.11 g b) Volume of cup > 473 mL (must hold at least 1 pint) c) Grippable shape for easy drinking d) Slightly ared lip for easy drinking 3. Predictions of the Math Model

a) With a mass of 90.11 grams of phase change material is combined with 400 grams of liquid at 22C, the resulting temperature is 3.9996C. b) Once we have replace our temperature sensor, we will be able to use our Arduino-to-Matlab interface to predict the time needed to cool down a warm drink. 4. Image of Design

IV. Reective Thinking A. Strengths of Our Team 1. Encouraging environment -- we get along with one another, and so our team has a very encouraging dynamic. Success and failure alike are met with a positive response and a desire to continue succeeding. 2. Effective knowledge construction -- we spend a good bit of time digging around and nding what others have already done right so that we dont have to redo their work. 3. Ingenuity -- while we arent the most aesthetically gifted group, we usually are very clever in how we use our assets. For example, Gillettes

idea to nd a cheaper way to waterproof our temperature sensor by coating the leads in wax rather than trying to nd brass or copper sheathing. B. Improvements for Our Team 1. Begin experiments earlier 2. Have spare parts on hand 3. Communicate more effectively in between team meetings C. Three Most Important Lessons Learned 1. Be prepared to break a few parts 2. Dont give up, take a break -- when we ran into trouble with the LED, we got really worried that we werent going to be successful at all with the experiment. However, after taking a little while off, we jumped back in and found the problem in the wiring almost immediately. 3. Once in a while, have a cold one -- while we were working in lab, Alex brought in doughnuts. The whole mood of the group went from tense work mode to relaxed and fun. Not only did our attitudes improve, we started making quicker progress. Talk about emotional intelligence!

Das könnte Ihnen auch gefallen