For my next project, I want to measure voltages up to ~60V with a 12bit ADC, but to get reasonable resolution also for lower voltage values, I'd like to implement some kind of switchable voltage divider.
The µC I'm gonna use has built in voltage comparators with hysteresis and all, so the main challenge is to actually find a proper way to switch the divider.
The following two ways seem to be most promising:
1) Use separate ADC-channels in parallel, each with a specific voltage divider and switch on/off the patch from the divider to the ADC input.
2) Use multiple resistors in parallel in the lower side of the voltage divider and use switches to ground to activate one or more resistors.
Now for the 2nd approach I did some simulations with N-FET transistors (IRLML2502PBF) as lowside switches, but this doesn't seem feasible, as the leakage current of a few microampere influences the voltage divider too much for high resistance values.
And obviously I want to use resistors in the MOhm range to not influence the measurement too much.
I would suppose I could use analog switches, but I figure their resistance is temperature dependent.
The only other alternative that comes to mind would be (reed) relais, but they are rather expensive and slow. More or less the same is true for miniature solid state relays.
For the 1st approach, a P-FET could be used per range/channel. Problem is that at least for the low voltage ranges, even behind the voltage divider, the typical VDS of -20V for most small P-FETs is exceeded. There are -60V types, yet with higher RDSon. E.g. BSS83P: -60V, 2Ohm. With a divider in the MOhm range, I guess the 2Ohm should be ok.
Drawback is the use of multiple ADC inputs, but this is most probably not a problem.
[EDIT]
After some thinking about it, I found the p-FET approach isn't working out either. For low input voltages, VGS is too low to switch through, for high voltages it gets too high even for the 60V types...
This should be a common problem, but I didn't find really much information on standard solutions. I found only references to reed relays or analog switches, but without really talking about the drawbacks or naming an certain part. So any hint?