The smart socket provides an easy way to add old fashioned, non digital machines to become a bit smarter. For example, you can make it so your coffee machine makes you coffee every morning, right before you wake up. Currently it works by letting you program different timeframes in which different sockets would be active. So all you have to do is put in a start time and an end time for each socket, and turn on your machine with all the ingredients in it, waiting for power.
There's much more possible by attaching a simple microprocessor to a socket, and programmable times is just one of many possibilities.
Step 1: Hooking Up Your Arduino
**Note: The resistors in the picture are not the correct values. they all need to be red|red|brown|gold.**
Step 2: Coding
The code setup I haven't quite figured out yet. Since you only have 3 buttons, you have to be smart about how you edit the start and end times of the sockets.
For the buttons you want to use digitalRead() on the pins you're using for the buttons. Then you have to track the state of the LCD (What it is currently displaying), and the state of the buttons (depending on what LCD is displaying, the buttons should behave differently).
The rest of the code is in the image
**NOTE** code is not finished, project doesn't work yet
I attached the raw text. Feel free to use it however you want.
Step 3: Project Goals
The last part is connecting relays to your arduino, and turn them on whenever the time reaches the intervals. These are orange in the schematic. Note that they have to be pretty strong to be able to handle the power grid, so be careful.