False triggering on my Arduino Nano

 pinMode(5, OUTPUT);
 pinMode(10, INPUT);
 pinMode(7, OUTPUT);
 pinMode(1, OUTPUT);
 pinMode(11, INPUT);
 pinMode(6, OUTPUT);
 pinMode(2, OUTPUT);
 pinMode(12, INPUT);
 pinMode(8, OUTPUT);
 pinMode(3, OUTPUT);
 pinMode(13, INPUT);
 pinMode(4, OUTPUT);

  • Your inputs should have pull up resistors turned on.
    example: pinMode(10, INPUT_PULLUP);

  • You cannot power the relays from the NANO’s 5v pin.

  • The NANO Vin pin should be lower, from 7V to 9V.

  • If the relays are set for LOW active, turn off the NANO’s outputs to the relay module before making them OUTPUTs.

Example:

digitalWrite(5, HIGH);
pinMode(5, OUTPUT);
  • Show us the updated sketch.