ELM - AC Load Analyzer

8
18/08/2015 ELM AC Load Analyzer http://elmchan.org/works/heco/report_e.html 1/8 AC Load Analyzer November 3, 2014 We are using a number of electric equipments. I sometimes think need to measure the power consumption of the instruments and home electric equipments, so that I decided to built an AC load analyzer to measure the load current and power consumption. However, the measurement items that only current and power is not sufficient to characterize various type of AC loads, some advanced analyzation features are added in addition to the basic measurement items. This project, originally AC load meter, was planned some years ago but the features of design did not satisfy me and it had been suspended until this year. Recently, I redesigned it with various features from scratch and started to build the AC load analyzer. It can be saied from my experience that the degree of performance of projects get better as time consumed to research, rather than quick dirty prototyping :) Theory Value of AC Figure 1. Alternating current

description

AC analizador

Transcript of ELM - AC Load Analyzer

Page 1: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 1/8

AC Load Analyzer

November 3, 2014

We are using a number of electric equipments. I sometimes think need to measure the powerconsumption of the instruments and home electric equipments, so that I decided to built an AC loadanalyzer to measure the load current and power consumption. However, the measurement items thatonly current and power is not sufficient to characterize various type of AC loads, some advancedanalyzation features are added in addition to the basic measurement items.

This project, originally AC load meter, was planned some years ago but the features of design did notsatisfy me and it had been suspended until this year. Recently, I re­designed it with various featuresfrom scratch and started to build the AC load analyzer. It can be saied from my experience that thedegree of performance of projects get better as time consumed to research, rather than quick dirtyprototyping :­)

Theory

Value of AC

Figure 1. Alternating current

Page 2: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 2/8

Figure 2. Definition of effective value

Figure 3. Effective value of sine wave

The alternating current (AC) is the current that the direction of flow of electric charge changesperiodically as showin in Figure 1. The value of AC is also expressed as like DC. However theinstantaneous value of AC i varies continuously and never stay at a fixed value. So how is the value ofAC determined?

As far as without proviso, the value of AC is expressed with effective value (RMS value). Theeffective value of AC current i is subsitution of the value of DC current I that acts the same work asthe AC current does, in other words, the power dissipation at the load is equal to the AC current. Theinstantaneous value of power i² varies as the current, so that the mean value of power in analysisperiod is used as shown in Figure 2. The I² is the equivalent power of AC current, and I, square root ofI², is effective value of the AC current. Also the AC voltage can be thought as like this. Note thatRMS is abbreviation of root­mean­square.

The sine wave is the typical wave form of AC current, e.g. AC power. The RMS value of sine wavewith peak value Vp is known as Vp / √2. Figure 3 shows the equations about RMS value of sine waveto verify this. Where T is the a cycle period, ω is angular frequency and sin() is the function of the sinewave. Equation (1) expresses RMS value Irms, and equation (2) is got from the equation (1).

There are some types of AC wave forms, sine, triangle, saw, square and etc. Different shape of ACwave forms with same Ip have different RMS value each other. For example, Ip / 1 for square wave,

Page 3: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 3/8

Ip / √3 for triangle and saw wave.

Power and Power Factor

Figure 4. Pure reactive load

Figure 5. Resistance/Reactance mixed load

By definition in Figure 2, the power dissipation P in the AC circuit can be expressed P = VI or P =I²R as equivalent to DC circuit. However there is a point that it cannot be expressed as like DC circuit,because there is relationship of phase between current and voltage in addition to the value of currentand voltage. At the pure reactive load circuit shown in Figure 4, the phase of current lags π/2 fromvoltage and the power only goes back and forth between power source and load. As the result, there isno power dissipation in the circuit. At the resistance/reactance mixed load circuit shown in Figure 5,phase of current from voltage φ is 0 < φ < π/2. In this case, a part of power going in the circuit isdissipated at the load. The power P dissipated at the load is P = VI cos(φ), where V and I is effectivevalue of v and i, φ is phase angle between v and i.

Therfore the power dissipation in the AC circuit cannot be determined by only the value of currentand voltage. However the multiple of current and voltage VI is still impotant for AC circuit and it iscalled apparent power. The symbol of apparent power is S and the unit is VA. As the opposit ofapparent power, the power dissipated at the load VI cos(φ) is called effective power and the unit is W.Generally when saied 'power' simply, it means the effective power.

The ratio of effective power in the apparent power, P / S = VI cos(φ) / VI = cos(φ) is called powerfactor. The low power factor load requires large current to supply the same power of high powerfactor load. It can be saied that low power factor load is uneconomical because it needs large currentcapacity to electric installation.

Harmonic Current

Figure 6. Non­linear load

Page 4: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 4/8

Explanations about power factor in avobe are under assumption of wave forms of current and voltageboth are sinusoidal. However the load current is not that always sinusoidal at real circuits. Non­linearload, such as rectified circuit, discharge lamp and etc., creates non­sinusoidal current like shown inFigure 6. The non­sinusoidal current contains many harmonic components and the harmonic currentdiffer from fundamental frequency is wattless current that not serve power dissipation. Therefore non­sinusoidal current containing with much harmonic components makes worse the power factor.Additionally, distorted wave form of line voltage due to non­sinusoidal current resuluts someproblems of electric installation. The harmonic current of input current is regulated by law in somecountries and regions. To avoid this problem, most electronics quipments, such as TV, PC and LEDlight, integraate power factor correction (PFC) circuit. It achieves the good power factor as high as99%. However cheap wall adapters without PFC seem to be bad in power factor, 60% or less.

Items to Measure

As the items to measure AC load, current, effective power, apparent power and power factor areneeded at least. In addition to these four items, voltage, frequency, energy (watt­hour), harmoniccurrent and current profile are added to the measurement items.

Hardware

Photo 1. Built circuit board

Circuit diagam

Input Signals to Capture

Two input channels, input voltage and load current, are acquired to measure required items. These

Page 5: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 5/8

channels need to be sampled simultaneously because required data is not only wave form but alsophase angle between the two channels, and therfore two ADCs are needed. Fortunately, themicrocontroller (NXP LPC1519) used in this project has two 12­bit ADC modules for complex signalprocessing, so that I thought that it will able to be achieved without external ADC. But 12­bit is notsufficient resolution for current channel because the load current varies in range from severalmilliamperes to 10 amperes or avobe as like idle current and heater current. To solve this issue, a 16­bit ADC is added for current channel and a 12­bit integrated ADC is used for voltage channel.

Power Sypply

Total current consumption of microcontroller, analog circuit and LCDC could be reduced as low as 10milliamperes. This enables to use a simple capacitive dropper for the local power supply. This type ofpower supply has risk of electrical shock due to the load circuit is not isolated from AC input, so thatthe circuit board must be stored into a plastic case to avoid unintentional touch of live conductor.Using non­isolated circuit needs to pay special attention to the safety but on the other hand there is agreat advantage. The input circuit need not to be isolated from AC input and it can eliminate largeparts such as isolation transformer. As the result, the AC load analyzer could be built very small insize.

Display

A 128 by 128 dots TFT­LCD module (ZY­FGD1442701V1) is used for the display. The full­graphiccolor display enables to show many information superior to character LCDs. The power consumptionof the LCDC itself is relatively low but the LED back light consumes a significant power as large asthe other circuit. The back light circuit is separated from LCDC, so that it can be connected at powersupply serially to reduce supply current to the circuit and it can can use a small dropper capacitor.

L/N Checker

This function checks polarity (line / neutral) of AC input. When it attached to AC socket in oppositdirection and touched the earth electrode, LED will light to indicate the circuit grand is on the lineside of AC input. Note that the input polarity does not affect functionality of measurement.

Software

Sampling and Re­sampling

Figure 7. Re­sampling

Two input signals, current and voltage, are acquired in sampling frequency of 16 ksps. This is done ina 16 kHz square wave generated with SCT. The rising edge of square wave is used to trigger external

Page 6: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 6/8

ADC and internal ADC. It also generates interrupt at falling edge to read the conversion results.

Number of samples per a cycle varies as input frequency. If it is fixed to a number, followingprocesses, especially harmonics analysis, will be easy. In this project, acquired samples are re­sampled in 128 samples per cycle and store it into a wave form buffer. Most processes are done withthe re­sampled data. Raw sampling data is used for only frequency and W­H measurement that needto be processed continuously.

Display mode

The AC load analyze has four display modes in measurment items. The display mode is chenged byMODE button in order of General, Wave form, Harmonics and Current profile. The display isupdated in real­time and can also be paused by HOLD button. UP/DOWN buttons have differentfunction by display mode.

Gneneral

Current, effective power, apparent power, power factor and voltage are calcurated with a cycle of re­sampled wave form. To filter out the noise component, the wave form is stored to the buffer in 8­cycleaveraging, so that the values are updated in interval of several times per a second. Also consumedenergy (W­H), frequency and elapse time are displayed in addition to those items. The frequency ismeasured in reciprocal method from number of samples of 64 cycles. The frequency resolutionbecomes 2.44 mHz at 50 Hz input frequency.

Wave form

Captured wave form is displayed on the display. The vertical scale is adjusted to fit peak of waveform in the window. The peak values are displayed on the left­bottom of the scope.

Harmonics

A DFT process is applied to the captured current wave form and display the values of harmoniccomponents. A cycle of wave form is fitted to 128 (2ⁿ) samples by re­sampling process, so that theDFT can be done without windowing. This enables to analyze it without gain error and losingfrequency resolution. The 40 frequency components, 0th(DC) to 39th, out of 64 are used as valid databut only 18 items can be displayed on the screen. To show hidden items, UP/DOWN buttons are usedto scroll the table. Note that the harmonics analysis in this project is a little differ from the method thatspecified in IEC61000­4­7 (200 ms (10/12 cycles) of DFT window).

Current profile

Current current data is displayed in horizontal rolling graph. The data captured every cycles isdisplayed in span of 2 seconds at 50Hz input frequency. The vertical scale can be changed in range of0.1A to 20A by UP/DOWN button. If the current value exceeds the display range, the graph is shwonin red bars to indicate over range input. The peak value from start of current profile mode is displayedunder the graph window. It is displayed red if an overflow at acquisition path was occured. The peakvalue and overflow status is cleared at restart from pause mode.

Calibration

Because of non­isolated circuit, it must be powered by a separated power supply while flashprogramming and calibration process. It can also be powered by a 9V battery connected to TP6 and

Page 7: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 7/8

GND. When set P0_13 low and apply power, it will enter calibration mode.

1.  Voltage offset: Tie AC inputs and press DOWN button.2.  Voltage gain: Apply DC 30.0V to AC input and press DOWN button.3.  Current offset: Press DOWN button.4.  Current gain: Set DC 2.00A to R5 and press DOWN button.

The calibrated data is stored into the EEPROM.

Results

Switch mode power supply (SMPS) without PFC. The input current has high ratio of peak to averagedue to charge current to the input capacitor at peak of input voltage. The wave form like impulsecontains much odd harmonic current and it results a bad power factor. BTW, I found that the inputfrequency is not correct. It varies about ±0.05Hz in period of several minutes. Of course it seems to becorrect for electric clocks in the span of a day.

Phase controlled light dimmer. It controls the power of the lamp or heater by controlling ratio of on­time at each half cycles. It is used for various electric equipments but the power factor is not good atlow output power.

Temperature controlled soldering iron from Hakko and Goot. To my surprise, these are not using halfof cycle. Asymmetric wave form contains much even harmonics including 0th (DC) component.Current profile shows the inrush current at cold start.

Page 8: ELM - AC Load Analyzer

18/08/2015 ELM ­ AC Load Analyzer

http://elm­chan.org/works/heco/report_e.html 8/8

Idle current of wall adapters. 40W wall adapter from Fujitsu (left) and 24W wall adapter fromAkizuki (right). Cheap wall adapter tends to be inferior to expensive one in efficiency and idlecurrent.

SMPS with PFC. Power factor is drastically improved by PFC circuit.

Resources

Circuit Diagram and Circuit BoardFirmware (gcc project)