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 Pin | External Pin |
p9 | ulcd RX |
p10 | ulcd TX |
p11 | ulcd reset |
p15 | led + side |
p21 | JP-3 of MOSFET |
p25 | thermometer data |
p28 | RXI bluetooth |
p27 | TX0 bluetooth |
Other Pins
pin | partpin |
---|---|
gnd | MOSFET JP2-2 |
+ end of battery | MOSFET JP2-1 |
- heat pad | JP1-1 |
+ heat pad | MOSFET JP1-2 |
+ thermometer | Vu |
- thermometer | gnd |
gnd bluetooth | gnd |
rts bluetooth | nc |
cts bluetooth | gnd |
Vin bluetooth | Vu |
Pictures
Video
Please log in to post comments.