Socket plug with time switch for 3d printer

Socket plug with time switch under table for 3d printer. It also contain watch. Socket can be under electricity just if you press encoder till screen show value more than 3. Also you can switch off it in that way. Socket can be switch off by time switch, but can't be turn on.

If you gonna repeat this project you need:
Arduino
Voltage Regulator - 220 - 5V
relay
transistor 2n3904 or like this
rtc1307
tm1637
rotary encoder
resistor 100 Om
resistor 10kOm

You need to put libraries to your arduino root folder. After coonection according sheme upload sketch "SetTime" from DS1307RTC-master library. It need for set time to rtc1307. Then upload my sketch "socket".