How to have an output voltage higher than AnalogReference

Hello everyone. This is my first approach with Arduino and I have a problem with my project.

I read an analog voltage and I want to detect the change of this value (the value is around 3V but it changes only of around 1mV every time)

Depending on the input change i calculate a relative voltage output (with the same characteristic of the input).

Now, to have a good precision in reading my input i was thinking to set the analog reference as external and reduce my input with an OPAMP. Doing so i can have a good precision in input reading and output calculation.

My problem is. How can I then come back to the high output value maintaining the same precision achieved?

I attach the code for clarity.

Apologies if the language is not specific, again this is my first time.

VoltageControl.ino (2.27 KB)

Sounds like you need a 2 op-amp approach.
First op-amp subtracts around 3V.
Second op-amp adds gain of 10 so that 0.1V signal becomes 1V and full 10 bit resolution of the ADC with internal 1.1V reference can be used.

Although as has been previously discussed on various occasions, both those functions can be performed together with a single op-amp.