How to Perform Two Points Scaling in Electronics: 0.6V – 3.2V to 0.0V – 3.3V

measurementoperational-amplifierscalingvoltage measurement

I'm seeking a solution how to do a two point scaling in electronics. I have tried an Op-amp, but it did not work very well. So I wonder if you have some ideas how to do two point scaling from e.g 0.6 V – 3.2 V to 0.0 V – 3.3 V?

When I apply 4 mA, I what the output to be 0.0 V or very close to 0.0 V.
When I apply 20 mA, I want the output to be 3.3 V or very close to 3.3 V.

The Zener below is a 3.6 V Zener.

Is that possible?

enter image description here

Best Answer

I'm using a STM32 but the ADC reference is 3.3V and when I apply 4mA, then I'm using a lot of the ADC. I don't what to do that. Or is it possible to change the ADC reference for the minimum voltage too?

You're only losing 20% of the range and you have the advantage of a "live zero" which can be used to detect a break in the 4 - 20 mA loop. This is the standard solution taken by industrial PLCs and many of those do that on a 0 - 10 V input by addition of a 250 Ω shunt resistor to give only 5 V at 20 mA. Usually its simplicity wins out over the loss of resolution.

A further advantage in the industrial sensor applications is that sensor faults can be indicated by sending a 3 mA signal, for example.


From the comments:

But isn't 20% a little bit to much? I could detect current loop breaks with 5% waste.

That's for you to decide. You're using a 12-bit / 4096 step ADC. That's a step resolution of 0.02% of full-scale per step. Losing 20% gives you 0.03% of full-scale per step. You're going to have difficulty getting better than 0.1% shunt resistors - see Vishay for example and noise will introduce further problems. Introducing an op-amp to do the offset properly only makes it more difficult.

enter image description here

Figure 1. It appears that the top and bottom of the STM32 ADC are accessible.

The other option is to offset the ADC VREF- to 20% of VREF+. See page 68 of the datasheet.

Added by OP:

enter image description here