Hello,
I have a negative range of input voltage and I want to shift that input voltage to feed an ADC pin of an ESP32 microcontroller.
Initiallty, the input voltage range is -3V to 0V, so I tried using a simple voltage shifter that shifts the input voltage from -3V to 0V into 0V to 3V with the non-inverting op-amp configuration and it works.
However, later I found out that the input range may varies from time to time and is not fixed. Sometimes the input voltage is -5V to -2V, sometimes it is -2V to 0V. And since my input voltage does not have a fixed range, I need to change the resistor value multiple times. If I make my input voltage range bigger, than the output voltage would be smaller.
If possible I would want to shift the input voltage as it is for example:
-3V to 0V ---> 0V to 3V
-5V to -3V ---> 0V to 3V
Not:
-5V to 0V ---> 0V to 3V
Is there any IC or reference circuit to convert that input voltage to a fixed range positive voltage of 0-3V?