Unreliable relay contacts

Thread Starter

cmartinez

Joined Jan 17, 2007
8,730
I've been working on a project that requires interfacing a PLC's relay output to a custom made circuit using a PIC10LF320 working at 3.3V

The way both devices are connected is extremely simple:

1709680309149.png

The MCU_Pin connected to the relay's contacts is configured as an input with its internal "weak pull-up" feature enabled.

Some of the circuits have been behaving well. But some others have been a bit erratic. That is, a few of them have not been detecting the MCU_Pin being pulled to ground when the relay's contacts are closed, or have been detecting it intermittently. I attribute that behavior to the relay's contacts being of the "dry" type, as Max has pointed out in other posts of his. That is, I think that the contacts have been developing some sort of electrical oxidation on their surface, and said oxidation has been acting as an insulator. And this has been made worse due to the low voltage at which the circuit works. Thus explaining the MCU's failure to detect if the relay is closed.

Now, the MCU draws its power from a regulator, and the regulator draws it from a set of batteries connected in series that deliver a bit over 14V when fresh. It is very important that any change I make to the the circuit does not pull more than 5 µA in addition to what it's already being drawn from the batteries.

Any suggestions as to how best to overcome this PITA? ... use an external Zener or an nFet while cancelling the pin's internal pull-up perhaps?

@MaxHeadRoom, @crutschow
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,730
Thanks, Joey and Spook. I knew I could count on your help.

Yes, I'm familiar with relays having golden contacts, and also with reed relays been far more reliable for this sort of application. Unfortunately, changing the relay type or model is not an option for me. But adjusting my circuit is.
 

nsaspook

Joined Aug 27, 2009
16,259
Thanks, Joey and Spook. I knew I could count on your help.

Yes, I'm familiar with relays having golden contacts, and also with reed relays been far more reliable for this sort of application. Unfortunately, changing the relay type or model is not an option for me. But adjusting my circuit is.
The problem with adjusting just your circuit is the low current increase requirement. I suspect you need to increase the 'wetting' current through the contacts to keep them clean when closed. Maybe a periodic contact cleaning software routine with repeated toggles (input switched to output high) might clear the oxide.
https://resources.pcb.cadence.com/blog/2023-wetting-current
 
Last edited:

Jon Chandler

Joined Jun 12, 2008
1,564
Would stronger pullup resistors provide for better contact wetting than the micro's internal weak pullups?

Or using opto-isolators either in place of relays or driven from the relays.
 

crutschow

Joined Mar 14, 2008
38,355
How about adding a capacitor with a series resistor to ground at the relay output to the MCU.
Connect the NC contact to the MCU supply voltage.
That will give a momentary large current pulse at the closing of each contact which should break through any contact oxide.
Start with say 100nf in series with 10Ω (to limit the surge current).
The current then goes to zero after the capacitor is charged or discharged.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,355
Addendum: If the weak MCU pull-up is sufficient to charge the cap in a reasonable period of time, you may not need to connect the NO contact to the MCU power.
Edit: Should be NC contact, not NO.
 
Last edited:

LowQCab

Joined Nov 6, 2012
5,101
You may be experiencing "Contact-Bounce" of the Relay's Contacts.
The above Capacitor may alleviate this, kinda by accident,
but a proper Input-Switch "De-Bouncing-Circuit" may be required for maximum overall reliability.
.
.
.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,730
How about adding a capacitor with a series resistor to ground at the relay output to the MCU.
Connect the NO contact to the MCU supply voltage.
That will give a momentary large current pulse at the closing of each contact which should break through any contact oxide.
Start with say 100nf in series with 10Ω (to limit the surge current).
The current then goes to zero after the capacitor is charged or discharged.
I don't think I understand clearly what you're suggesting. Would you mind adding said components to my sketch? I've attached the asc file.
 

Attachments

Thread Starter

cmartinez

Joined Jan 17, 2007
8,730
To be clear, the problem with my circuit is not a question of debouncing, but rather having the relay's contacts make a reliable and constant connection through which the 3.3V can be sensed. To this end, I believe that crutschow's circuit is an excellent choice to improve reliability. But I am still not 100% convinced that it will maintain a robust and stable connection in the long term.

One detail I forgot the mention (and I apologize for that, I know that not having 100% of the description of a problem from the very beginning is an annoyance for those who're trying to help) is that the MCU checks for the status of its input every 1/10 of a second only. And there is no reason within the working logic to make that check, say, once every second instead. And that being the case, I'm considering using a zener and resistor regulator connected to the 14V source, and briefly activating said regulator using an nFet to check the status of the relay contacts. Having a few mA at 14V run through those contacts for a few microseconds once a second should be enough to break through any layer of oxidation on the contacts. And it would also draw very little power on average.
 

nsaspook

Joined Aug 27, 2009
16,259
I think the capacitor surge generator idea will work just fine for a while but eventually the cleaning 'blast' zone crater will develop a buildup of oxides around it that will result in unreliable contacts again unless it is conditioned away. Your circuit pushing a wetting current of a few mA might be sufficient for the long term.
 

crutschow

Joined Mar 14, 2008
38,355
the cleaning 'blast' zone crater will develop a buildup of oxides around it that will result in unreliable contacts again
I don't see how the limited current, due to the series resistor, will create a "blast" crater sufficient to be a problem.
How is that different then a steady-state current of the same value?
 

MisterBill2

Joined Jan 23, 2018
27,236
I fought a similar but not identical problem a while back, when the original creators had no clue as to the failure mode, even. In that case it was to change the relay contacts. In this case it will be to provide an external pull-up to provide enough current to assure a reliable contact closure. That could be power taken from inside the PLC, if the "Ground" sides do not need to be isolated. The source can be a resistor selected to feed a series string of four silicon diodes in series, providing about 3 volts with the contacts open, and just enough current to clear the oxide from those power contacts when they close. That current will not need to be more that a few miliamps. If they are one-amp power contacts they will wear away before any spark damage can be detected.
 

schmitt trigger

Joined Jul 12, 2010
2,040
This is called the “dry current” requirements.
If you are as old as I am, :cool:you may remember the mercury wetted relays, used precisely to switch those diminutive signals.

Of course, mercury is a banned substance nowadays.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,730
I don't see how the limited current, due to the series resistor, will create a "blast" crater sufficient to be a problem.
How is that different then a steady-state current of the same value?
I too don't think 3.3V can create too much of a problem either, especially with such a low value cap as you've suggested. But like I said, I'm also concerned about the long term stability.
 
Last edited:
Top