Schottky diode circuit mystery ...

ebeowulf17

Joined Aug 12, 2014
3,307
Seeing this configuration in the chip maker's application notes
provides that warm and fuzzy feeling that it's an acceptable design practice.
I thought it was interesting that they had to point out that one pin has different protection schemes than the others... so it's important to check the datasheet for the device you're interfacing with to make sure this method will work.

From what I've seen and read so far, I get the impression that the two-internal-diodes protection scheme is by far the most common, but there are exceptions, so it's worth double checking.
 

AlbertHall

Joined Jun 4, 2014
12,629
Surprisingly, Microchip shows this crazy zero-crossing circuit with no external clamping diodes.

As long as the peak current is low, all is ok.

You can eliminate the diodes.
I tried this tecnique on a PIC interfacing to RS232 voltage levels. The internal oscillator became unstable.
I don't understand the link between current through the protection diodes and the oscillator. Also I don't remeber which PIC it was.
 

OBW0549

Joined Mar 2, 2015
3,565
I tried this tecnique on a PIC interfacing to RS232 voltage levels. The internal oscillator became unstable.
I don't understand the link between current through the protection diodes and the oscillator. Also I don't remeber which PIC it was.
I've found that relying on the PIC's internal protection diodes to limit pin voltage can also cause ADC misbehavior, even with small input currents (a few dozen microamps). At least it did on one of my designs using a PIC18F1320.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,783
I've found that relying on the PIC's internal protection diodes to limit pin voltage can also cause ADC misbehavior, even with small input currents (a few dozen microamps). At least it did on one of my designs using a PIC18F1320.
Fortunately, there's no ADC process in the project that I'm currently working on. Although I'll keep this observation in mind if I eventually need to incorporate it in the future.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,783
I've just re-read the I/O pin configuration section of the PIC10L322 manual, and it shows the following diagram:

upload_2019-7-12_5-58-16.png

It is clear that the pin is being internally protected by the couple of diodes shown at its input. The manual does not mention what type of diodes are being used, but I'm assuming that they're of the Schottky type (although that's not what their symbols show) because they have the lowest Vf there is.

Anyway, I have already added a couple of external Schottky diodes at the pin's input for protection purposes. Now I'm going to test the circuit thoroughly for a couple of days in a row, first with the external diodes, and then without them... see what happens. Since the pulses are being delivered through a 470K resistor, the worst case scenario that I can think of (which is ±24V) is that a little over 50 µA will flow through the internal diodes. Which I think is well within safety limits. If that works acceptably, I'll then test the circuit using higher value resistors to see if I can lower that current even more. Although instinct (which I don't truly trust) tells me that after a couple of megs the signal won't be reliably detected. This because the lowest voltage that I'd like to detect is about ±2V, and that would leave the circuit with only 1 µA to work with. Probably not enough for it to overturn the pin's internal weak pull-up resisor.

I just hope that my little MCU does not get fried ... I'm using the SMT version and it would be a PITA to replace it.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,783
The weak pull-ups can be individually disbled, and for your use having that pull-up disabled would be the choice - whatever the value of the resistor.
That is a possibility, except that the signal going into the pin is sometimes left floating because it comes from a small generator. That's why I've modeled the source having an internal 270 ohm impedance. And I'm thinking that disabling the internal pull-up might give false readings in such situation ...

That's one of the many tests that I'm planning to perform.
 

OBW0549

Joined Mar 2, 2015
3,565
Since the pulses are being delivered through a 470K resistor, the worst case scenario that I can think of (which is ±24V) is that a little over 50 µA will flow through the internal diodes. Which I think is well within safety limits. If that works acceptably, I'll then test the circuit using higher value resistors to see if I can lower that current even more.
I wouldn't do that; even at 470k, you could encounter severe problems with noise pickup.

I just hope that my little MCU does not get fried ... I'm using the SMT version and it would be a PITA to replace it.
With such high values of input resistor, I wouldn't give it a moment's thought. Worry not.
 
Top