I'm trying to build an interface that can take the readings from level sensors and provide a small enough voltage that a 3.3V microcontroller can read.
I've done this successfully using the following circuit, which will give me a reading in a fixed range of voltage inputs. The circuit is simply a
voltage divider -> rail-to-rail buffer -> RC filter.
BUT, I want to be able to interface with sensors with different voltage-output-ranges, without sacrificing resolution on my ADC. That is, I want different sensors to be compatible such that interfacing a different sensor only requires you to specify what the sensor's output range is in the microcontroller's software.
For example, some of the sensors I'm looking at have output ranges of:
My immediate thoughts were to replace one of the resistors in the voltage-divider network with a digi-pot, but high accuracy (low resistive tolerance) digi-pots are expensive. Are there any cheap ways to achieve this? (I'm not too concerned about circuit complexity, just cost.)