Serial Communication Issues

I have an arduino sketch that sets up a very simple serial protocol to do various tasks. I have a corresponding C# application that creates a serial connection and uses it to communicate with the Arduino through this protocol. For the most part it works flawlessly, however, with the arduino Uno (only board we really use) I have a handful of users that are experiencing problems.

Part of the protocol is that the arduino sketch sends a heartbeat message using Serial.write to send a little bit of data identifying the data as the heartbeat.

What's happening to this small set of users, is that after some amount of time, the C# application stops receiving the heartbeat message and so it assumes something has gone wrong with the connection.

The only other bit of information is this event seems to be caused by some kind of electrical interference. Fairly close to the arduino is an 18v power supply driving a small motor (slot car). When no power is applied to the motor at least one particular user has no issues, but some random time after applying power to the motor he gets the signal loss.

Any thoughts on what this could be, how to fix it, and/or how to troubleshoot it? I've tried virtually everything I can think of.

All help is appreciated. Thanks Dave

Shielding and electrical isolation spring to mind.

Mind you this isn't an installation problem I would have asked it in the general electronics section.

We've tried everything we know of to add shielding and provide electrical isolation. From what we can tell it looks like the entire board locks up when we have the issues. More often than not we have to reboot the PC to talk to the board again. Sometimes unplugging the USB cable is enough but not always.

I'm happy to have this post moved to the proper forum. I saw "troubleshooting" and figured I'm having trouble...

What about getting a capacitor across the power to the motors?

daufderh:
We’ve tried everything we know of to add shielding and provide electrical isolation. From what we can tell it looks like the entire board locks up when we have the issues. More often than not we have to reboot the PC to talk to the board again. Sometimes unplugging the USB cable is enough but not always.

I’m happy to have this post moved to the proper forum. I saw “troubleshooting” and figured I’m having trouble…

How about powering Arduino from batteries? If the problem is solved this way, then you know is some kind of electronic noise that you must filter. If the motor runs on AC build a snubber circuit, if it is DC plug a flyback diode.