Arduino Nano Every causes PC to not boot

Long story short, I have an Arduino Nano Every connected to a Windows 11 Dell Optiplex 7010. I turn the PC on, everything works, I turn it off. I turn the PC on again, everything works, I turn it off. I turn the PC on for a third time, everything works, I turn it off. I turn it on the fourth time and get an alert about having no keyboard and then it proceeds to boot and everything works, and I turn it off. The fifth time I turn on the PC, it doesn't boot. Then I unplug the Arduino and it boots. If I plug the Arduino in again after I log in, I get a warning about the device not being recognized. Then I have to cut Arduino power for a bit, maybe 20-30 minutes, before it works again. This is consistent and repeatable.

Here's an overview of the project. The Arduino is connected to a proximity IR sensor that is powered by a bipolar stepper motor driver carrier. The Arduino is also connected to the driver in order to be able to drive the motor. The Arduino is running Bitlash and communicates with a C++ application on the PC that runs in the background. It sends commands to the Arduino and gets data back. The Arduino turns the motor based on the data sent from the PC and the output from the IR sensor.

My first theory was that the Arduino was somehow drawing excess power from the PC, so I added a ground wire from the Arduino to an external power supply. Nothing changed. Then I did some research and read that it might be possible that the PC is not supplying enough power to the Arduino when it's booting, which prevents the Arduino from initializing and that somehow freaks out the PC. I added a wire from the 5v pin on the Arduino to the 5v pin on the external power supply (I know, power from the power supply and the USB connection, not ideal but I had to experiment), and nothing changed. I read somewhere that adding an active USB hub might work, so I put that between the Arduino and the PC. Nothing changed. I'm not the only one to experience this issue: arduino prevents computer startup - #6 by eried

I have changed USB ports and computers and Arduinos. I extended POST time from 0 to 10 seconds. My Arduino is authentic. I'm certain the wiring is correct.

What should I try next?

I'd be concerned and you might want to connect through a "disposable" USB hub until you get it solved.

That's probably it. But it could be over-voltage (somehow) from the stepper motor power supply, or reverse voltage from the motor's inductive kick-back.

The stepper does have a separate power supply, right? Most steppers can't be USB powered.

The motor gets power from the same power supply to which the Arduino is grounded. It's a dual output supply, 24v for the motor and 5v for the Arduino.

I'll keep it plugged into the hub for now.

If it is a power issue, I'm not sure how to proceed. It should be getting enough power just from the external power supply and it's also grounded to that power supply.

I will take a SWAG and say that is the way your BIOS (Basic Input Output System) is set up. It thinks the Nano is a bookable device and tries forever to boot from it. Since it cannot supply the code the computer stalls. If you are comfortable you need to either turn off the boot from USB or put it after your primary boot device.

I checked the boot order. Windows is at the top and I didn't even see USB as an option.

Sorry, several of my BIOSs give me that option, some do not. In some it is also part of the UEFI (Unified Extensible Firmware Interface). Here is a Link that will explain part of the UEFI: UEFI boot: how does that actually work, then? | AdamW on Linux and more

So far, I've tried adding a 30 second delay at the beginning of the Arduino sketch to delay serial communication, I disabled USB booting even though the Arduino was not listed as a bootable device, I disabled Secure Boot, I turned on Fast Boot, I extended POST time, I enabled POST recovery, and I'm still having the same the issue. I don't know what other BIOS settings to tinker with.

I also theorized that maybe the PC was sending a signal to the Arduino that overloaded a circuit when it boots and that's why it fails after a specific number of boots. I cut the power wire in a USB cable (red) so that it's getting power only from the external power supply. Nothing changed.

Your PC does not like USB power feeding back from the Arduino. Unplug the USB cable before turning on the PC or remove power from the Arduino.

So, there's no way to fix this? Just unplugging it and plugging it back in?

You should never have created the problem in the first place!

Well, why didn't you tell me that before I started?

Have you tried a PC from a different manufacturer?

I tried it with my HP laptop and didn't have issues. However, this is a company project and the issue was not discovered until a few weeks after we started shipping this setup. In other words, I am stuck with this particular brand and model for now.

Every PC manufacturer has their own mother board design and their own BIOS code. Glad to hear that your HP laptop does not have the problem. We only used HP in my previous company. I still have several HP laptops.
In another life, I was a partner in a company doing software for UNISYS high speed check readers/sorters. We did not do any electronic devices, but always tested EACH new PC design that UNISYS made and found several with defects, just like you are discovering.
Part of the business needs to verify that a PC will work properly with your device.

If I understand correctly, you're saying that we've discovered a quirk or defect in the design of the motherboard in this PC, right? My next thought would be some kind of relay that sits between the Arduino and PC that can be opened and closed with a logic voltage. The logic voltage could be supplied by the external power supply in the machine. Then this relay would be controlled by the external power supply in the machine. In other words, when the machine is on and the logic voltage is applied, the relay would close and allow a USB connection between the Arduino the PC. So, the machine would have to be turned off when rebooting the PC in order to avoid this issue. I don't like this workaround, but do you have any thoughts?

Going back to your first post, the problem seems to be that your product is powered from a power source as well as being powered by the USB connection to the PC. Is the power from the USB really necessary?

It was originally designed to be powered solely from USB. I added a wire from +5v to the power supply to see if it fix the issue, which it didn't. It doesn't need power from USB specifically, just as long as there is a connection. In fact, I tried using a USB cable after cutting the red wire in the cable to turn it into a crude data only cable and that had no effect. Since my first post, I've removed the wire from the Arduino to the power supply, so the Arduino is currently getting power only from the PC.

Another thing I just tried was changing the baud rate of the Arduino sketch, and that had no effect.

Breakfast called! With the test running only with USB power, was there any connections to the power supply? Test with NO wires to the external supply. I am suspecting there is a ground voltage difference between the PSU and the PC.

There is currently a wire running from Arduino ground to power supply ground. I added that hoping it would fix the issue, but it had no effect. My most recent experiments have been run with the Arduino connected to nothing at all except USB, and it causes the same issue.

I have updated the BIOS and changed as many settings as I could. Nothing changed.