Harmonic Distortion Meter using PIC18F2550

The 3rd harmonic distortion meter has been designed for measuring the quality of AC supply. The meter is built with a PIC18F2550 project board and the full wave rectifier front-end circuit. The AC power line, 220VAC is measured through the step down isolation transformer. The input signal to the 10-bit ADC is full wave rectified. The software performs DFT calculation finding the amplitude of the fundamental frequency and the 3rd harmonic. The distortion is computed by the ratio of the amplitude of the 3rd harmonic to the fundamental frequency. The meter has been tested with the square wave signal resulting 33% distortion. For low voltage AC utility, 220V, the reading showed approx. 3%. The meter can be applied for high voltage application with the appropriate signal conditioning.

Harmonic Distortion Meter


Nowadays an increasing of the electronic devices having nonlinear characteristics are many used at home and office. Such devices mostly are computer based equipment with a low power factor switch mode power supply. The input circuit of the power supply uses a diode-capacitor at the front-end circuit. The current drawn is charging capacitor only near the peak voltage. Thus for a given feeder having finite impedance, there will be a lost from voltage dropped near the peak voltage resulting flattened top distortion of the AC voltage. To measure how high the distortion of AC voltage is, we may decompose it into the summation of sinusoid waves using DFT. The PIC harmonic distortion meter shows a method for finding the amplitude of the fundamental frequency and the 3rd harmonic. The reading shows percentage of the 3rd harmonic distortion.

Total Harmonic Distortion, THD

To measure the waveshape distortion, we use the quantity of the Total Harmonic Distortion, THD (equation 1). THD is the ratio of the power of harmonic components to the power of fundamental frequency. Our concern is the voltage distortion, we can just find the sum of the rms of the harmonic components, Vn and the rms of the fundamental frequency, V1.


For more detail: Harmonic Distortion Meter using PIC18F2550

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.