​ ​ ​ ​ Accurate powerline frequency meter.
Page 1 of 7 1 2 3 ... LastLast
Results 1 to 10 of 63

Thread: Accurate powerline frequency meter.

  1. #1
    Senior Member
    Join Date
    Jun 2008
    Location
    *.*
    Posts
    1,099

    Default Accurate powerline frequency meter.

    My problem: measure powerline frequency accurate to 2 decimals. If the frequency is 59.99 Hz, I want to know that much, and not round it off to 60 Hz.

    What I know: I will require an accurate and stable master timebase. No worries, mate. I have a +/- 1 ppm TCXO

    Straightforward but not very practical solution: Measure for 100 secs to obtain the required resolution.

    Alternate solution: Count the number of master clock cycles from a powerline leading edge to the next leading edge. For instance, if the master clock is 1 Mhz, there will be 16,666 cycles at 60.00 Hz, and only 16,669 at 59.99 Hz.
    I know the Picaxe is too slow to count 1 Mhz. What I was planning to do, is to employ an external 16 bit counter 74LV8154, which will be gated, read and reset by a Picaxe 20X2 or 18 M2.

    So, if you have the hardware figured out, what is the question?: How do I actually perform the cycle count to Hertz conversion. I was originally thinking of using a lookup table, but the number of entries is humongous!! Between 59 and 61 Hz there are 200 entries.
    "Will design analog circuitry for Beer."

  2. #2
    Senior Member
    Join Date
    Feb 2010
    Location
    Don't Mess With My Texas!
    Posts
    2,153

    Default

    Tell me that you do know that the power line frequency is produced by a mechanical generator, and that the frequency is adjusted by the source to maintain an average frequency of 60 Hz. over some time period so that mechanical clocks will maintain the correct time.

    PS. Not trying to be a smarta**. Just establishing baseline knowledge because you didn't state your purpose for this accurate frequency reading.
    - Tex
    __________________________________________________ _______________________
    "Truth lies dormant in our future history." ― Tex Clodhopper LXV
    “Confidence is ignorance. If you're feeling cocky, it's because there's something you don't know.” ― Eoin Colfer, Artemis Fowl

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    London
    Posts
    2,593

    Default

    Hi,

    My main concern would be the purity of (or lack of noise on) a single cycle of the powerline frequency. I think you probably need either to measure over more cycles and/or phase lock another oscillator to the powerline and measure a cycle of that.

    Quote Originally Posted by fernando_g View Post
    I know the Picaxe is too slow to count 1 Mhz.
    Not necessarily. Even a humble 08M2 has A "Timer 1 Gate" input and that has a default clock frequency of 1 MHz (so actually could be 8 times higher). The gate can even be driven by the on-chip comparator (not directly supported by the M2 OS) to level-detect the sine wave. But you probably would need to use an X2 for its external crystal resonator capability.

    Quote Originally Posted by fernando_g View Post
    How do I actually perform the cycle count to Hertz conversion.
    Divide (6000 * 16667) by the value from your counter, which is a simple 32 bit by 16 bit division.

    The high word w2 = 6000 ** 16667 and the low word w1 = 6000 * 16667 , but these constants could be pre-calculated if desired.

    Put the divisor into w3 and use this code snippett. Scroll down to #10 for the slightly improved version, or follow the link to a more complicated true 32 bit version. But even the simple 31 bit version would allow you to calculate (but not necessarily measure accurately) to 3 decimal places.

    Cheers, Alan.

  4. #4
    Senior Member
    Join Date
    Jun 2008
    Location
    *.*
    Posts
    1,099

    Default

    Quote Originally Posted by Texasclodhopper View Post
    Tell me that you do know that the power line frequency is produced by a mechanical generator, and that the frequency is adjusted by the source to maintain an average frequency of 60 Hz. over some time period so that mechanical clocks will maintain the correct time.

    PS. Not trying to be a smarta**. Just establishing baseline knowledge because you didn't state your purpose for this accurate frequency reading.
    Yes, I do know about the average over a long period of time is or should be exactly 60 Hz, although there may be "spot" frequency changes.

    The project is as follows:
    I've been asked to perform a mains frequency audit on a large synthetic fiber factory.
    I am NO EXPERT on synthetic fibers, but the following is what has been explained to me. Sorry if there are holes in the explanation.

    Apparently in the process of extruding the fiber and thinning it to proper thickness there are hundreds of pulleys which progressively apply tension to it. These pulleys are driven by synchronous motors.

    Long story short: There has been an increase in defects which has been attributed to improper motor speed, and thus powerline frequency.
    The machine's manufacturer's proposed solution is a very expensive VFD drive. The company director wants to make sure that frequency variations are indeed the cause, before plunking down many dozens of kilo-dollars.

    I've already done a frequency logger, and I do see frequency variations for instance, when peak loads occur in the early evening.
    But I require better and faster resolution.
    Last edited by fernando_g; 26-12-2016 at 22:04.
    "Will design analog circuitry for Beer."

  5. #5
    Senior Member
    Join Date
    Jun 2008
    Location
    *.*
    Posts
    1,099

    Default

    Alan;
    indeed the purity of zero crossings is paramount. So yes I had planned to do a 16 cycle period average, plus some old-fashioned analog filtering.
    Analog filtering is not usually recommended for power line meters as introduces a phase shift which could mess up -for instance- power factor measurements.
    But in this instance it is not relevant.

    Your code snippet looks tantalizing. I don't claim to fully understand it, but like everything else in this life, one has to take a plunge into the water and learn to swim....
    "Will design analog circuitry for Beer."

  6. #6
    Senior Member
    Join Date
    Jul 2011
    Location
    Los Angeles, CA
    Posts
    1,917

    Default

    For $12, this RTF power module is worth checking out. Displays much info, including frequency to 2 dp. Verify accuracy in a lab then deploy onsite.

    http://www.ebay.com/itm/AC-100A-LCD-...v/331942228775

  7. #7
    Senior Member
    Join Date
    Jun 2008
    Location
    *.*
    Posts
    1,099

    Default

    Wow!
    This is another example of "why build when you can buy" thread.

    http://www.picaxeforum.co.uk/showthr...en-you-can-buy

    The shortcoming is, it apparently has no data logger with RTC capabilities.
    Unfortunately..........This is a feature that is required.
    "Will design analog circuitry for Beer."

  8. #8
    Senior Member
    Join Date
    Feb 2011
    Location
    Cardiff,UK
    Posts
    4,196

    Default

    Quote Originally Posted by fernando_g View Post
    I've been asked to perform a mains frequency audit on a large synthetic fiber factory.
    And there are no pieces of 'professional' equipment that you can hire (and pass on the cost) that will do exactly this ?

    Just because it may be possible to do what you want using a DIY method, how would you intend to do it in such a way that the 'audit' is accurate and can be back referanced to known and calibrated standards ?
    Picaxe in Space is now Silent (but probably still running)
    http://www.50dollarsat.info/

  9. #9
    Senior Member
    Join Date
    Oct 2012
    Location
    USA
    Posts
    442

    Default

    What he said. There are professional instruments for exactly this purpose, rent one.

  10. #10
    Senior Member
    Join Date
    Jun 2008
    Location
    *.*
    Posts
    1,099

    Default

    Quote Originally Posted by srnet View Post
    And there are no pieces of 'professional' equipment that you can hire (and pass on the cost) that will do exactly this ?
    Of course there are. Dranetz, Hioki, Fluke...I've used them over since the late 70s. I used a Dranetz for the original audit.

    Alongside the Dranetz, I installed my piece of equipment. For the single purpose that I made it, it correlated with the Dranetz.
    I'm no attempting to measure voltage, current, impulse voltage, lead/lag power factor, display individual harmonics plus THD, active power, reactive power, apparent power, crest factor, demand factor, active or reactive energy, phase unbalance or neutral current.
    Nor I'm required to meet a CAT IV safety rating. I'm connecting my device on a 120V office wall plug.

    So I'm planning to do a simple, single purpose piece of equipment, and -why not- make a little money in the process. Not very much, just a little.
    "Will design analog circuitry for Beer."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •