Hi. I’m designing circuitry that will allow a DUE to conduct a number of point-to-point continuity tests in a load prior to power being applied to the load. One commonly applied method illustrated below uses a pair of stacked schottky diodes to limit voltage at the input to between -0.3V and +3.6V regardless of whether or not S1 is closed (applying +28V at R1).
Intuitively, closing S1 looks risky. Should the DUE’s regulator be expected to maintain +3.3V when S1 is closed? I’d appreciate some advice.
In the Due spec sheet the only related data I see is " DC Current per I/O Pin: 8 mA"
which would make R1 more like 3k. I imagine 4.7k would be OK to use.
For better protection use an external 3.3v regulator for the protection diode cathode, instead of the Due internal 3.3v supply.
About clamping diodes.
Be careful when you dump current onto a pin or onto the power rail of the MCU.
The regulated 3V3 supply of the Due is supply-only, and can't handle dump current in excess of what the power rail already draws.
Example: If the MCU draws 30mA, then dumping more than 30mA on the rail will increase VCC.
Leo..
Thanks very much for your helpful advice. I’m now planning to keep the lower Schottky diode (D2 in my previous diagram above) to shunt any negative transients to ground and use a 3.3V zener diode in parallel with it to limit the ADC[0] input voltage when S1 is closed. Any advice about this approach would also be welcome.
I’ve a remaining question about the stacked Schottky diode implementation in my previous diagram (which is commonly used for clamping input voltages). Unless I’m misunderstanding something (always a distinct possibility), the upper diode, D1, shunts any excess transient voltage into the regulated +3.3V output (which supports xfacto’s recommendation to use a separate regulator vs. the DUE’s). If that’s correct, it would seem to conflict with your very reasonable caution about dumping current onto the MCU’s power rail.
I’m wondering if the reason this stacked Schottky diode approach is an accepted protection technique is because transients are typically very brief events compared to closing S1?
A clamp diode to the positive rail must not carry more current than the normal current drawn by the circuit powered from that rail. Otherwise, the voltage regulator may not be able to sink the excess current, causing the supply voltage to rise.
If it's an analog input and you are sampling an analog voltage then don't put a zener in the circuit like pictured in the last diagram. The zener will alter the analog signal - it could be ok for digital signals.
Go back to the first diagram and use that. You can even put a zener or TVS to ground on the 3.3v reg/schotky Junction.
Bad idea.
A clamping diode protects at any voltage of VCC.
A zener does not protect when the Arduino is off, when VCC is 0volt.
De solution is to dimension R1 for non-destructive fault currents.
Or, in unusual cases, a shunt regulator or TVS diode with 3V3 standoff across VCC.
+1
Think in "current", not "voltage".
Current damages things, not voltage.
Leo..
I just want to recheck that value. xfacta cited 8mA. 28V/0.008A = 3500 ohms. He further recommended bumping that up to 4.7K ohms (… which I presume was to provide a safety margin).
You suggested 47K. Did you intend to concur with xfacta, and if not, how did you derive the 10x value for R1?
Thanks very much for the advice about a zener diode altering the analog signal… which would indeed be a problem during continuity tests.
With all the helpful forum advice, I’m going back to the clamping diode approach. I’ve asked jim-p to please let me know if he truly meant 47K R1 or if he concurs with your recommendation for 4.7K.
That 8mA rating is for a pin set to OUTPUT.
An input pin is not allowed to supply or sink any current.
Any voltage outside the VCC/GND rating of an MCU pin must be dealt with extenal clamping.
Then the current rating of those diodes becomes relevant, and (at) the 0.3volt rating.
Leo..
Yes that 8mA value was the only related item listed, and really the series resistor needs to limit current through the schottky diodes. Assuming BAT46 diodes, that would be 150mA giving a resistor of about 180ohms, but 4.7k series resistors could be thought of as fairly typical.
Or as Jim says: 47k and nothing else required (the inbuilt protection diodes can do the job)
… I’m gathering that Jim was saying that I could dispense with D1 and D2 if I set R1 to 47K because internal input protection diodes would be sufficient to handle the input current when S1 is closed. Is that right, and if so, how was 47K derived?
Regarding xfacta’s comments, I can’t see how using BAT46 diodes for D1 & D2 with R1 = 180 ohms would work in my diagram, so I’m assuming that a different circuit configuration is being discussed. Any chance I could get a simple drawing of what your proposing regarding a 180 ohm resistor?
No, 180 Ohm would give about 140mA fault current into the clamping diodes, or worse, into the pin. A 1N5817/18/19 could cope with that below the danger zone of 0.3volt, but VCC of the MCU would not.
Please explain what you actually want to do.
Trying to use a 180 Ohm resistor in series with an A/D pin doesn't make sense.
What exactly is that "test circuit".
Leo..
I agree that trying to use a 180 ohm resistor in series with an A/D pin doesn’t make sense… which is why I asked for clarification of xfacta’s comment about using a 180 ohm resistor with BAT46 diodes. I figured he must be referring to a circuit configuration other than the one in my diagram.
As far as what I’m trying to do is concerned, while S1 is open, R1 is part of a circuit to measure resistance between selectable points in a test article. The voltage drop developed across R1 is measured at ADC[0] and depends upon the resistance between the two selected test points. I need current to flow through R1 and through a test circuit.
If the continuity tests pass, S1 will be closed to power up the system for subsequent tests. I need to protect the ADC[0] input from damage while S1 is closed.
Hint your schematic nice as it is is reversed, in is on the left and or top and the out is on the right or down. If speed is not critical I would put a higher resistance for R1.
From the data sheet: the allowed source impedance For 12-bit accuracyis approximately:
10 k ohm max source impedance at 20 MHz ADC clock
22 k ohm at 10.67 MHz
66 k ohm at 4 MHz
135 k ohm at 2 MHz
Sorry, Microchip does not clearly publish a safe continuous clamp-diode current for that ADC pin in the SAM3X datasheet, I would not design anywhere near a few mA. A conservative design target is to keep any accidental clamp current below about 1 mA, preferably lower. That conservative current target is engineering SWAG; the 3.3 V limit and near-rail input spec come from the datasheet.
Consider placing another resistor (R2) from the Schottky diodes to the input pin. R1 will give you the test current, R2 will protect the processor.
As this appears to be a digital solution have you thought of using a buffer chip in front of the processor?