Toaster Coaster ECE 4180 Fall 2018 Final Project Jill Andriotty Sayak Chatterjee

Toaster Coaster

Project Idea

Toaster Coaster is a smart coffee coaster, intended to help keep coffee hot for longer periods of time, by monitoring the temperature and using a heating pad to heat the coffee up if it is below the desired temperature. The members of this project are Jill Andriotty and Sayak Chatterjee.

Instructions

Place cup with beverage on top of the heating pad in the center. Put the temperature probe inside the drink. The LCD screen will display the state of the system, including the current, temperature, desired temperature, and what the heat value is (from 0.0-1.0).

Two-digit numbers can be sent to the mbed via bluetooth to control the desired temperature. Download the "Adafruit Bluetooth LE" app on phone (android or iOS) and connect to the mbed (it'll probably be the only Adafruit Bluetooth UART capable device, or at least the one with the strongest signal. Go to the "UART" tab, and send two digit numbers to the mbed, the updated desired temperature should appear.

If the heat is on a red LED will also turn on.

Code

main.cpp

#include <mbed.h>
#include "DS18S20.h"
#include "DS18B20.h"
#include "uLCD_4DGL.h"
#include "OneWireDefs.h"
#define THERMOMETER DS18B20

PwmOut heat(p21);
Ticker heatflip;
uLCD_4DGL uLCD(p9, p10, p11);
DigitalOut led(p15);
Serial blue(p28,p27);

// device( crcOn, useAddress, parasitic, mbed pin )
THERMOMETER device(true, true, false, p25);

Ticker thermoUpdate;
float desiredTemp = 25.0; 
float currentTemp;
float heatVal = 0.0;

void updateThermometer(){
    currentTemp = device.readTemperature();
    }
void updateHeat(){
    if(desiredTemp < currentTemp){
        heatVal = 0.0;
        led = 0;
        }
       else{
        heatVal = 0.9 + (desiredTemp - currentTemp)/200.0;
        led = 1;
           } 
    heat = heatVal;
    }
    


int main()
{
    
    //uLCD.baudrate(3000000);
    uLCD.printf("STARTED0");
    while (!device.initialize());    // keep calling until it works
    uLCD.printf("STARTEDdevice");
    thermoUpdate.attach(&updateThermometer, 2.0);
    uLCD.printf("STARTEDthermo");
    heatflip.attach(&updateHeat, 5.0);
    uLCD.printf("STARTEDheat");
    uLCD.printf("STARTEDtemp");
    while (true)
    {           
        if(blue.readable()) {
          float num1 = ((float)(blue.getc()-'0') );
          float num2 = ((float)(blue.getc()-'0') );
          desiredTemp = num1 * 10 + num2;
        
        }
        uLCD.cls();
        uLCD.printf("The current temp is %.5f degrees celsius!\n The desired temp is %.5f degrees celsius!\n The heat is %.5f",currentTemp, desiredTemp, heatVal);
        wait(2);   
    }
    return EXIT_SUCCESS;
}

Hardware Setup

Parts: https://www.adafruit.com/product/2479 - UART Bluetooth https://www.adafruit.com/product/1481 - Heating Pad https://www.amazon.com/Aideepen-DS18B20-Waterproof-Temperature-Stainless/dp/B01LY53CED/ref=sr_1_3?ie=UTF8&qid=1542658487&sr=8-3&keywords=waterproof+temperature+sensor - Temperature Sensor https://www.sparkfun.com/products/12959 - MOSFET https://www.4dsystems.com.au/product/uLCD_144_G2/ - LCD

LCD Wiring is at this page: https://os.mbed.com/users/4180_1/notebook/ulcd-144-g2-128-by-128-color-lcd/

MBED pins

Mbed PinExternal Pin
p9ulcd RX
p10ulcd TX
p11ulcd reset
p15led + side
p21JP-3 of MOSFET
p25thermometer data
p28RXI bluetooth
p27TX0 bluetooth

Other Pins

pinpartpin
gndMOSFET JP2-2
+ end of batteryMOSFET JP2-1
- heat padJP1-1
+ heat padMOSFET JP1-2
+ thermometerVu
- thermometergnd
gnd bluetoothgnd
rts bluetoothnc
cts bluetoothgnd
Vin bluetoothVu

Pictures

https://scontent-atl3-1.xx.fbcdn.net/v/t1.15752-9/s2048x2048/48211989_632152717183044_8750258986650959872_n.jpg?_nc_cat=102&_nc_ht=scontent-atl3-1.xx&oh=9077899c64897da2525990ff3bf37629&oe=5CA71F6F https://scontent-atl3-1.xx.fbcdn.net/v/t1.15752-9/s2048x2048/48059099_1911551485819093_1682899032751472640_n.jpg?_nc_cat=100&_nc_ht=scontent-atl3-1.xx&oh=5aea8377cb7a6cc1107b54ec0dc2c6f4&oe=5C9DB420 https://scontent-atl3-1.xx.fbcdn.net/v/t1.15752-9/s2048x2048/48084321_2211339859132254_5431968933093572608_n.jpg?_nc_cat=110&_nc_ht=scontent-atl3-1.xx&oh=781c092428ee5a4ecf2ff2dd6325dfe0&oe=5CAEC91C https://scontent-atl3-1.xx.fbcdn.net/v/t1.15752-9/s2048x2048/48083179_276611722966484_1759854590313889792_n.jpg?_nc_cat=101&_nc_ht=scontent-atl3-1.xx&oh=96eafb272af4fb2b7da3931fc81690c8&oe=5C9C37E0 https://scontent-atl3-1.xx.fbcdn.net/v/t1.15752-9/s2048x2048/48207441_936735706512487_3061702578376015872_n.jpg?_nc_cat=103&_nc_ht=scontent-atl3-1.xx&oh=62242c31a139a769885e71be50a2d313&oe=5CA30DD3

Video


Please log in to post comments.