Remote Controlled Coffee Maker

I've never been a morning person. Coffee helps me get out of bed and face the day. And while I know you can get a coffeemaker with a timer, I wanted a way to have coffee that was freshly brewed whenever I finished snoozing my alarm. So I created a remote control for my coffeemaker, so I could turn it on from bed and get up when I know it's ready.

Step 1: Here's What You'll Need:

- Coffee maker

* Note: The real key here is that your coffee maker has to be one that can be left on a setting that will automatically turn on when it receives power. Mine has a toggle switch, so I can leave it plugged in and toggled to on, but if your coffee maker has a push button that needs to be pressed to make it run, it won't work for this project.

- Relay-controlled power strip (I used one like this https://www.sparkfun.com/products/14236, but I think any type should work)

- Feather Huzzah (& computer that will connect to program it, and USB to connect to board)

- Breadboard

- Jumper wires

- Adjustable power adaptor or a 3 V power supply (I used one like this: https://www.sparkfun.com/products/14236, that I had from an old project)

- Heat shrink tubing or electrical tape (if you're using the adjustable power adaptor as a power supply)

- An IO account (I used Adafruit's free IO account)

Step 2: Create a Dashboard

You'll need to set up a dashboard with a toggle button block on it. This tutorial does a great job of walking you through that. https://learn.adafruit.com/adafruit-io-basics-dash...

Make yourself a dashboard to control the coffee maker. Be sure to make note of whether or not you use capital letters, because that will be relevant when you set up the code in the controller.

Step 3: Program the Board

I used the sample code in the Adafruit IO library called 'adafruitio_07_digital_out' to allow the board to communicate with the dashboard. If you don't have the Adafruit IO library, you can add it by going to Sketch --> include library --> manage libraries and then search for it to add.

First, in the config.h tab, you'll need to update the IO_USERNAME and IO_KEY with your username and key. You can find your IO key by clicking on the key icon at the top of the dashboard.

Also in that tab, you'll need to update the definition of the WIFI_SSID and WIFI_PASS with the name and password to your wifi network.

Then, go to the tab labeled 'adafruitio_07_digital_out' and find line 27. You'll need to change these to reflect the name you gave your dashboard. See my picture for an example of how to update that.

I deleted the parts of the code that relate to the serial monitor. You can do the same, or comment it out, or just leave it.

The last key piece is to change the last few lines of the sample code. Where it says

if(data->toPinLevel() == HIGH)
Serial.println("HIGH");

else Serial.println("LOW");

// write the current state to the led

digitalWrite(LED_PIN, data->toPinLevel());

you'll need to change it to say

if(data->toPinLevel() == HIGH)
digitalWrite(COFFEE_PIN, HIGH);

else digitalWrite(COFFEE_PIN, LOW);

// write the current state to the led

digitalWrite(COFFEE_PIN, data->toPinLevel());

// (with whatever the name of you pin 5 is)

Upload this code to your huzzah, and you're ready to wire the project!

Step 4: Wire It Up

I used a breadboard for this, just so I wouldn't have to solder anything, and so I could change things easily if I decided to. It also meant I could easily connect two wires to the ground pin.

I used an adjustable AC to DC power adaptor that I had from an old project. I cut the end off and replaced it with two wires so I could plug it into a breadboard. (For this, I used a multimeter to figure out which wire was ground, soldered small bits of wire on and used heat shrink to seal up the connection.) If you're using an adaptor like this, set it to 3 V. You can always use a different 3V power source. I just liked this, because it means I don't have to keep track of battery levels, or recharge anything. My power strip had sockets that are 'normally on' and normally off'. I plugged the power adaptor into a 'normally on' socket, so whenever the power strip is switched on, the board is receiving power.

Plug the positive wire into the 3V pin on the Huzzah and the ground wire to ground.

You'll need to use jumper wires to connect pin 5 to the positive terminal on your power strip, and ground on the board to ground on the power strip. (This is where I found it handy to have a breadboard. I just put the power adaptor ground into the breadboard track and the power strip ground directly into the board pin header.)

Additionally, I used a jumper to connect pin 16 to the reset pin. I think this was necessary to keep the board from going into deep sleep mode. It seemed to help with functioning.

Plug your coffee maker into a 'normally off' socket, plug in the power strip, switch the strip on, and you should be ready to go!

Step 5: Troubleshooting & a Note About Wifi...

You should now be able to control your coffee maker from your computer or phone!

If you're having trouble connecting, and you're sure you've entered everything into your code correctly (ie: IO key, wifi password, matching capitalization in your code to all dashboard terms in your IO account...) you might need to check the frequency of your wifi. The Feather Huzzah only works with 2.4 GHz wifi frequency. If your wifi is set to 5.0 GHz, try changing the frequency and see if that fixes the issue.

IoT Challenge

Participated in the
IoT Challenge

Share

    Recommendations

    • Classroom Science Contest

      Classroom Science Contest
    • 1 Hour Challenge

      1 Hour Challenge
    • Sensors Contest

      Sensors Contest

    Discussions

    0
    None
    Penolopy Bulnick

    16 days ago

    That's a fun idea! Thanks for sharing how you did this :)