I have a system where an Arduino sends a "pulse" to a Windows computer using two wires. The Windows computer reads the pulses via a serial port (with a USB adaptor). It's a simple circuit, it's simply closing the circuit between those two wires. In other words I'm not using serial data or anything like that.
It works great, but very occasionally I get some errant pulses. That happens in bursts, and it'll get like 20 pulses, and then won't happen for awhile again.
Can anyone think of a way to protect this cicrcuit from interference? Maybe a capacitor across the two wires? If so, any advice for capacitor rating?
Sorry, I mean it works great for awhile. And I have it running at 3 different locations, 2 of them work perfectly always, one of them works great for days at a time and then will suddenly get a flurry of errant pulses.
The serial port has 4 lines that can be shorted to ground, and a Python script (for example) running on the host computer can easily detect them. It's commonly used to connect a basic button to a computer. It's the 4 lines highlighted in green in this circuit (ignore the references to the LED, I'm not using one):
In my project I'm using the Arduino to simulate a button press.
I don't have a schematic or know how to make one, but it's just that circuit in the illustration above. Imagine it's just a simple button connected to those two wires. Any suggestions on how to reduce interference?
Pen. Paper. Take a photo with a phone. Or if you're really stuck, post images of all your actual hardware. If you don't have any plan, how did you assemble it?
I don't have the project here, or have easy access to it. It's a long drive away. But that schematic above really is the entire schematic. It's just a button connected to those two wires.
It only happens at this one location. Other PCs work fine. But it happens even when I switch the circuit from a location that doesn't have the issue. So it's some interference at the location. I'm wondering if anyone has any ideas for protecting this circuit from interference.
Shielding. Although "anyone" here can't see your circuit, so...
A minimum useful response would be a detailed verbal description of your cable. Even though, people generally hate those.