A wifi-connected temperature sensor that tells you when your water is boiling.

0

Problem Statement

I designed this product for my husband, Carlos, who loves to drink tea but finds the process of making it somewhat inconvenient. We don't have a tea kettle in our house so he makes tea by boiling water in a saucepan on the stove. The process usually unfolds in the following steps:

  1. Place saucepan with water on stove and turn on heat
  2. Leave the kitchen and start another activity
  3. Return to kitchen to check if water is boiling
  4. Leave the kitchen and start an activity
  5. Lose track of time
  6. Return to kitchen to find that the water has been boiling for a while, sometimes for so long that the water level is too low and you need to add more water and wait again

Considering this problem, I set out to create an IoT device that would eliminate the need to keep checking the pot, the possibility that the water would begin to boil without Carlos' knowledge, and the resulting waste in water and energy.

0

Project Goal

They say “a watched pot never boils.” This product will eliminate this conundrum by sensing when water has reached a boiling point using a waterproof temperature sensor placed into the pot and alerting the user using a piezo buzzer. Once the user reaches the pot, they will be able to turn the alert on off using a switch. 

This IoT product will allow users to focus on other tasks while their water boils and will allow people to know when the water is boiling. This will save time, water from evaporation, and electricity / gas.  Additionally, this project could be adapted for other uses in the kitchen like cooking things on the stove or brewing beer.

0

Process

This was the first IoT project I attempted on my own. I found the experience challenging but rewarding when I was able to get components working.

Below are the components I used for input, output, and sensing (full bill of parts included below). I originally planned to use a button as the input, but after adding it to my circuit I quickly released that I needed a switch that could stay in place without someone pressing it.

  • Piezo Buzzer - PS1240 (output)
  • Single-pole, double-throw (SPDT) switch (input)
  • DS18B20 Sealed Temperature Sensor (sensor)

I built the circuit component by component, first building the code, then the accompanying physical circuit, and finally checking the serial monitor data to confirm that that piece of the project was working as planned. I did this first for the DS18B20 temperature sensor, then for the Piezo Buzzer, and finally for the SPDT.

Challenges

  • The Particle Dev application often returns errors initially when compiling code in the cloud and then on second try it accepts the code. Before I realized this, I spent a significant amount of time debugging code and the physical circuit unnecessarily.
  • I tried to add a more complex alert melody and was not able to incorporate the library and code into my existing code.

Learnings

  • Testing the functionality of my circuit proved to be good for usability testing as well. I learned needed some kind of holder for my IoT product (were I to use this day-to-day). Resting it on a knife was precarious given the PVC could melt and holding it above the pot defeated the purpose of the product.
  • Switches serve better as on-off switches than buttons.
0
Circuit board with the DS18B20 Sealed Temperature Sensor (sensor)
Screen shot 2018 01 30 at 11.39.30 pm (2018)
0
Circuit board with the piezo buzzer and temperature sensor
Screen shot 2018 01 30 at 11.39.18 pm (2018)
0
Circuit board with all three components (input, output, sensor)
Screen shot 2018 01 30 at 11.39.11 pm
0
Resting the sensor on a knife made the plastic too hot
Screen shot 2018 01 30 at 10.22.21 pm
0
A plastic lined trivet worked better to hold the sensor
Screen shot 2018 01 30 at 10.19.38 pm
0
Event log for working Tea Time prototype
Screen shot 2018 01 30 at 10.56.49 pm (2018)
0

Outcome

In this project, I was able to complete the prototype nearly as planned. The major difference was that I was not able to have the piezo buzzer play a song and instead had it play a simple alert. 

Potential next steps:

  • Make it so that switching the SPDT on and off immediately turns off the piezo buzzer and ends the main loop. With the current product, if the SPDT switch is turned off after the loop has started, a sound will play after the user has turned the switch off. This may lead to confusion and the perception that the product does not function well.
  • Add an LED to indicate when the loop is being run and information is being sent to the cloud.
  • Include a more complex song to alert (and delight) users when their water is boiling.
  • Send a text message when water is boiling in case the user is in another room and can't hear the alert.

Bill of parts:

  • Piezo Buzzer - PS1240 (output)
  • Single-pole, double-throw (SPDT) switch (input)
  • DS18B20 Sealed Temperature Sensor (sensor)
  • Photon
  • USB Micro B Cable (plugged into laptop for power / information transfer)
  • Resistor (4.7k Ohm pull-up)
  • Jumper wires (10)

0
Circuit Diagram of Tea Time
Fritzing breadboard Isabelle Mills-Tannenbaum (2018)
0
Final code
//Sources:
  //switchPin - http://diotlabs.daraghbyrne.me/5-getting-input/switches/
  //temperature - http://diotlabs.daraghbyrne.me/3-working-with-sensors/DS18B20/
  //speakerPin - http://diotlabs.daraghbyrne.me/6-controlling-outputs/piezo/

#include "OneWire.h"
#include "spark-dallas-temperature.h"

// Data wire is plugged into port 0 on the Arduino
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(D1 );

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature dallas(&oneWire);

// Create a variable that will store the temperature value
double temperature = 0.0;
double temperatureF = 0.0;

int speakerPin = D2;
int switchPin = D0;
// create an array for the notes in the melody:
//C4,G3,G3,A3,G3,0,B3,C4
int melody[] = {1908,2551,2551,2273,2551,0,2024,1908};

// create an array for the duration of notes.
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {4,8,8,4,4,4,4,4 };

void setup()
{
  // Register a Particle Core variable here
  Particle.variable("temperature", &temperature, DOUBLE);
  Particle.variable("temperatureF", &temperatureF, DOUBLE);

  // setup the library
  dallas.begin();
  Serial.begin(9600);
  pinMode( switchPin , INPUT_PULLUP);
  pinMode( speakerPin, OUTPUT );
  playNotes();
}

void loop()
{
  int buttonState = digitalRead( switchPin );
  if( buttonState == LOW ) {
  // Request temperature conversion (traditional)
  dallas.requestTemperatures();

  sin( 23423 );

  // get the temperature in Celcius
  float tempC = dallas.getTempCByIndex(0);
  // convert to double
  temperature = (double)tempC;

  // convert to Fahrenheit
  float tempF = DallasTemperature::toFahrenheit( tempC );
  // convert to double
  temperatureF = (double)tempF;

  // Print out
  Serial.print( "Temp in C = ");
  Serial.print( tempC );
  Serial.print( "\t\t F = ");
  Serial.println( tempF );

  delay(5000);
if ( tempF > 200) {
  playNotes();
  Serial.println("The water is boiling! ");
  Particle.publish("The water is boiling!", PRIVATE);
  }
  else{
    Serial.println("Water is not ready! ");
    Particle.publish("Water is not ready!", PRIVATE);
  }
}
else {}
}

void playNotes()
{
    // iterate over the notes of the melody:
    for (int thisNote = 0; thisNote < 8; thisNote++) {

      // to calculate the note duration, take one second
      // divided by the note type.
      //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
      int noteDuration = 1000/noteDurations[thisNote];
      tone(speakerPin, melody[thisNote],noteDuration);

      // to distinguish the notes, set a minimum time between them.
      // the note's duration + 30% seems to work well:
      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      // stop the tone playing:
      noTone(speakerPin);
    }
}
Click to Expand
0
Completed project!
im2193 (2018) - https://youtu.be/wx6cyF8_MP0
0

Reflection

Given that this was my first project, I felt happy with the product that I created. While the project was difficult for me, it was exciting to see that a small circuit board could have so many applications and solve common problems. Building this product opened my eyes to the fact that many of the IoT products we buy, despite their polished and well-designed exteriors, are ultimately a mix of inputs, outputs, and sensors. This project made me curious as to other potential applications for sensors in my day-to-day life.

In completing this project, I felt limited by two things: 1) my inability to parse out portions of more complex open source code (e.g. how I was unable to incorporate a song and instead opted for a tune with a few notes) and 2) my limited knowledge of ways to control and manage loops and sending information to the cloud. 

I am excited to work on these limitations in future projects so that I can become more comfortable with them and build upon the skills I've developed thus far. 

x
Share this Project

Courses

49713 Designing for the Internet of Things

· 25 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


Focused on
About

A wifi-connected temperature sensor that tells you when your water is boiling.

Created

January 23rd, 2018