logo elektroda
logo elektroda
X
logo elektroda

Which wires for a smart home? [DIY, Raspberry Pi, Domoticz]

borowikk 3360 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17474723
    borowikk
    Level 9  
    Hello, I have been interested in building automation for almost a year now, mainly DIY solutions. An opportunity came up for me to apply it at home. Some time ago, I started a major renovation of my flat (old post-German building). At the moment, I am mainly concerned with pulling the right cables to the right places so that I can implement the individual systems one by one in the future. I would like to implement as much as possible over the wires, I would like to use wireless solutions (e.g. ESP8266) as a last resort. Of course, I want to be able to control everything via domoticz and later also via homekit. "The heart" of the installation at the beginning will be the Raspberry Pi 3, later I may change to something more stable.
    These would be such fundamental assumptions. Below is a more detailed description of what I want to achieve. Of course, not everything I would like to implement is here.

    1 I am implementing all the socket circuits using YDYp 3x2.5mm² cable. I make some dedicated circuits so that I can control them, or in the event of a mains power failure switch only selected circuits (e.g. fridges or racks) to emergency power. Of course, high-power loads also have separate circuits. In the absence of a separate circuit at the socket I wish to control, I intend to use a relay together with a microcontroller directly in the box. I will describe the method of communication below.

    2 Probably the biggest problem for me is the implementation of the lighting. In theory I should run a separate cable from the switchboard to each point. I thought that if I had 3 light points in a room I would run a YDY 5x1.5mm² wire and already in the room itself I would use a box and divide it into 3 YDY 3x1.5mm² wires. In turn, all bell switches would be connected via YTDY wire and brought to the switchboard. In this way I can use relays to control every light point in the house. However, the problem arises when I would like to be able to control the brightness of each light point individually. Obviously, I would only be able to control the on/off switching with conventional switches, but I would like to control the brightness, for example, from my phone. I am not quite sure how to implement this. The above solution relates only to lighting supplied from 230V, but I also intend to use lighting supplied from 5V and 12V, mainly all kinds of led tapes - on 5V with WS2812b diodes (or other addressable diodes), and 12V ordinary white led tapes. In each case I want to be able to control the brightness. In the case of addressable LEDs, the matter is fairly straightforward, I don't need any additional circuitry to control brightness, all I need is an ordinary 5V power supply with adequate current capacity located close to the tape itself to limit voltage drops and control implemented via a single data line that I need to connect to some uC, if the first led of the tape is close to the switchgear (let's say up to 5m), I think I can run it directly to the main switchgear, if the distance would be longer I think I would have to use some microcontroller directly at the first led of the tape and only then somehow communicate with the switchgear. As for ordinary 12V tapes, I found such a controller (dimmer), which is controlled using PWM waveforms, it is like a signal amplifier. It seems like a good solution, but I'm still thinking about it.

    3. motion detectors in each room, to each detector I run a YTDY 6x0.5 cable from the distribution board.. I haven't yet thought about what exactly their role would be, but I think they would, for example, check the presence of people in the room and switch off the light after a long absence.

    4 Electrically operated interior roller shutters, each roller shutter will be connected to a YDY 5x1.5mm switchboard. There will be a louvre switch (ordinary double bell switch) at each window where the blinds will be, and to it from the distribution board goes YTDY 6x0.5 (theoretically 4 wires are enough, but I prefer to have some spare).

    5. in the bathroom on the window I'd like to make a film like this, which is normal transparent when voltage is applied and becomes milky when the voltage is removed. Somewhere nearby a normal bell switch and a YTDY wire fed to it in the same way. Unfortunately, from what I have read, the price per m² is very high - over £1,000, so I will still think about this idea.

    6 The heating is realised with the help of a gas cooker. I intend to install a 230V thermoelectric actuator on each radiator and a 24V actuator in the bathroom. The power consumption of such an actuator is very low, the ones I want to use consume about 2W. As a result, I am not quite sure what type of cable to use, theoretically no thinner than 1.5mm² at 230V, and here even 0.5mm² would suffice.

    7 Any sensor for opening windows or doors will be connected using YTDY 2x0.5 cable. These are ordinary reed switches, so here the matter seems simple.

    8) While reading through various topics, I came across the idea of night lighting, which would be lit from dusk to midnight and then switched on after midnight using motion sensors. I was thinking of using WS2812b LEDs and mounting them in skirting boards every half metre or so. Using these LEDs seems like a good idea to me, as I could control all the LEDs in the house with one data line (or I could use two lines per floor).

    9. LAN - I won't elaborate here, I think I already know most of it. U/UTP cat. 6 I'm running everywhere I can.

    10. installation of RTV-SAT - has little to do with the rest, but I preferred to mention it. Here, too, I've read enough and I think I can manage.

    11. throughout the installation there will be many different sensors (temperature, humidity, light intensity, etc.), displays, relays in sockets (optional, I mentioned in the first point) and other electronic components. Each of these will communicate in its own way: I2C, 1wire, etc. Furthermore, all modes of transmission work over small distances. The only sensible solution seems to be to use a uC at each sensor, or group of sensors, and communicate via RS485. Alternatively, a simpler solution is ESP.

    12. if RS485 turned out to be a good idea, what cable should I use and in what topolg to lay it? I think a simple twisted pair U/UTP cat. 5e should be sufficient and it should be laid in a linear topology, i.e. from the switchgear to the first uC, then from the first uC to the second uC, then from the second to the third, and so on.

    If I were to use an ESP somewhere, it would be very simple to supply the power, whether 230V and a power supply unit or, for example, 24V and an inverter.

    I've written a bit, I'm sure I've forgotten a few more things. I have tried to describe everything clearly.
    I would be grateful for any suggestions and pointing out mistakes, as well as for suggesting completely new ideas.
    Do you have a problem with Raspberry? Ask question. Visit our forum Raspberry.
  • ADVERTISEMENT
  • #2 17480545
    Andrzej42
    Level 31  
    You have a broad and very ambitious plan. It will take a lot of money and even more work. I am curious to see what will come out of it.
    I can help you with the choice of cables : they are to meet the required voltage strength. For a mains voltage of 230V, there are to be cables for 750V. Cross-sectional recommendations are also important, but if you know how to adequately protect a circuit, you can reduce the cross-section - it's about the short-circuit current that can occur and the reaction of the cable and its insulation to this. It's also about mechanical strength - many times dismantling a switch will cause the wire to become loose.
    In the false ceiling, I suggest hanging cables on hooks and separating 230V current and signal cables by 10cm.With this amount of current and signal installations, you may have problems with interference. Try to apply this rule where you can.
    USMP holders are good if you have a few cables, if you have whole heaps I don't know.... You will probably have a whole wall occupied at the distribution board.
  • ADVERTISEMENT
  • #3 17483983
    borowikk
    Level 9  
    Thanks for your reply. I'm not likely to have any problems with choosing the right wires and protection. I will lead the 230V cables in the walls mainly at a height of 30cm from the floor, while the cables for all other installations (LAN, RTV-SAT, signal cables for switches and sensors) will be led another 30cm higher, i.e. at 60cm from the floor. Of course, vertically as well as in the ceiling I will also keep the distances as large as possible. Could you tell me exactly which hooks you mean? Some time ago, out of curiosity, I counted how many cables would be coming into the switchboard and it came out to just under 100, and at the time I hadn't yet taken into account many that I hadn't thought of at the time.
  • ADVERTISEMENT
  • #4 17487679
    igorrr
    Level 15  
    Hi. I have such a DIY "smart" house on RPI 3 and I do not recommend this solution, every 6 months or so the card in the RPI crashes and the system gets the proverbial nut.
    Replacing the card and uploading a backup helps.
    The problem is the one known and widely described on the internet.
    At the moment I will be moving away from the factory to a more secure solution.
  • #5 17501652
    ditomek
    Level 22  
    I set up the installation in the house and so:
    1. all the switches (roller blinds and lights) go via twisted pair to the "logic" distribution board
    2. because I am using twisted-pair cable, it is fitted on both sides with a normal rj45 plug.
    3) In the boxes, I have small plates with rj sockets and ARK terminals to connect the thicker cables that connect the standard connectors.
    4) In the "logic" panel I built something that at first glance looks like a switch or patchpanel, but inside there are atmegi128 and galvanic isolation on each input. The whole thing is configured so that one rj45 connector provides 4 or 2 DI inputs. I try to use double (blind) switches everywhere. The device shows on the display the number of the input which has been triggered, reacts to edges and monitors the vibration of the contacts. Information about the pressed button is sent to the master controller.
    The master controller (Arduino Mega) controls all the devices, i.e. at the moment the roller shutters and lighting. Simple algorithms for switching off receivers after a set time and rules related to group control of roller shutters are implemented inside. The display and keypad make it possible to change time parameters. I have adopted a control protocol and now I do not need to extend the software, as I have external access (serial port) and I can operate any shutter and lighting from an external system. E.g. one type of command is used to switch on selected outputs, another to switch off and another to switch to the opposite state.
    6 The master has a network port and responds on UDP. TCP with the webserver puts too much load on the Arduino Mega so the web interface is separate.
    7. all 230V receivers (I don't have any others in total) are connected in the "force" distribution board with relays. I have made boards with 8 relays, galvanic isolation, Arduino Nano module and LED display. The modules are controlled from the master via RS485. The whole thing is made so that the master issues a data packet every 500ms and every time the state of any output changes. If the modules do not receive data for longer than a second, their outputs are switched off and a message indicating a lack of communication appears on the display. In addition, thanks to the buttons, the module can be configured.
    8. the internet module is a separate issue and given my bad experience with the Rpi (failing card) I will look for something else, for now in this role I have another Arduino Mega talking to the master via RS485.
    9. the Arduino Mega has a lot of outputs and in total all my receivers (relays) could be controlled directly from it. I am still testing the relay modules which generally work well but there is sometimes a short interference. We'll live and see.

    The best thing about such an installation is that pressing any button on the wall generates a message on the serial port and all receivers are also controlled from the serial port. In this situation and in this topology, you can really use many things as a master. It could be an RPi or any other comp, an old laptop, another microcontroller. I was also planning an ESP in this place. ESP has a lot of power to make the necessary logic and web support available at the same time.
ADVERTISEMENT