Traducido del English por IA ·
Era el diodo. Puse un 1N4007 en la válvula y pasé el relé a su propia alimentación de 5 V. El puerto COM no se ha caído ni una vez en dos días y la lectura se mantiene alrededor de 405-415 cuando la válvula conmuta. También añadí la pausa de un segundo. ¡Gracias!
It was the diode. Put a 1N4007 on the valve and moved the relay to its own 5 V supply. The COM port hasn’t dropped once in two days and the reading stays around 405-415 when the valve switches. Also added the one second pause. Thanks!

