Pages: [1]   Go Down
Author Topic: Uno: COM-Port trouble after 24 hours "A device attached to the system is not..."  (Read 1306 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

My arduino code sends a message over the USB/COM port every time it sees a pulse from a LED (using a LDR). The code is running on a Arduino Uno (1st Rev with DIP AtMega). The Arduino is connected to a server (Windows Server 2008 R2 x64) with a custom C# application that writes the frequency of the pulses to a database.  Everything works consistently, except that after about 24 hours (+- 3 hours), communication between the computer and the Arduino ceases completely. If you try to restart the C# application, it receives an exception "A device attached to the system is not functioning" when trying to open the COM port. The same error is given when trying to open the port using PUTTY.

To resolve the problem, I simply delete the COM port in the Device Manager, and then "Scan for hardware changes...". After the port is re-detected, the software runs for about another 24 hours before the problem repeats.

I have the exact same code running on a old Arduino Duemilanove (with the FTDI chip) at home connected to a Windows XP computer running the same C# code, and it has been running without a problem for 80 days now.

Can someone please shed a bit of light on the problem or help me resolve it with some troubleshooting.

EDIT: The Hardware ID of the Arduino UNO is USB\VID_2341&PID_0001&REV_0001 so am I correct in saying the Atmega8U2 is running the latest firmware?
« Last Edit: March 22, 2012, 03:11:49 am by riaanc » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12782
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My arduino code sends a message over the USB/COM port every time it sees a pulse from a LED (using a LDR).

Roughly how often does the pulse occur?

One possibility is that the Uno is drawing too much current.  I suggest posting a schematic.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The pulse measured is from a pre-paid electricity meter. The highest frequency possible is about 4Hz, and the message size is 6 bytes on every pulse. The only thing connected to the Arduino is a 100K LDR and and a 100K resistor to offset the LDR voltage. The integrated LED on  pin 13 is flashed with every pulse. Other than that, nothing is connected.

The exact same components are attached to the Duemilanove though.

Does anyone do something like data acquisition with an Uno that can confirm an uptime of months?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12782
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I can confirm two week.  I've not needed anything longer.

Switch the boards.  If the problem follows, the board is the culprit.  If not, the computer is.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your help guys. I managed to deduce the problem: Its software/hardware related but not the arduino's fault.

I have an LDR that measures a pulse from an LED on an electricity meter and sends a basic message to the PC over USB. The message is sent on a rising edge interrupt.
It turns out that every morning at about 07:00, sunrise over here, sunlight penetrates the assembly and hovers the voltage around enough to trigger thousands of interrupts flooding and eventually breaking the USB. Putting a box over the meter and LDR solved it.

I'm also planning on using a 74HC14 Schmitt Trigger to solve the problem.. Do you think it will work?
Logged

Pages: [1]   Go Up
Jump to: