this question comes from this other, trying to implement the folloging circuit to measure a -3V battery pack (2xAA) (I've to measure in that way, cannot swap or move GND):
Digital PIN 6 will be set to OUTPUT and HIGH, thus providing +3.3V there.
I'm trying to implement that divider without burning the SAMD21 3.3V MCU and allowing to disconnect it, so I reached to the following 2 problems:
When MCU is power disconnected, power on digital pin is cut, so the negative voltage reach both analog and digital ports. Can this burn the protections?
I want to switch off the circuit by setting digital pin to INPUT (isolates by about 100Mohm internal impedance). This makes the analog pin receive the negative voltage again, so, I'm afraid to also damaging the MCU.
I tried to do some simulations,
trying to mimic the internal impedance of analog and digital port to get the voltage in the lines. When powered (digital pin output and high), voltage values are ranging from 1.2V to 2.4V what is safe. When switched off (digital pin input), both ports get the -3V negative voltage.
I placed the diode (1N4007) there as I supposed it would avoid current in opposite direction, but it seems not to do anything there (and multimeter says the same...)
Could you get me some other hint in how to implement this? Thanks!