Calibrating ZMPT101B Voltage sensor issues

AMPLAB1:
How are these resistor values calculated?

Did it the quick way, so might not be that accurate (not that it matters a lot).

I assumed VCC is 5.0volt (which it rarely is).
I assumed pin protection can handle ~1mA in case of overload (not documented).

  1. If I want to measure ~70volt AC (100volt peak, 200volt peak/peak),
    then I pick 100k between amp and analogue pin (the 1mA limit).

  2. Then calculate the resistor to ground, assuming I want 5volt max on the analogue pin. 5k is about right.
    That gives me 5% headroom (105volt peak+).
    The resistor from pin to VCC is irrelevant, because there is 5volt on both sides (no current flowing through it).

  3. I calculate combined resistances (R pin<>amp and R pin<>ground),
    so I have 2.5volt in the pin when the amp is idle (0volt, ground) if I use that calculated value from pin to VCC.
    (100k * 5k) / (100k + 5k) = 4k76. 4k7 (E12 value) is close enought.
    Leo..