Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: chicanagram on Jan 30, 2018, 04:53 am

Title: Arduino Uno randomly disconnects from Serial Port after a while
Post by: chicanagram on Jan 30, 2018, 04:53 am
Hi all,

New user here. :) 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!!
Title: Re: Arduino Uno randomly disconnects from Serial Port after a while
Post by: horace on Jan 30, 2018, 07:58 am
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
http://howtomechatronics.com/tutorials/arduino/control-high-voltage-devices-arduino-relay-tutorial/
https://arduino-info.wikispaces.com/ArduinoPower
Title: Re: Arduino Uno randomly disconnects from Serial Port after a while
Post by: Paul_KD7HB on Feb 01, 2018, 10:42 pm
Turn off the screen saver on the PC!

Paul