Here at Atlan, we’ve begun using Internet-of-Things technology to research solutions for some of the world’s most pressing problems: monitoring pollution, conserving energy, protecting against identity fraud, and…making coffee.

“[If we could] turn on the coffee machine via Slack, we’d be set,” Christine wistfully wrote one afternoon on our #coffee Slack channel. Being located in Delhi, good chai is readily available to us day and night, but sometimes a good cup of coffee in the morning (and afternoon, and evening) is required to keep us going. Starting a fresh brew during our commutes and having a full pot waiting at the office once we arrive sounds like a fantastical dream, but here we thrive on turning these types of dreams into reality.

Setting up our wifi coffee maker

The basic hardware setup was simple: we got a wifi-enabled Particle Photon micro-controller and hooked it up to a 5v electrical relay to control the power supply to the coffee machine.

Warning: this project deals with dangerous high-voltage electrical currents, so NEVER try to follow these steps if any of the components are plugged in, or if you are unsure of what you are doing.

First we cut an extension cord in half, connected the “hot wire” from each half to the relay, and spliced the ground and neutral wires from the two sides back together.

wifi coffee maker

Then we hooked our microcontroller up to the relay, using the D1 pin on the Photon to communicate with the IN1 port on the relay, sending 5v power from the VIN pin of the Photon to the VCC port on the relay, and connecting the GND on the relay to GND on the Photon in order to complete the circuit.  

wifi coffee maker

Finally we packaged the Photon and relay together into a small plastic enclosure, and cut holes for power cords into the sides of the container. By plugging one end of the extension cord into the wall, and the other side into the coffee machine, we were now able to control power to the coffee machine by sending HTTP requests over WiFi to the Particle Photon microcontroller!

wifi coffee maker

There were a few extra wires in this setup, resulting in too much clutter on our kitchen counter, so we packaged the whole setup into a larger cardboard box. Taking advantage of the extra area on top of the box, we gave CoffeeBot a face, complete with LEDs for eyes to monitor the hardware status.

wifi coffee maker

Now that our coffee machine was controllable over WiFi, we just needed a way to talk to it.

Enter CoffeeBot

Our team uses Slack for online communication; one of Slack’s many features is the ability to create Slackbots, or automated users that can respond to chat messages and carry out advanced tasks.

Using BotKit, a NodeJS module for programming Slackbot behaviors, we built CoffeeBot. CoffeeBot is a capable of receiving naturally worded messages on Slack, deciphering them, and sending the corresponding commands to the coffee machine.

For instance:

wifi coffee maker

Other features of CoffeeBot include:

  • Getting the status of the machine and how long ago the last brew was started
  • Posting to Slack when the coffee’s ready
  • Automatically switching off the coffee machine after an hour, in order to save energy.
  • And a few other secret behaviors 🙂

Caffeinated Continuance

Now every morning before leaving for work, we can start the coffee machine directly from Slack! In the future we want to add more advanced features, such as automatically loading coffee grounds and water, and measuring how many cups of coffee the office consumes per week. Someday we might even have a robot to deliver the fresh coffee directly to our desks, which admittedly sounds like a crazy and fantastical dream right now.

But you know how we feel about fantastical dreams.

Author

Engineering at Atlan

8 Comments

  1. Hey Patrick, I’ve seen this machine during CES 2016, it was covered by TheVerge. Is it the same? This is a great idea, but must have been a lot tougher to executed in real life.

    • Patrick Triest Reply

      Hi Mitesh, thanks for the message. Our coffee machine is probably less fancy than the one you saw at CES, but it is also way more fun since it hangs out on Slack and tells jokes. It was quite simple to build, just a fun office hack, let us know if you have an ideas to improve it!

  2. Very interesting…!!! I would personally want to try something like this… Happy to learn about the use case

  3. Hello Patrick,its cool idea to make a WiFi coffee making machine.I wish you post a video that how its works.

  4. Wow! Great post it helps me a lot, I’m impressed; Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am pleased that I stumbled across this in my search for something relating to this.

Write A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.