Go Down

Topic: PC hangs when Arduino connected to USB (Read 743 times) previous topic - next topic


I have been having great success developing an application until a couple of days ago, when something changed - and I can't figure out what it is.  My PC runs fine until I plug an Arduino (mine are Mega 2560s) into the USB port.  The PC mouse instantly freezes or becomes very sluggish.  Unplug the USB, and the PC returns to normal.  I haven't installed any new hardware of software on my PC.  All of the below have successfully coexisted until a couple of days ago:
* Windows 10 64 bit
* Two Arduino IDEs installed in separate locations on the PC: 1.8.5, and 1.6.9 - this permits me to run two Arduinos simultaneously, testing wireless communication between them
* All my Arduinos are Mega 2560ss; some are SainSmart; others are Chinese; all have played together nicely in the past
* Symptoms appear no matter what I am running; Blink, for instance, hangs up the mouse; nothing is attached to the Arduino running Blink.
* No error messages
* I don't have USB Cellular Wifi Dongle software or PDA sync applications.  I am not running Bluetooth, but I have had Bluetooth installed in the distant past.

My suspicion is that there is some conflict with a COM port, but I don't know what it is.  Each Arduino I attach seems to come up with its own COM port number when I plug it in.  There is another, COM2, port on the computer; I don't know what uses it.




Try a different Arduino. If the USB chip on the Mega has a defect, this CAN cause the problem.

Any Arduino with USB connection will do.



In addition to what BluesBear wrote, when you say that nothing is attached to the board running Blink, I'm guessing the USB cable is attached, otherwise you couldn't run it. So I suppose you mean that nothing is attached that allows the two boards to communicate between each other, since you also mentioned things like bluetooth? Anyhow check in system->hardware in control panel and make sure there aren't any exclamation marks anywhere around the COM port or USB hardware entries. I'm also confused as to why you run two separate versions of the IDE when just two instances of the IDE, same version, with each arduino/IDE making use of it's own COM port would "seemingly" accomplish the same thing, better?


Attaching a general help file but there are a couple of parts that may be of interest.

Slow computers with Arduinos are usually connected with computer security eg. antivirus or other security software so maybe turn that off for testing at least.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


Thank you all for your feedback!

Yes, nothing except the USB is connected to the Arduino Mega.
There are no exclamation marks by any Device Manager items, including COM and USB
I historically had used IDE 1.6.9
 * At some point in the past I had downloaded a version IDE 1.8.<something> and it didn't work
 * I went back to IDE 1.6.9 and left a copy around when later I successfully downloaded IDE 1.8.5
Read all suggestions and attachments; lots of good ideas, but nothing seemed to apply here

Further actions I took today:
* Uninstalled and reinstalled IDE 1.8.5 - no change/improvement resulted
* Downloaded and installed the .zip file of IDE 1.8.5 in a separate location - no change/improvement resulted
* Unistalled and reinstalled the Chinese clone driver, CH341SER.EXE - no change/improvement resulted
  * Note: the testing I'm doing at this point is with multiple Chinese clone Arduinos
* Did some snooping and noticed that the installation timestamp on COM2 and my Western Digital My Book Duo (MBD) USB device have the same timestamps - I am concluding that MBD must be using COM2
* Dismounted MBD and unplugged it from the USB port - now the mouse is still sluggish, but liveable
  * Mouse clicks were frequently missed, as well as keyboard strokes - this is more of a problem
* Did several uploads to the Arduino, all successful but still a sluggish mouse
  * Added a Serial.println statement to Blink - the Serial Monitor window opened but NO TEXT APPEARED
  * Verified Serial Monitor baud rate (9600) and tried several other rates just for grins
* Reconnected the MBD (Arduino still connected, running Blink) and everything continued running sluggish
* Disconnected the Arduino and the PC performance returned to normal
* Reconnected the Arduino  to USB and checked current draw - was only 10mA!!! - mouse still sluggish
   * Left the USB attached to the Arduino, and in parallel supplied 9V to the Arduino's power jack
      * PC mouse immediately became lively again
      * Serial Monitor still not displaying any results

I should mention that when I first got the Chinese clones I didn't know in advance that they would show up differently on the list of ports.  So, not knowing what they were, I have been known to attempt to upload a sketch to COM2.  Who knows what this may have done - but until two days ago it didn't seem to have hurt anything.

These results are a bit confusing...sorting it out,
* I may have drawn too much current from my PC's USB port, damaging its ability to supply current(?)
* I may have somehow succeeded in damaging either the MBD driver or the Arduino driver.  I appear to have replaced the Chinese clone driver with a known good one, but perhaps something else in the chain is still broken.
* I have no ideas why the Serial Monitor would not be working

Until I can figure out a solution at least I can supply power to the Arduino's power jack an continue development - without any Serial Monitor feedback :-(.


I wonder, even if you damaged the port, if you could now connect a self-powered hub to it and try that since you may still have the communication aspect of the on-board USB working.

Seems odd the MBD would show up as a COM port, or interract with it in anyway. It should have it's own driver and having just connected one that I have, should show a VID (vender ID) of 0x1058 in the device manager. I think the original USB spec allowed 150mA for that type of device (only 100mA for things like the arduino - I think) but that was later bumped to 500mA, and finally 900mA, with all the changes just due to how the driver handles power management. If you want to pursue possible issues with the drive, perhaps take an old USB cable, strip the insulation to get to the power wire, and check the actual current draw of the drive. If it's excessive then that's a problem and should be reported to WD, or at least allow you to get a replacement drive from where you got it?

Maybe also see if that chinese clone is installing it's own driver (.sys) or using the onboard usbser.sys. If using it's own driver, check it's VID and see if it's "stolen use of" someone else's issued VID or if it's actually it's own. The arduino, for example, makes use of the windows on-board usbser driver while things that use an FTDI chip use the one provided by FTDI which has it's own driver. Finally, the chinese driver installation file, if installing it's own .sys, but is installing itself with a class definition for the usbser, that could create some kind of conflict. That can be found in it's associated .inf file if it installed it's own .sys and should be USB rather than USBSER, but I'm not sure if that applies in every case - something you could research.


Nov 12, 2017, 02:51 pm Last Edit: Nov 12, 2017, 02:52 pm by ballscrewbob
A DECENT picture of the smaller chip near the USB port of the Arduino or the writing on that chip may be nice to have so somebody can say for sure about drivers etc..

Attaching a clean up procedure for IDE's that seems to help quite a few people.

For a few years now USB ports have had decent isolation from over current and such and a simple test is to plug a known working devices such as a mouse into each on in turn and see if it works. (eliminates that aspect completely)

Use of COM 2 is unusual for windows as COM 1 and 2 are normally reserved for windows use.

USB 3.0 is not always recommended for Arduino boards as it has been shown to cause some issues (chipset dependent) so make sure you are testing on a USB 2.0 port.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


Port COM2 may not be the MBD; that was a guess based on similar timestamps, but the guess could definitely be wrong.  Bottom line is, I still don't know what this port is.

The procedure I used to install the Chinese clone driver (for the CH340 chip) is here:
* http://www.instructables.com/id/How-to-fix-bad-Chinese-Arduino-clones/
The procedure includes a close-up picture of the chip.

I have only USB 2.0 - hopefully USB 3.0 will be supported in the future because it will become more prevalent

Today's troubleshooting and results:
* I installed IDE 1.8.5 on my wife's PC.  I could successfully program the Arduino and monitor the Serial port.
* I took the Arduino back to my PC, and now it could program the Arduino and monitor the Serial port.  Don't know how/why this fixed anything, but it appeared to do so.
* I reattached components for my application to the Arduino and attempted to load the application.  Appeared to load, but the application didn't work.
* I replaced a HC-12 transceiver module that I had a hunch could be defective.  Apparently it was, because now the application works.

Today's summary:
* I don't know what COM2 is, but it was there before the problem started and it's still there, maybe harmless
* I may have had multiple hardware issues, but especially the HC-12 transceiver could have been masking or at least confusing some of the problems.  In addition, maybe hardware defects stressed polyfuses or other components that took awhile to heal?.
* I really don't know how the process I used healed anything, but it appears to have done so.

I really appreciate the feedback - it feels good to have your support.

Go Up