[Trent M. Wyatt]’s CPUVolt library provides a fast way to measure voltage using no external components, and no I/O pin. It only applies to certain microcontrollers, but he provides example Arduino ...
Measuring extremely high dc voltages of 10 kV or more usually requires a suitably equipped high-voltage ohmmeter or a digital multimeter and high-voltage divider, along with the proper safety ...