False triggering on my Arduino Nano

just to update you on the changes I’ve made;

  1. I am using pin 9 as an output instead of pin 1.
  2. I am now powering the relay board with its own power supply.
  3. I am now powering the nano with its own power supply.
  4. I have gone from external pull up resistors to internal pull up.
  5. I have changed my code for my outputs to the relays to read the following
  6.  digitalWrite(5, HIGH);
     pinMode(5, OUTPUT);