Hi,
If you have new or edited code to post, please do it in a new post, going back and editing previous posts makes the thread flow confusing.
Can you please post an image(s) of your project please?
What external power supply are you using and where have you connected it to your project?
Have you measured the 5V pin on your controller when the relay problem occurs?
What model Arduino are you using?
Can you please post a circuit diagram, showing pin and component labels as well as your power supply connections?
Thanks.. Tom...
![]()