We know there are several similar coffee maker projects published recently, but we came up with ours on our own for a project, so we're giving it its own project.
Neither of us get a whole lot of sleep, and this is usually due to a combination of work load (we're Mechanical Engineering students), and procrastination of said work. The result of this is that every last moment spent in bed in the morning is sweet bliss; sometimes at the cost of morning coffee. To combat this problem we decided to design The Daily Grind, a coffee maker controlled from your phone. If you're a coffee snob turn away now, because this requires setting the machine up the night before, and coffee grinds that sit overnight lose some of their flavor. For everyone else trying to function like a normal human being at 6:00 AM, read on.
The initial concept for this project was to use a Particle Photon to control a relay which turns the coffee maker on and off, and another to power a LED display which will sit on the nightstand and display the status of your morning coffee.
The first thing we did after figuring out what we were doing to do is figure out what we needed to do it, and then order it. The parts list is at the top of this page, along with the list of services used.
What Does it Do?This is controlled through IFTTT's Do button and GPS services. The commands that activate the photon are sent through IFTTT using a recipe with the Do button, which is a widget for Apple and Android. When we press the "Brew Coffee" button the command "on" is sent to the Relay Control Photon. The Photon, after receiving the "on" command triggers the relay by turning on pin D7 and publishing the status event. A delay starts, which is set to how long your coffee maker takes to brew a pot, and after it is done it publishes another status event. When the second event is published, another recipe in IFTTT sends a push notification to the phone saying the coffee is ready. Meanwhile in the Status Photon, the connected Red and Green LED's are off. When the first status event is received from the Relay Control Photon, a red LED comes on to show that the coffee is brewing. Second event is received, the green LED also comes on to show that the coffee is ready.
There are two ways to turn the coffee maker off. The first is through a IFTTT recipe triggered by GPS: when we leave the neighborhood, the "off" command is sent to the Relay Control Photon. The second is another Do button that sends the same command through IFTTT. The Do button is intended to be the primary method of turning the coffee maker off, and the GPS Trigger is a backup so we don't drive off and leave the coffee maker on all day. Once the Relay Control Photon receives the "off" command it turns odd pin D7, which triggers the relay to cut the power, thus turning the coffee maker off; it also publishes the status event that it's off. When the Status Photon receives the status event it turns both LED's off to signify the coffee maker is off.
The status of the coffee maker is published to Thingspeak when the system is on. When the coffee maker is on it publishes a 1 to Thingspeak every minute to symbolize that we have coffee ready. when the coffee maker is off it publishes a 0 to Thingspeak every minute to symbolize that we have no coffee ready. You can check the status of the coffee maker live here.
While we were waiting for the last of our components to come in the mail, we started in on the code; we'd be lying if we said we weren't terrified. Neither of us had any experience with C++ before, but we have had exposure to Python through working with MatLab. After a crash course of scouring through similar codes Particle Docs, many hours, and some pulled out hair, we figured out how to write the code for the Photons. After several more hours and much hair torn asunder from stupid errors, we finally finished the code for the two photons and it is located at the bottom of the page. We were prouder than two peacocks strutting about.
Physical SetupWell, now that the hard part was through we set about putting everything together; the circuit schematics for both Photons are below. Wiring up the breadboard was simple and straightforward, the diodes on the Relay Control Photon has diodes to protect it from any reverse current in case we set it up wrong or the relay shorts out (like having water spilled on it while filling up the coffee maker).
After the Relay Control Photon was set up on the bread board and wired to the relay, we set about installing the relay. Now, fortunately for us, the cord to our coffee maker was a split cord, with the hot line being smooth and the ground being ribbed. We separated the cord down the middle, about 4 inches long in the middle. In the middle of that 4 inch separation we cut the smooth wire, and stripped it about a quarter of an inch on either side. The side coming from the plug went into the central node, and the side going to the coffee maker was connected to the Normal Off node so that when no current is being supplied from the Photon the coffee maker is off.
The Status Photon is set up with two LED's, a red and a green, and two resistors to create a current across the LED's.
It does work! The project is currently living in Josh Bussiere's house, and will start getting some regular use after he returns from Thanksgiving Break. Below is a video of The Daily Grind in action. The middle of the video, where the coffee is brewing, is sped up because we're sure you don't want to watch 5 minutes of coffee brewing, and set to some music so you don't get bored. The coffee maker took 4.5 minutes to brew 4 cups of coffee. The red LED is a bit hard to see, but we wired it to pin D7 so you should at least be able to see the board's led light up when the red LED comes on.
Further Development Off of This ProjectUsing this project as a stepping stone a variety of things could be done to improve it if you build it. You could add a temperature sensor to monitor the temperature of the coffee. You could also add a weight sensor and set it to tell you how many cups of coffee are left if you live with multiple people or use it in an office setting to know when to brew a new pot. We would also suggest fashioning some sort of box for the Photons so that they're protected, especially the one with the relay.
Comments