> Is it possible to do it using a simple potential divider > as shown below? I'd say yes. But it has limitations. If you use a known resistance low enough to not affect PIC A2D accuracy excessivley then the input voltage should be >> 5v. eg if Rknown in 10k and Rmax tested = 50 Mohm and max A2D input = 5 volts then Vin = 50E6/10E3 x 5v = 25,000 volts (!) (Actually 25,005 :-) above ground). A voltage clamp across Rknown would be "wise" :-) At lower voltages the max voltage will be lower. Increasing Rknown reduces Vin BUT currents reduce markedly and the A2D starts getting inaccurate so a buffer would be needed. At Rknown = 1M Vin = 250 volts. Clamp still needed! Voltage is typical of "Meggers" used for insulation testing. (They use high voltage to induce breakdown of suspect connections). Power in wood = 250^2/50M = 1.25 mW. Runknown = 10M gives 25 volts (actually 30) BUT current = 25/50M = 0.5 uA A buffer is needed AND while 0.5 uA is measurable, it is not simple to measure it with stability or with simple circuitry. Some sort of compromise is going to be needed. A bridge is probably going to help heaps. RM -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu