Summary of PIC Harmonic Distortion Meter
The article describes a PIC18F2550-based 3rd harmonic distortion meter that measures AC supply quality. A step-down isolation transformer and full-wave rectifier feed a 10-bit ADC. Firmware computes DFT to extract amplitudes of the fundamental and 3rd harmonic; distortion is reported as the 3rd harmonic amplitude divided by the fundamental. Tested with a square wave (33% reading) and low-voltage AC (≈3% at 220V). The design can be adapted for high-voltage use with suitable signal conditioning.
Parts used in the 3rd harmonic distortion meter:
- PIC18F2550 project board
- Step-down isolation transformer (for 220VAC)
- Full-wave rectifier front-end circuit
- 10-bit ADC (on PIC18F2550)
- Signal conditioning components (resistors, capacitors as needed)
- Power supply components for the PIC board
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.
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.
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.

We may decompose the periodic waveform, f(t) into the summation of a number of sinusoids waveform easily using the Discrete Fourier Transform (equation 3). A0 is the amplitude of DC components. For AC voltage waveform, A0 is zero.
For more detail: PIC Harmonic Distortion Meter
- How does the meter measure AC voltage?
It uses a step-down isolation transformer and a full-wave rectifier to feed the PIC18F2550 ADC. - Can the meter detect harmonic amplitudes?
Yes, the software performs a DFT to find amplitudes of the fundamental and the 3rd harmonic. - What distortion metric does the meter report?
It reports the 3rd harmonic distortion as the ratio of the 3rd harmonic amplitude to the fundamental amplitude. - Does the meter work on 220V utility voltage?
Yes, it was tested on 220V and showed approximately 3% reading. - How accurate is the meter with non-sinusoidal inputs?
It measured a square wave and reported 33% distortion as stated in the article. - Can the design be used for high voltage applications?
Yes, the meter can be applied to high voltage with appropriate signal conditioning. - What algorithm is used to decompose the waveform?
The firmware uses the Discrete Fourier Transform to decompose the waveform into sinusoidal components. - Why focus on the 3rd harmonic?
Because the 3rd harmonic is often the second highest energy component after the fundamental and causes most harmonic problems.
