Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Real time analysis of mains frequency

  1. Aug 7, 2017 #1
    I could use some help. I would like to measure mains frequency in real-time and pass the data through a high-level programming language (preference of Python).

    I am not sure where to start with this project, I assume commercial mains frequency analyzer exist, however, my google searches have only found highly engineered units like this:
    http://www.arbiter.com/catalog/product/model-1133a-power-sentinel.php .

    Which I'm sure is a great piece of kit, but when you have to ask for the price you probably can't afford it.

    Has anyone solved this problem before, on a tight budget?

    Thanks in advance.
  2. jcsd
  3. Aug 7, 2017 #2


    Staff: Mentor


    If you have a small computer, say Arundino or Rasberry PI, and if you are able to make your own circuits, it is easy. All you need to do is to measure the time between zero crossings.

    Or do you have a PC or Mac and are looking for a turnkey USB device?
  4. Aug 7, 2017 #3
    I have considered a DIY solution, but I don't have any experience in building hardware solutions (only software). And with limited time available I would prefer to buy a unit built by experts, which I could interface to a PC, Mac etc.
  5. Aug 7, 2017 #4

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

  6. Aug 7, 2017 #5


    Staff: Mentor

  7. Aug 7, 2017 #6
    Is this a professional / commercial installation. What accuracy is needed? Mains frequency typically varies by only small amounts so a specially built meter is needed.
  8. Aug 7, 2017 #7
    Thanks, ill send them an email.
  9. Aug 7, 2017 #8
    Yes, this would be a non-professional installation, but the requirement is for high accuracy/sampling. The end goal is the development of signal processing algorithms.
  10. Aug 7, 2017 #9
  11. Aug 7, 2017 #10


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    Before you start, you have to decide what accuracy of f measurement you need. There are many cheap counters with good crystal oscillator references in them. It could simply involve hooking one of those up with a data link to your PC.
  12. Aug 7, 2017 #11


    User Avatar
    Homework Helper
    Gold Member

    As anorlunda said, you can build some circuits and use them with a microcontroller like arduino.

    You can measure the time delay between successive zero crossings and get the frequency directly.

    Or you can use a voltage to frequency converter IC (look up LM331) and feed its output to the microcontroller.

    You can also use FFT, but I don't know much about that.
  13. Aug 7, 2017 #12


    User Avatar
    Science Advisor
    Gold Member

  14. Aug 7, 2017 #13
  15. Aug 7, 2017 #14
    Yes, I wish I had the time/skills to build a frequency monitor.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted