My wife is most definitely not a morning person. In our household mornings are rough. There is the buzzing of alarms, the joy of work to look forward to, and small unreasonable people who poke you in the face while demanding food and affection. I think my wife uses avoidance as a coping mechanism, which is probably why she waits until the very last minute to get out of bed each day. Now, maybe you don't have a wife but I think we could agree that our relationships with our significant others (or insignificant others with whom we share living space) can have a huge impact on our own happiness.
That being said there is one thing that my wife eagerly anticipates every day. A nice, strong, hot cup of coffee. Black, no sugar, no cream. A magical, mood boosting substance guaranteed to blunt the horror of waking with the high of caffeine. Wait. That sounds bad. Never the less I chose to enable her substance abuse, and improve both of our lives, by creating an IOT controllable coffee pot that can be activated with a simple button on a mobile device.
The coffee pot works by using a Particle Photon to actuate a relay shield that controls power to the pot. If This Then That is used to create a button widget on your cellular device that calls a Particle function in the relay code to turn on the relay and initiate brewing. The system utilizes a sealed temperature sensor to monitor temperature and brewing status. A second Photon logs temperature data, graphs it, and transmits the data through the cloud to the first Photon. The first Photon than analyzes that data and disconnects power to the coffee pot if the temperature is above a certain value. In this case 165 degrees F, which is the maximum temperature reached when brewing has completed. Text notifications are sent when brewing begins and ends.
Physical construction of the project is straight forward. One photon is used to control the relay shield. Plug this into the board on the shield and be sure that it is oriented correctly. The extension cord must be modified in order to connect to the COMM and NO ports of the relay. Split, cut, and strip the wire an insert into the appropriate ports. Plug the AC/DC adapter into the relay shield in order to supply power to the Photon and the relay. Plug the coffee pot into the extension cord. Plug the extension cord and the AC/DC adapter into the wall outlet.
The second photon is used to activate the temperature sensor and log data. Mount the photon on a breadboard. Insert the three wires for the temperature sensor into three separate rows on the breadboard. Connect a 4.75k ohm resistor between the rows containing the red (power to the sensor) and yellow (signal from the sensor) wires. Run a jumper wire from the yellow wire to pin D4, run a second jumper wire from the black wire to the GND pin of the photon, run a third jumper wire from the red wire to pin D5. Insert the sealed metal end of the temperature sensor into the coffee pot so that when the brewing is finished the sensor will be about 75 percent submerged. Connect the power supply to the Photon.
It will be necessary to download the IF This Then That app for your mobile device. You will need to place two do button widgets on the home screen. Theses widgets call a digitalWrite function in the Photon relay code. On is a write "HIGH" that will activate pin D3 and send power to the relay, thus beginning the brewing process. The second button is for manual deactivation of the relay which will write pin D3 "LOW" and disconnect power from the coffee pot. A third applet is necessary if you wish to receive text notifications about the brew status. This applet monitors for the "relay_is_active" publish event and sends a text notification that brewing has begun. An IFTTT applet is also used in conjunction with Google Docs to collect and graph data. This applet monitors a publish event and data logs when it is received.
So, does it work? Sure does and we have video to prove it. Button press on the mobile device activates relay, power is supplied to the coffee pot, brewing begins, text confirmation is sent. Photon two recognizes brewing event, power is supplied to the temperature sensor, temperature data is logged. Threshold temperature value is reached, Photon one recognizes value, relay is deactivated, power to sensor is disconnected. Coffee is ready, text confirmation is sent. Wife is happy, therefore I am happy, and I didn't even have to get out of bed to do it.
VIDEO DEMONSTATION: https://youtu.be/1reviEmT4Dc