Taking over the Internet of Things, one coffeemaker at a time! Don’t say it wouldn’t be awesome to have your morning coffee ready before you even get up from bed!
Oh, I’ll make it straight right from the beginning: these kinds of hacks are POTENTIALLY DANGEROUS! Don’t mess around with high-voltage electrics unless you know EXACTLY what you’re doing! This is not a howto-guide anyway, so I’m not giving away any dirty details!
All righty then, let’s go through the main components of the system! We have ourselves a coffeemaker, which we are about to connect to the Great Internet of Things. Then we have a Raspberry Pi, the credit-card-sized mini-powerpack with some GPIO pins. Last off, we have a random set of transistors, relays and cables along with a couple of power sources.
The relay circuit is done with a BC-337 transistor, which is connected to the RasPi’s GPIO header. We use the transistor with one of the controllable 3.3V pins to supply our first 5V-relay with the RasPi’s 5V output pin voltage. That relay in turn drives another 24-volt relay, which eventually controls the 230V mains voltage. How’s that for a leverage!
The Raspberry Pi is packed with a WiFi dongle and a little command line utility called gpio, which is used for controlling the GPIO pins. It also has an Apache-webserver running with some simple PHP magic. The user interface is as genious as expected from a coffeemaker: a single button! When you connect your web browser to the UI and press the button, the PHP script executes a system command calling the gpio program, which turns the coffeemaker on and off accordingly. How elegant!
So, when you wake up in the morning, just bring out your phone and have that coffeemaker do what it’s supposed to!