I have a PC connected to the USB port on my Arduino-based control. Everything is fine when the PC is turned on and then the Arduino controller is turned on. However, when you shut down the Arduino controller and then restart it, the Arduino controller goes amuk. It is turning a light on which suggests it came out of setup, turned the light on and then went amuk, but I can’t be certain of this.
Here are some important facts. If I disconnect the USB connection to the PC before shutting down the Arduino controller, the Arduino controller restarts just fine. Then, when I reconnect the USB port, everything works fine. The Arduino controller has its own 9 vdc power supply plugged into Arduino and it shuts down when the controller is shut down.
This controller is being used in a business and I would rather eliminate this issue rather than impose the disconnect procedure that we know works. Also, is something going on that could cause other problems?
What is going on here and is there any fix?