Another “smart” do-it-yourself outlet. Part 1

    Yes Yes Yes. Another one. I understand, everyone is tired. But I really wanted to do it myself, my own “smart” socket, with lotto and undergraduates. Built-in (in the house - hidden wiring). With control via WiFi (locally) and the Internet (globally). With obtaining the current status (in the future - with information on consumption). With the connection of several outlets in one unit (up to four). With sensors for temperature, light and presence. With a camcorder in the end!

    The first part - just check the overall health of the circuit. In fact, it’s a kind of WeMo Switch analogue , only built into a standard socket and therefore not tied to any specific design (to fit into any existing interior).

    So what do you want? I would like to control each of the four outlets independently (in my house, in one of the rooms, the outlets are combined in blocks of two two-outlet modules close to each other, in two standard plastic socket boxes, respectively). All units (lighting, a filter pump, a heater, a compressor) of an aquarium with a beautiful brocade catfish are connected to one of these units , so we will manage them. Somik like this, if that (picture to attract attention):

    image


    So, what do we need?
    1. Receive commands via WiFi and issue the appropriate control signals to close the contacts. Those. need a controller module with WiFi. Since I have our shawl on the AR9331(a piano in the bushes, yes: in fact, initially I wanted to try it in real business), it will be such a controller.

    image

    2. Relay for 16A 220V. In order not to bother, he took a ready-made module from Amperka . At the same time, there is also an LED to indicate the mode of operation of the outlet.

    image

    3. Power these two 5V modules. Dismantled the compact power supply with a USB connector.

    image

    4. Socket 60mm deep.

    image

    5. Actually the outlet (so far for the experiments I took the first one that came across in the next hardware store):

    image

    6. LED to indicate the operation mode of the outlet (On / Off). Found in my nightstand green and red. At first I wanted to use green (I like the color more), but it turned out not to be bright enough, so as a result I took red.

    I figured out the scheme (primitive, yes): I

    image

    laid out the components:

    image

    Cut the wires, soldered:

    image

    Cut the pieces of heat shrink tubes, insulated the modules: I

    image

    stuffed everything into the socket, connected the cable, connected it to the outlet. While it is too early to shove into the wall, you need to debug on the table.

    image

    To make the LED better visible, using a thin soldering iron tip I made a small hole in the socket.

    The test bench is ready.

    The software for the initial simple check was taken from the post by uv. Ariman.

    Well ... Surprisingly, everything works. The relay clicks, the LED blinks, electricity is being supplied to the outlet. The first step has been taken. It took about an hour and a half in total. Of money:
    1. The controller on the AR9331 - I don’t even know how to evaluate. Let it be 750r - at this price we are going to sell it when we make the party.
    2. The relay module - 290r.
    3. Power supply - well, let it be 200r (I saw it in the underground passage at such a price, mine had been lying around for a couple of years now).
    4. Podrozetnik - 45 rubles.
    5. Socket - 120 rub.

    Total: $ 1405

    Now you need to bring to mind the software (first of all - the firmware). About this - in the next part, if the people will be interested. And then I will connect the sensors and three more relay modules to control four outlets, not one.

    PS I connected the camcorder - it works, where will it go? But I have to somehow fit it into the interior, I haven't figured it out yet - how ... And in terms of software - I need to learn how to transmit the Internet stream, and not just to LAN.

    Also popular now: