This is the wiring. The power is all 5V given by the board except for the 3.3v given to the sensor. Initially it was 5v that too but I tried to use the 3.3V because it was crashing. The relays pins were near the LCD and sensor pins and then I moved them on a separate board. From there, 3 1.5mt long wires go to the relay module which is far 60-70cm on a different level (ground) while I keep the board on a chair. This is the fron view:
This is the sensor module:
and this is the LCD: https://www.amazon.it/gp/product/B01E4YUT3K/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

