This circuit can be used as a polarity indicator shield the direction of current circulation for the input of a microcontroller. The resistor R should be calculated as a function of the current intensity to be sensed. The circuit is in found in documentation from the 1980´s.