0
\$\begingroup\$

I want to protect the input of my 5V micro-controller from two types of disasters, I am detecting a low on the input (0V):

The input is from a switch. When the switch is on it provides a ground.

  1. Over-voltage protection on the input (the input can range between 5V to 24V DC). Hence the over-voltage protection must be clamped to 24V DC MAX.

  2. The minimum voltage must be greater than -0.3V. The device states that the input voltage must not be less than -0.3V. The device is not a common device, hence part numbers or datasheets are not available. I just have the specs for the device

Hence I have the below schematic.

D1 is a Zener diode that a Zener voltage of 5.1V and D2 is a Schottky diode with a forward voltage drop of 0.2V, which means any negative voltage is clipped at -0.2V.

I have not specced any components because there is no stock currently for the diodes

I want to know which placement of components is better, placement 1 or placement 2?

Placement 1

schematic

simulate this circuit – Schematic created using CircuitLab

Placement 2

schematic

simulate this circuit

\$\endgroup\$
8
  • 1
  • \$\begingroup\$ Question lacks detail. Explain why -0.3 V. Over-voltage range is 5 V to...what? No component part numbers. Site already has existing answer, as @jsotola explained. Input protection circuits are well defined and information is readily available on the internet. VTC for those reasons. \$\endgroup\$
    – TonyM
    Nov 29, 2021 at 18:11
  • 1
    \$\begingroup\$ You should specify your input requirements better. For example, if D2 is intended as a protection from reverse connection, then calculations for -0.3V MCU limit are pointless. 24V connected in reverse would result in 58 Watts from R3-D2... for as long as they last \$\endgroup\$
    – Maple
    Nov 29, 2021 at 21:30
  • 2
    \$\begingroup\$ I am not asking about schematics. I am suggesting to specify requirements better for yourself. In my example, I questioned the statement "any negative voltage is clipped at -0.2V". Any? what about -24V? and for how long? "over-voltage protection must be clamped to 24V DC MAX" what does it even mean? You clamp it to 5.1V, not 24. "The input is from a switch" - how is that switch connected if you expect input "from 5 to 24V" or a ground? If you expect it to switch between voltage and ground, why do you need pull-up? if you define your requirements better you may see the answers yourself \$\endgroup\$
    – Maple
    Nov 30, 2021 at 9:46
  • 1
    \$\begingroup\$ So, why then you connect switch to 5V? Isn't ground enough? High voltage SPST with pull-down or ground SPST with pull-up make more sense to me. And where 24V comes from? You want to protect "my micro controller" but then mention "the device". What device? Don't see it on the schematics. If "the input can range between 5V to 24V DC" where negative voltage comes from? If you trying to protect from ESD then why 24V, why not 24kV? \$\endgroup\$
    – Maple
    Nov 30, 2021 at 16:46

1 Answer 1

-1
\$\begingroup\$

A zener diode conducts the same way as any other diode in forward direction, don't understand why you need two of them. Try to simulate. Another fact is that -0.3V as you describe would be a using a lab PSU and attach it to the GPIO, it means -0.3V is really -0.3V. But the MCU GPIO has two absolute value parameters, the max/min voltage and the max sink/source current. It means that even if the voltage is lower than -0.3V by using a limiting resistor you can limit the max. current.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
5
  • 1
    \$\begingroup\$ See the comment above to understand why. A tvs diode will not work for prolonged exposure to a high voltage greater than 5V source. So perhaps having a zener and tvs in parallel is better. One to catch the short pulse and one to catch the prolonged voltage \$\endgroup\$
    – JoeyB
    Nov 28, 2021 at 20:52
  • 1
    \$\begingroup\$ Ideally you want a RC filter up front. This goes someway to mitigating the effects of ESD as well as EMI. The TVS diode just mops up the rest. The resistor also limits the maximum current through the TVS. @Joey - rarely would you parallel a TVS and a zener diode. Both are thermally limited. \$\endgroup\$
    – Kartman
    Nov 28, 2021 at 21:03
  • \$\begingroup\$ @Kartman how would I know what frequncy to use in my calculations? The input is only being used to detect when it goes low, so not high-speed stuff \$\endgroup\$
    – JoeyB
    Nov 28, 2021 at 21:31
  • \$\begingroup\$ I dont understand why putting -0.3V into the GPIO pins is a relevant test???. The miniumum voltage is -0.3V so on spec. The diode D2 is to clamp any negative values greater than -0.3V to -0.2V using the schottky diode... \$\endgroup\$
    – JoeyB
    Nov 28, 2021 at 21:44
  • 1
    \$\begingroup\$ @joeyb. What frequency for the filter? How fast do you expect the input to change? Or how fast can the switch be activated? The RC filter has to be above this frequency and might be a few kHz. Its not super critical. Further debounce and filtering are done in your code. Eg for a limit switch on a motorised turntable - if the limit switch is active for 100ms, that is a valid activation. Anything less is a transient. Clearly if you got a 1ms pulse, that might be far faster than the switch could physically operate, so that would be rejected. Always filter and validate your inputs. \$\endgroup\$
    – Kartman
    Nov 29, 2021 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.