Digital power factor meter design based on voltage-to-frequency conversion