Hello everyone, in this instructable, I will show you how to make an internet connected coffee maker. You can use it to set it when you are almost home so you can have coffee when you get home from work. I don't drink coffee (I'm 14), but my parents suggested it as a project idea jokingly, and I ended up liking the idea.
Warning: This project deals with high voltage that has the potential to injure, even if the risk is low, you should only do this project if you have experience with high voltage.
Step 1: Parts and Tools
Here are the parts and tools that you will need to make this project:
Coffee maker (I'm using a small single cup one)
linkit ONE board
Heat shrink tubing
Internet enabled device (eg. Smartphone)
Computer with Arduino IDE and drivers for linkit ONE
Hot Glue Gun
Soldering Iron and Solder
Step 2: Take Apart Coffee Maker
Remove any screws on the coffee maker, in my case, they were on the back.
Step 3: Wiring
This step could be potentially dangerous, but if you follow the instructions, you will be safe.
Cut one wire of the power cable and strip both ends. On the 5v relay, there are 5 pins. The two that are directly parallel to each other are for the coil, so when power is applied to it, it will click into its other state.
Notice that only one wire from the power cable is cut in half. This slightly reduces risk of short circuits.
Wire one of the two pins (either one) to 5v and the other to the collector of the transistor. Wire the base of the transistor to pin 13 with a 1kresistor in between the two, and the emitter to ground.
The other three are for normally closed and normally open. We want to use normally open because the coffee maker will be off more than it's on.To use the normally open state, have one of the ends of the power cable going to the centre pin of the three, and the other end to the bottom left corner (see whiteboard drawing).
Use the whiteboard drawing to make sure everything is wired correctly.
Step 4: Mount Relay to the Inside of the Coffee Maker
Use Heat shrink tubing to insulate the leads on the relay. Then, use (an obscene amount of) hot glue to mount the relay to the inside of the casing. Also, make sure that the thick power cable wires don't have too much strain on them. The leads on the relay are quite weak. I actually broke a relay lead during the build and had to find another relay.
Step 5: Upload Code
Download the code, double click to open, then press upload. The first attached code is the test one, meaning that it requires the serial monitor to be open during use. This means that the board would need to be connected to a computer at all times.
You will need to change the '#define WIFI_AP "your wifi network" ' to your wifi network and the line after that to your password.
Once the test code is finished uploading, open the serial monitor and copy the first IP address and paste it into an internet browser.
Step 6: Test...
Power the coffee maker by plugging it into the wall, and plug the linkit ONE into a usb port for power. Then, open an internet browser and paste the IP address from the test code and press enter. after a few seconds, you should see three buttons, one for on, off, set. If you do, press either ON or OFF then press the "set coffee maker" button. If it starts heating up, everything has been done correctly.