Choosing the right snubber diodes

Thread Starter

cmartinez

Joined Jan 17, 2007
8,722
Goal: I want to protect a couple of MCU's inputs (PIC16LF18446) that are connected to reed switches through a 3m (10 foot) cable from inductive kickback using snubber diodes. The MCU (and its inputs) run at 3.3V. I want to make the circuit as reliable and robust as possible so it can work for the longest possible time. Working frequency is less than 5 Hz​
Problem: It seems that I chose the wrong diodes for this purpose​
Questions:
1.- Are the diodes really necessary?​
2.- Can some other component/technique be used instead?​

Here's the small circuit that I built and tested:

1746032408829.png

Here's the thing: I built several circuits using the exact same parts and the exact same layout, and to my annoyance and surprise, some of them work fine, and some don't. The MCU was perfectly able to sense when its inputs were being pulled down in some of the circuits, whilst in others it worked erratically, and in some others it didn't work at all. It wasn't until I removed D3 and D4 that things began to work reliably. The reason I installed said diodes was that I was afraid that the cable's length and the prolonged use of the MCU's pins to constantly being mechanically switched between high and low states by the reed switches (I have no control over the use of said switches, they belong to a third party's device) might in the long term damage the the MCU's inputs due to small and constant inductive spikes.

I know for a fact that some MCU's already have built-in protective diodes at their inputs (such as Atmel's line of 8051 architecture MCUs) but I cannot find data on this issue regarding Microchip's PIC16 line of products.

Anyway, here's the data of the diodes I chose for this purpose.

1746033218419.png

The main reason I chose them was because of their size. They're 0805 and therefore much easier to solder manually than smaller configurations. When I chose them, I thought that, as long as they were of the Schottky type, any diode would do. I now realize I was wrong. These (among other things) diodes have a huge reverse current when compared to the current being drawn by the switches when they pull the lines down. An I suspect that is the culprit of why my circuit behaved so unstably. But I'd very much like to know the opinion of more knowledgeable people on this matter.

Anyway, I'm now in the process of choosing diodes more suitable for this purpose. But I'm finding it kind of difficult because another requirement that I hadn't mentioned is that the diodes should draw as little current as possible when reverse-biased. This because the circuit works on batteries and they should last as many YEARS as possible.

One of the options I'm considering is using nFets configured as diodes (see diagram below). I've done it before and they proved better than Schottkeys, but what they solved is their better performance at high frequency switching, but I'm not sure if they're the best option for this application.

1746033913369.png
 

MisterBill2

Joined Jan 23, 2018
27,161
Those are power diodes and probably not fast enough to provide input protection. Certainly the 01 005 diodes are a totalpain to hand solder. Been there, done that. Are you adding this protection clamp circuit at the processor end or the reed switch end of the cable??
 

schmitt trigger

Joined Jul 12, 2010
2,027
I have always used the BAT54S, dual series Schottky diodes, with one end connected to gnd, the other to Vdd, and the common to the protected device. The come in a compact yet simple to solder SOT23 package.
If the Schottky’s leakage upsets a high impedance node, utilize the BAV99L.

By the way, I have seen this configuration implemented in several commercial products. It works.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,722
Those are power diodes and probably not fast enough to provide input protection. Certainly the 01 005 diodes are a totalpain to hand solder. Been there, done that. Are you adding this protection clamp circuit at the processor end or the reed switch end of the cable??
They're placed at the PCB, close to the MCU

Thanks Bill and ST for your involvement. All help is greatly appreciated.
 

MisterBill2

Joined Jan 23, 2018
27,161
Every diode protection voltage clamping circuit I have used also includes a 100 ohm series resistor before the diodes. That limits the diode current. And prevents damage.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,722
Every diode protection voltage clamping circuit I have used also includes a 100 ohm series resistor before the diodes. That limits the diode current. And prevents damage.
We have to consider that the circuit works at only 3.3V through a 100k pull-up, and that it's the cable length that determines the amount of inductive current that needs to be snubbed. But yeah, using 100 ohm resistors to protect the diodes seems like a good idea.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,722
I have always used the BAT54S, dual series Schottky diodes, with one end connected to gnd, the other to Vdd, and the common to the protected device. The come in a compact yet simple to solder SOT23 package.
If the Schottky’s leakage upsets a high impedance node, utilize the BAV99L.

By the way, I have seen this configuration implemented in several commercial products. It works.
Thanks for the suggestion. I've looked them up and these seem to fit the bill: https://www.digikey.com/en/products/detail/diotec-semiconductor/BAT54S/13164121
 

MisterBill2

Joined Jan 23, 2018
27,161
We have to consider that the circuit works at only 3.3V through a 100k pull-up, and that it's the cable length that determines the amount of inductive current that needs to be snubbed. But yeah, using 100 ohm resistors to protect the diodes seems like a good idea.
I have not ever experienced or come across any damage or malfunctions from "inductive currents" in signal wiring.
I HAVE seen damage done by cross connecting with mains power. That was reported to me as inductive current damage, until I showed others that there was 120 volts AC on the wires. NOT any inductive current. AND, that s why I suggest the 100 ohm series resistor,which should be a low wattage size.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,722
I have not ever experienced or come across any damage or malfunctions from "inductive currents" in signal wiring.
I HAVE seen damage done by cross connecting with mains power. That was reported to me as inductive current damage, until I showed others that there was 120 volts AC on the wires. NOT any inductive current. AND, that s why I suggest the 100 ohm series resistor,which should be a low wattage size.
Hence my first question. Are the diodes really necessary? Or is it overkill from my part?
 

MisterBill2

Joined Jan 23, 2018
27,161
It is some folks religion that anything that could be thought to have inductance must have diodes to shunt the spike when the current suddenly is interrupted. Now the question is how much current is flowing in that switch line, and how fast is the switch operating. What will the open circuit voltage be??
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,722
It is some folks religion that anything that could be thought to have inductance must have diodes to shunt the spike when the current suddenly is interrupted. Now the question is how much current is flowing in that switch line, and how fast is the switch operating. What will the open circuit voltage be??
No more than 5Hz, and the only current flowing through the wires is the one going through the 100k pull ups, as I mentioned earlier.
 

Ian0

Joined Aug 7, 2020
13,097
On the non-working parts, what voltage do you measure in the input with the switch off? Power Schottky diodes can be leaky (although, usually only if they are close to their breakdown voltage and warm) and you only need 16.5uA leakage to cause a problem.
My suggestion: lower the values of the pull-up resistors.
I would emphasis that if you were using any other switches than reed switches unless they have gold contacts.
Your input names suggest they come from a rotary encoder? Do they need debouncing? If so the capacitor in the debounce circuit should deal with any transients.
 
Top