Hello,

I'm making a battery tester. It is meant to measure 2V, 6V and 12V lead-acid batteries and store the values for further processing.

How can I protect my PIC's input pins against voltages above 12V whithout compromising the AD's accuracy?

The problem is, if I accidentally put my probes on the wrong measuring points, I could i.e. apply voltages up to 24V or (far) higher to the PIC.

Currently, I have two voltage-dividers (resistors) when I measure 6V & 12V batts I do select manually to keep highest possible accuracy. Would be nice to make an "automatic" voltage-divider...