Windows XP  denying access to USB Serial port...

Hi.

We have a Windows XP SP3 on a new Shuttle running a C# Windows application with a Duemilanove board attached. We have a button wired up that when pressed, the board sends a signal to the computer and it plays a video, the computer then sends a signal back to the board and the board then activates a water sprayer. This usually works fine for a period of time. Then everything stops working, almost like either the computer or the Arduino board has gone to sleep. We have to restart the program and it usually fixes the problem. We are getting a message when we ook around Windows to the effect that access to the Com port is denied. I will have to clarify this sorry.

Has anybody come across Windows randomly denying access to a Com port? Any ideas or suggestions?

Thanks Trev.

Has anybody come across Windows randomly denying access to a Com port?

While Microsoft has done some very bad things I seriously doubt they included code to randomly deny access to a COM port.

Any ideas or suggestions?

The most likely culprit is that the port is already open by either your C# application or another application (like the Arduino IDE or the Arduino Serial Monitor).

We do not have the Arduino sketch program open. Only the Visual Studio 2008 program that we are developing our code on. The program this morning has been running just over 2 hours and it has now just stopped responding.

We have just thought that maybe the serial buffer is getting full as the Arduino is sending a signal back to the computer every second. So we have just added in to the C# code to discard the in buffer after we get the reading we need. Will keep you posted.

Thank you for your help so far.

Trev.

Update. We have done more testing today. First run lasted 20 minutes. Second run went for over 3 hours, we stopped the program ourselves. Trying to recreate the stoppage is problematic. We have replaced the original Arduino with a new one and this has been going fine for over 2 hours so far, started 4pm NZ time.

Could it be that you are drawing too much current from the Arduino causing it to reset and confusing the C# serialport object ?

Is the voltage regulator on the Arduino warm / hot when it shuts down ?

How much current is the water sparyer drawing and how are you driving it ?

We need details :-)

Right. On the new board we have been using, the voltage regulator is cold to the touch, and it has been running solid for the past 18 hours.

The water sprayer is powered by 3V DC from a 3V power pack. This is triggered by sending a signal from Pin 13 on the Arduino to a HRS1KH-S 5DCV Relay for 150ms. The sprayer can be activated a maximum of 3 times per minute due to the length of the accompanying video that the computer plays at the same time.

Everything is behaving as it should so far.

Trev.