High voltage (500V) measurement by scaling down voltage
This is what a DC measurement would look like:

And here is the AC measurement. In both cases, 2.5V can be made from 500V with a 5V secondary power supply. The primary power supply is 12V.