Rules | Recent posts | topic RSS | Search | Register  | Log in

measure mains frequency

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Author Message
jaspal



Joined: 23 Jan 2005
Posts: 1


Post23 Jan 2005 20:43   measure mains frequency

what is the best method for measuring the mains frequency from a household mains power supply as accurately as possible and then to report this on a pc?
Back to top
flatulent



Joined: 19 Jul 2002
Posts: 4877
Helped: 294
Location: Middle Earth


Post23 Jan 2005 20:46   Re: measure mains frequency

First, safety requires that you use a transformer that reduces the mains to a few volt level. Then you need a frequency or period counter.
Back to top
prinsloo



Joined: 19 Sep 2004
Posts: 94
Helped: 1
Location: Bethlehem RSA


Post23 Jan 2005 23:07   Re: measure mains frequency

ossiloscope2.51,down load from web. (for your comp). and a sound card + a ac transformer with an output of less than 2 volt. this program allows you to store waves etc. on comp
Back to top
FoxyRick



Joined: 09 Jan 2004
Posts: 597
Helped: 35


Post23 Jan 2005 23:29   Re: measure mains frequency

If you do PIC's (or other MCU's) that's the easiest, probably cheapest, and accurate enough (0.1% enough? that's easy to get) method.

Just use the timer function to count a single period (detect the zero-crossing with a comparator to start/stop the timer).

Then send this via an RS232 level convertor to the PC.

Signal source from a transformer of course (essential for isolation, not just lowering the volts), maybe plus resistive divider to get the volts down for your comparator.

FoxyRick.
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4205
Helped: 565


Post24 Jan 2005 1:16   measure mains frequency

Depending on what jaspal means by "as accurately as possible", oscilloscopes and MCUs could be poor choices because they usually have much lower long-term accuracy than an AC mains that (in many countries) is disciplined to an atomic standard.
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6359
Helped: 1509
Location: West Coast


Post24 Jan 2005 1:22   Re: measure mains frequency

Instead of using transformer you can employ optocoupler; its output can be of TTL level with a pull-up resistor connected to +5V.
This can be connected to one of data lines of the PC's parallel port.
You will need short program, written in any language you know, which will calculate frequency with accuracy set by PC internal clock..
Back to top
FoxyRick



Joined: 09 Jan 2004
Posts: 597
Helped: 35


Post24 Jan 2005 18:51   Re: measure mains frequency

echo47 wrote:
Depending on what jaspal means by "as accurately as possible", oscilloscopes and MCUs could be poor choices because they usually have much lower long-term accuracy than an AC mains that (in many countries) is disciplined to an atomic standard.


Agreed. However, its instantaneous frequency can vary quite a bit, before being 'corrected' by running a bit off in the opposite direction for a while.

For a really accurate instantaneous measure, use a fast counter and a TCXO or OCXO and count more periods before calculating.

I have a feeling this may be over the top for the (guessed) intended application.

Jaspal, what accuracy/precision did you have in mind? Is this a nice addition to a computer mod'ers displays, or a serious test instrument?

IanP's idea of an optocoupler is a nice one (why didn't I thnk of that?). If doing it that way, assuming it conducts on only on half-cycle, count the period between two successive on's (or successive off's) rather then just on-to-off. That will more-or-less eliminate the voltage drop required for it to light up and any hysteresys.

FoxyRick.
Back to top
Element_115



Joined: 23 Mar 2002
Posts: 318
Helped: 22


Post24 Jan 2005 20:16   Re: measure mains frequency

You can buy a Multimeter and manually enter the data. But if you really want
good data you should get an Oscope, GPIB card, and Labview (or MatLab).
This way you can run a program that will get as much data as you want.
But it's alot of investment.

Cheers
Back to top
aNdreiBuuu



Joined: 30 Apr 2001
Posts: 400
Helped: 11


Post24 Jan 2005 23:31   Re: measure mains frequency

do a google search on AVR frequency meter...

http://users.cableaz.com/~cappels/dproj/AVRfpls/fmpg.htm

for mains isolation use an optocoupler (0 detector circuit...)

hope this help,
//a
Back to top
anggoro_yn



Joined: 08 Dec 2003
Posts: 28
Helped: 2
Location: Indonesia


Post25 Jan 2005 7:47   Re: measure mains frequency

I agree with element_115.

Get some multimeter, especially one with print-out capabilities. Then check the frequency of your outlet, print it out and send the result to the power company. Complain to the them when the frequency is out of spec or give the compliment when the frequency is as they promised Smile

This is simpler, especially when our main purpose is to make complain to the power company. If we build a D-I-Y devices ..... they will say: "it's your divices problem .... not ours" (at least this is what will happen in my place Sad

aaNg
Back to top
Borber



Joined: 01 Jan 1970
Posts: 1506
Helped: 116


Post25 Jan 2005 8:47   Re: measure mains frequency

Any counter with standard gate time 1s or 10s has low resolution so the high precision frequency measurement can not be acheived. Better results can be acheived by measuring period duration with high frequency clock. Period duration must be then converted to frequency.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap