Output switching imself without command

That’s very bad practice. It’s far better to power the relays separately, but you have to have a common GND between the two power supplies.

Have you changed your sketch to declare these as OUTPUT in the pinMode commands?

Pete.

:flushed::man_facepalming:no

I use the second code as you see (second code in this post)

I have no idea what these responses from you are in relation to.

I’d suggest that you quote the question/comment that you’re replying to, and put all of your replies in a single post rather than having an endless stream of one line replies.

Pete.

Ok i try it tank you very much