Hello,
I have an Arduino Mega 2560, a PoE Ethernet 2 Shield and 3 x 8 channel relay boards.
I have spent a bit of time trying to debug my problem but I am at a loss and hence this post.
I am making extensive use of MQTT and fundamentally, this device subscribes to and takes actions on MQTT messages. The action in most cases is toggling relays.
The issue I am having is whilst I use external power supplies for all relays. When I loose USB (serial) in the case of the host system being offline or it is rebooting, some of the relays (not all) cycle, you can hear them latching.
The Arduino does not loose power, their is PoE from the Ethernet2 shield and I have used a barrel jack also.
I am at a loss.
My main loop just calls functions. I have placed these functions in an if statement and have sleep functions if the connection to the MQTT broker is offline.
if(Serial.available())
Any thoughts, happy to share my sketch.