How to measure the frequency of any ac voltage source
Answers
Answer:
oltage:
You need to scale and translate if you want to read instantaneous voltage values.
Is this from 120V or 240V?
Is this for a personal project, or an industrial or consumer application?
I'm asking because, in a consumer application you'd need isolation between line side
and user side, in which case you'd probably want to do your voltage measurement through
a transformer. Otherwise, if isolation is not needed, a pair of 1 Meg resistors from line and
neutral can be fed to a differential opamp stage, with about 5K feedback, and 2.5 Volts
output reference. I can draw you up a schematic if you need.
Current:
Which current? How much current?
Again, if you need isolation, you'd probably want to use a current transformer.
If you don't need isolation, the technique may vary depending on what you connect
your circuit ground to.
Frequency:
You probably don't want to measure frequency using a/d converters. It is perfectly do-able, but
not terribly easy and straightforward. And it may take a bit longer to resolve frequency than
using a more direct method.
What you should investigate first is availability of something you can use as a synch signal.
It could be the secondary of the transformer used for the power supply. With a comparator and
a couple of resistors you could detect the AC of the power supply, and turn it into a square
wave, then capture the edges with tmr1's capture feature. This would give you about 14 or
15 bits of accuracy.
If accuracy is not an issue, and you're not in a hurry either, you could measure out one second
and count how many cycles occur within it.
schen
If you have significant amount of current, wrap a wire around one of the AC power lines will give you some current through induction. Feed the current to an amplifier, you have the isolated inputs to measure current and frequency.