Automated Tea Pot

Team Members

Project by Armaan Mehta and Jason Lukose

Background:

Most affordable tea pots requires the user to actively interact with the tea pot while the tea is being created. The user needs to actively change the temperature, lower the tea basket , allow the tea to steep and remove the leaves once the leaves have been steeped for a set period of time. As most teas are created differently, the user also has to account for the variable steeping times and temperatures when creating different teas.

Overview :

The goal of this project is to automate the tea making process. This can be done using a Food-Safe Tea Pot, Digital Control of AC Loads (Relay) and servos. We were able to dis-assemble the Gourmia Tea Pot and interface with it's temperature gauge, which is fed into the mbed's Analog In. Using this information, tea-steeping times, and the Timer Class, we were able to create a prototype that correctly brews tea at the right temperatures and times based on User Selection of tea-type. While the water in the tea pot is being heated to the appropriate temperature, the servo holds the tea leaves ( in the basket) up. Once the brewing temperature is reached, the servo lowers the tea basket into the water and the mbed starts the timer for the set period of time for that specific tea. Once the time has been reached, the servo will raise the basket and tea is done.

Our project uses following parts:

  • mbed (LPC 1768) micro-controller
  • Relay (PowerSwitch Tail 2)
  • Relay (HS-322HD)
  • Food-Safe Tea Pot ( We used - Gourmia GDK290)
  • LCD Screen (uLCD-144-G2 128 by 128)
  • 300 Ohm Resistor
  • 75K Ohm Resistor
  • Push Buttons
  • DC Power Supply
  • DC Barrel Jack

Block Diagram

/media/uploads/4180Team/block.png

Wiring Guide

LCD Screen
MBEDuLCD Header
5.0V = VU5V
GndGnd
p28 ( TX )RX
p27 ( RX)TX
p29Reset
Interface with Gourmia
MBEDGourmia TeapotAdditional Wiring
3.3V Out3.3V for Analog Sensor
p20 (Analog In)Temperature ResistorUse 75K Ohm Pull Down Resistor
Misc.
MBEDPartAdditional Wiring
p5Push ButtonPull Down Resistor
p6Push ButtonPull Down Resistor
p7Push ButtonPull Down Resistor
p8Push ButtonPull Down Resistor
gndRelay ( PowerSwitch Trail II) (Ctrl - )
p9Relay ( PowerSwitch Trail II) (Ctrl + )
p22Relay (HS - 322HD)
External 5-6VRelay (HS-322HD)Share Ground with MBED

Import Final Project:

Import program4180FinalProject_Fall2017_ArmaanMehta_JasonLukose

Automated Tea Maker made by Armaan Mehta and Jason Lukose, more information at https://os.mbed.com/users/4180Team/notebook/automated-tea-pot/

Code Snippets

Code Snippet - Sub Routines and Callbacks

void bisr1()
{
    myled1 = 1;
    if (mode < 1) {
        menu = menu++;
    } else if (mode < 2) {
        menu = menu++;
        if (temp < 212)
            temp = temp +5;
        else
            temp = 215;
    } else if (mode < 3) {
        menu = menu++;
    } else {
    }
}
void bisr2()
{
    myled2 = 1;
    if (mode < 1) {
        enter = 1 - enter;
    } else if (mode < 2) {
        enter = 1 - enter;
    } else if (mode < 3) {
        enter = 1 - enter;
    } else {
    }
}
void bisr3()
{
    myled3 = 1;
    if (mode < 1) {
        menu = menu--;
    } else if (mode < 2) {
        menu = menu--;
        if (temp >70)
            temp = temp -5;
        else
            temp = 70;
    } else if (mode < 3) {
        menu = menu--;
    } else {
    }
}
void bisr4()
{
    myled4 =1;
    progo = !progo;
    if (mode < 1) {
    } else if (mode < 2) {
    } else if (mode < 3) {
    } else {
    }
}

float readain(int res)
{
    float boil = 1.0;
    float calib = 0.606;
    float tmp[res];
    for (int i = 0; i < res; i++) {
        tmp[i] = ((((ain.read()-calib)/(boil-calib))*142)+70);//ain.read();//((ain.read()-0.89)*1410+60);
    }
    float sum = 0;
    for (int i = 0; i < res; i++) {
        sum = sum + tmp[i];
    }
    return sum/res;
}

bool TimerDone(Timer &timerobj, float endTime)
{
    float timeNow = timerobj.read();
    //printf("The time taken was %f seconds\n", timeNow);

    if (timeNow >= endTime) {
        return true;
    } else {
        return false;
    }

}

Code Snippet - Main Menu Code

int menumain()
{
    mode = 0;
    enter = 0;
    menu = 0;
    uLCD.printf("\n Welcome to your tea maker\n"); //Default Green on black text
    uLCD.printf("\n  Please choose an option: \n");
    uLCD.color(RED);
    while(1) {
        if (menu < 1) {
            uLCD.locate(3,7);
            uLCD.textbackground_color(BLUE);
            uLCD.printf("\n  Heat Water \n");
            uLCD.textbackground_color(BLACK);
            uLCD.printf("\n  Make a Tea \n");
        } else {
            uLCD.locate(3,7);
            uLCD.textbackground_color(BLACK);
            uLCD.printf("\n  Heat Water \n");
            uLCD.textbackground_color(BLUE);
            uLCD.printf("\n  Make a Tea \n");
        }
        if (enter)
            return menu;
    }
}

Code Snippet - Make Tea Function

void maketea(int response, int action)
{
    int templ = 0;
    int time = 0;
    if (response == 2) {
        templ = 170;
        time = 2;
    } else if (response == 4) {
        templ = 212;
        time = 1;
    } else if (response == 3) {
        templ = 212;
        if (action == 0 || action == 3) {
            time = 3;
        } else {
            time = 5;
        }
    } else if (response == 1) {
        if (action == 0) {
            templ = 175;
            time = 3;
        } else if (action == 1) {
            templ = 180;
            time = 2;
        } else {
            templ = 170;
            time = 3;
        }
    } else {
        if (action == 0) {
            templ = 158;
            time = 1;
        } else if (action == 1) {
            templ = 167;
            time = 5;
        } else if (action == 2) {
            templ = 180;
            time = 2;
        } else if (action == 3) {
            templ = 195;
            time = 3;
        } else {
            templ = 212;
            time = 5;
        }
    }
    float temporary = 0;
    uLCD.cls();
    uLCD.printf("heating...");
    while (1) {
        temporary = readain(5000);
        uLCD.locate(3,1);
        uLCD.printf("heat to: %i \n current: %5.2f", templ, temporary);
        if (temporary < (templ - 7)) {
            progo = 1;
        } else if (temporary > (templ - 5)) {
            progo = 0;
            break;
        }
    }
    uLCD.cls();
    uLCD.printf("brewing... \n");
    for(int i = 180; i > 110; i--) {
        myservo = i/180.0;
        wait(0.05);
    }
    t.start();
    while(!TimerDone(t, time*60)) {
    }
    for(int i = 110; i < 180; i++) {
        myservo = i/180.0;
        wait(0.05);
    }
    uLCD.cls();
    uLCD.printf("Done...");
}


Setup Pictures

servo wiring final

Final Demo Video


Please log in to post comments.