• How are you driving the relay? Does it have its own transistor?

    If you're driving it direct then I could imagine that the voltage spike from the relay coil could definitely affect surrounding pins (I imagine it would be out of spec for the chip).

    The other problem could be that while the pins are 5v tolerant as inputs, they only produce a 3.3v output voltage - so if you're powering the relay off 5v, and you output digitalWrite(A5,1), the pin's being connected to 3.3v - which is actually raising the voltage of the 3.3v line via the relay!

    To fix that you could try setting the output type if A5 to opendrain? It depends if your relay turns on when you output 0 (most do) or 1.

About

Avatar for Gordon @Gordon started