Floating input pin between Raspberry and Arduino (2mt cable)

Hi to everyone,
I’ve got a project where I linked a Arduino and a Raspberry PI.
Arduino and Raspeberry are connected to the same “multiple socket” 220V: RPI with its own power supply and Arduino with a 12V power supply trough the Vin / GND ports (power supplier not showed in image).

Code of Arduino wait for a HIGH value to the 10th PIN to bring the 4th PIN HIGH too. A pull-down resistor is present at the 10th PIN.
GNDs are connected together between the 2 boards.

Everything works great but…
When having current spike on the “same flat” (turning light on, turning on a drill or, sometimes, just attaching the drill to the electricity network), the Arduino seems to recognise a high signal along the pin that connect the Raspberry and the relay is being activated.

I cannot debug it properly because it’s extremely random, not always happen.
Maybe the cable catch some kind of interference (?) or maybe the Arduino is just turning the 4th PIN HIGH on a sort of restart…

Does anyone have some idea? Where could the issue be? How could I fix it (or try to)?

Does this problem go away if you remove the cable connection?

If so, try using twisted pair and/or shielded cable for the 2m connection, and reduce the pullup resistor to 1K Ohms or less.

If the Arduino is actually resetting, there is something wrong with the power supply.

Fast logic signals are very susceptible to interference over long cables (anything over 30cm is long to such signals).

The problem is that logic inputs need so little energy for such a short time to switch. One approach is to low-pass filter and pass through a schmitt-trigger to clean up the edges again.

Another is software-debouncing (depends on the protocol used whether this possible - for instance serial comms is automatically debounced in hardware.

You may have to worry about more than signal integrity with the interference too - it might electrically stress the devices. Adding 100 ohms in series with the signal at each end will afford some protection and defend against signal reflection at the end of the cable.