Total harmonic distortion meter

Hello,

I'm new to programming and Arduino so exuse me if I ask something stuppid. :slight_smile:
For a school project I have to build/make/find a total harmonic distortion meter.
I found a few intresting links on the web but nothing I could use or was complete.
http://duino4projects.com/power-quality-meter-using-arduino/ (no complete software availble)
Arduino AC Grid Analyser | Elektor Magazine (hardware not avaible anymore)

Do you guys know any links where I can find a complete package of hardware and software with the Arduino Sketch code?
I also searched on this great forum put I couldn't find anything yet.

Thanks in advance!
Greets Dennis

Hello Dennis.

We do not work as buyyourschoolprojecthere.com
I am not convinced that arduino is the best platform for your project because it does not support an especially quick sample rate on the analog inputs. To measure up to the 32nd harmonic of 50Hz mains you'll need a sample rate faster than [send me a bitcoin for the answer] kHz.

Find a scrap desktop PC less than 15 years old which you are allowed to overwrite.
Download an Ubuntu Linux install and make a DVD
Install linux [ >=1 day for a newbie ]
in a terminal type

man arecord

When you have a working linux box which has a spare blue 3.5mm stereo input, write again here.

For a school project I have to build/make/find a total harmonic distortion meter.

If "find" is an option, why not "buy"?

Try to find the Arduino FFT library. I never used it, but it may be useful in your project.

Hey Guys

Thanks for your reply's.

We can buy just an of the shelf distortion meter.
But it would be cheaper and a bigger challange to build one ourselfs.

The only problem is that we have limited time and money offcourse. (and my programming skills are very limited)
So that's why I'm searching for someone here who have done it already.

Greets Dennis

dentje1013:
The only problem is that we have limited time and money offcourse. (and my programming skills are very limited)
So that's why I'm searching for someone here who have done it already.

Surely the whole point of this as a school project would be for you to learn what "Total harmonic distortion" is and for you then to design and build a meter to measure it. If all you do is put together a heathkit you will learn little if anything. You certainly would not improve your programming skills!

ad2049q:
Hello Dennis.

We do not work as buyyourschoolprojecthere.com
I am not convinced that arduino is the best platform for your project because it does not support an especially quick sample rate on the analog inputs. To measure up to the 32nd harmonic of 50Hz mains you’ll need a sample rate faster than [send me a bitcoin for the answer] kHz.

Do the maths, sampling a 1.6kHz signal is not a problem - a sample rate of 5kSPS is probably enough, and the
Arduino Uno can do about 9kSPS out of the box, faster if you reprogram the ADC registers.

This is a straight forward use of an FFT or DCT. Whether 10 bit sampling accuracy is enough depends
though.

And there are other approaches than FFT - a selective bandpass digital filter can be used to pick out the fundamental,
then subtract it out to leave the THD+noise, just compare the rms values of fundamental and THD…