Let's take the ATmega328P for example.
It has a minimum input voltage of -0.5
and maximum input voltage of Vcc + 0.5
.
But what if I say Vcc = -5 V
and GND = 0 V
?
Will it break then, because the minimum voltage is lower than -0.5V
?
How can I protect the inputs from negative voltages?
This is a way to protect a MCU pin e.g ADC input from high voltage, but it does not protect if I set GND to -10 V
. The linear voltage regulator has a diode as protection, but I don't know if that helps.
Update:
Let's say that we have three cases:
Case 1: If A = Positive
, B = 0V
and C = High
, then the zener diode will protect. - OK!
Case 2: If A = 0V
, B = Positive
and C = 0V
, then current is going to flow from B -> C
and leaving a voltage drop at A0
depending on how large R1
is. This can hurt my analog input A0
- How can I protect it in that case?
Case 3: If B = Negative
and A = Positive
, this will hurt my MCU directly. How can I protect it in this case?