Arduino Uno randomly disconnects from Serial Port after a while

Hi all,

New user here. :slight_smile: I’m using Arduino Uno to control an 8-channel relay via the Serial Monitor. When I type in the number for any 1 of the 8 channels, the output on the corresponding pin is to be toggled.

I uploaded program using my laptop, and it seems to do what it’s told. However, when I try to run it with my actual device connected to the relay (comprising a set of electrodes and a 50V ac signal to be switched by the relay), the Serial Monitor stops being responsive after a while (a minute of so). This seems to happen both on my laptop and desktop. When I check Serial Port, I find that the COM Port to which the Uno was originally connected has disappeared. In the case of my laptop, I can reconnect it by unplugging and plugging the USB cable, and then opening the Arduino software again; with the desktop, that does not seem to work.

Any idea as to what might be going on? I’ve attached my code.

Thanks a lot!!

EWOD_8channelrelay.ino (2.73 KB)

it sounds as though it could be a power supply problem with the switching of the load effecting the Arduino
how are you powering the relays?
is the relay power seperate from the Arduino??
have you decoupled the power supply lines?
have a look at

Turn off the screen saver on the PC!