Some way to protect this simple circuit from interference?

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?

Or some other clever way?

Thanks for any help.

TRy it again with only the Arduino disconnected.

Show a schematic of this and tell us how long the wires are how the grounds are referenced to each other.

It doesn't sound right. A serial port responds to voltages, not opening and closing of contacts.

1 Like

That is a direct contradiction.

1 Like

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):

image

In my project I'm using the Arduino to simulate a button press.

Thank you. Now please answer reply #3. Please include the Arduino wiring.

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?

1 Like

Actually the errant pulses happen even with the arduino disconnected. It's just two wires connected to the serial port excatly as the schematic above.

Disconnected from what? We can't see your project. Please provide all the information you are asked for.

Please, diagrams and/or photos.

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.

Okay, please follow up when you are on site. Have you tried a different PC?

Thank you. Maybe someone else has some ideas?

I see no Arduino there. So it can't be.

I get the same problem even without the Arduino.

Try a different PC. Or, a different cable.

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.

I literally posted a schematic of the circuit above. That really is all there is to my circuit (in stripped down form).

The cable is just two wires, unshielded. This cable works everywhere but this one location.

I'm wondering if a capacitor across the circuit might help?