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?
Best Answer
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:
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.
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: