Two-way voltage limiting circuit to protect microcontroller
Maybe something like this:



simulate this circuit &ndash; Schematic created using CircuitLab
This typically clamps at about -300mV/5.1V and does not depend on the 5V supply sinking current.