Real time analysis of mains frequency

Click For Summary

Discussion Overview

The discussion revolves around measuring mains frequency in real-time using a programming language, particularly Python. Participants explore various methods, including DIY solutions, commercial products, and the necessary accuracy for their applications.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant seeks affordable solutions for real-time mains frequency measurement, expressing concern over the high cost of commercial analyzers.
  • Another suggests using small computers like Arduino or Raspberry Pi to measure zero crossings, indicating that this could be an easy DIY project.
  • A participant mentions their lack of hardware experience and preference for purchasing a ready-made unit that can interface with a PC or Mac.
  • Several participants recommend contacting a specific organization for insights on their real-time frequency displays.
  • One participant proposes using a modern multimeter with USB and Bluetooth capabilities as a potential solution, although they have not personally used such devices.
  • There is a discussion about the required accuracy for the measurement, with one participant noting that mains frequency varies slightly and may necessitate specialized equipment.
  • Another participant emphasizes the need for high accuracy and sampling for a non-professional installation, mentioning the development of signal processing algorithms as the end goal.
  • Some participants suggest using a voltage to frequency converter IC or measuring time delays between zero crossings as methods to obtain frequency readings.
  • There are inquiries about the functionality of specific devices, with one participant expressing concern about output capabilities.

Areas of Agreement / Disagreement

Participants express a mix of opinions, with some advocating for DIY solutions while others prefer commercial products. The discussion remains unresolved regarding the best approach to achieve accurate real-time frequency measurement.

Contextual Notes

Participants mention various methods and devices without reaching a consensus on the most effective solution. There are also considerations regarding the accuracy required for the measurements, which may influence the choice of equipment.

Who May Find This Useful

This discussion may be useful for individuals interested in electronics, signal processing, or those looking to measure mains frequency for various applications.

Michael Campbell
All,
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.
 
Engineering news on Phys.org
:welcome:

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?
 
Thanks.
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.
 
In that case, a modern multimeter might be best. A quick search on Amazon found this one which claims USB and bluetooth connections to your phone or computer, and it has a Hertz scale. I've never used such a device, but you could research it.https://www.amazon.com/dp/B00SGKR9FA/?tag=pfamazon01-20
 
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.
 
jim hardy said:
Why not contact these folks and see how they do it ?
Their real time displays of frequency and phase are fascinating.

http://fnetpublic.utk.edu/anglecontour.html

Tennesseans are naturally friendly .
Thanks, ill send them an email.
 
Windadct said:
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.

NEW
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.
 
anorlunda said:
In that case, a modern multimeter might be best. A quick search on Amazon found this one which claims USB and bluetooth connections to your phone or computer, and it has a Hertz scale. I've never used such a device, but you could research it.https://www.amazon.com/dp/B00SGKR9FA/?tag=pfamazon01-20
That could be a quick win. I'll certainly investigate the multimeters.
 
  • #10
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.
 
  • #11
Michael Campbell said:
NEW
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.
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.
 
  • #12
Would something like this work?
freqmeter.jpg
 
  • #14
cnh1995 said:
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.
Yes, I wish I had the time/skills to build a frequency monitor.
 

Similar threads

Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
11K
Replies
7
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K