Sunteți pe pagina 1din 8

18/08/2015

ELMACLoadAnalyzer

ACLoadAnalyzer
November3,2014

Weareusinganumberofelectricequipments.Isometimesthinkneedtomeasurethepower
consumptionoftheinstrumentsandhomeelectricequipments,sothatIdecidedtobuiltanACload
analyzertomeasuretheloadcurrentandpowerconsumption.However,themeasurementitemsthat
onlycurrentandpowerisnotsufficienttocharacterizevarioustypeofACloads,someadvanced
analyzationfeaturesareaddedinadditiontothebasicmeasurementitems.
Thisproject,originallyACloadmeter,wasplannedsomeyearsagobutthefeaturesofdesigndidnot
satisfymeandithadbeensuspendeduntilthisyear.Recently,Iredesigneditwithvariousfeatures
fromscratchandstartedtobuildtheACloadanalyzer.Itcanbesaiedfrommyexperiencethatthe
degreeofperformanceofprojectsgetbetterastimeconsumedtoresearch,ratherthanquickdirty
prototyping:)

Theory
ValueofAC
Figure1.Alternatingcurrent

http://elmchan.org/works/heco/report_e.html

1/8

18/08/2015

ELMACLoadAnalyzer

Figure2.Definitionofeffectivevalue

Figure3.Effectivevalueofsinewave

Thealternatingcurrent(AC)isthecurrentthatthedirectionofflowofelectricchargechanges
periodicallyasshowininFigure1.ThevalueofACisalsoexpressedaslikeDC.Howeverthe
instantaneousvalueofACivariescontinuouslyandneverstayatafixedvalue.Sohowisthevalueof
ACdetermined?
Asfaraswithoutproviso,thevalueofACisexpressedwitheffectivevalue(RMSvalue).The
effectivevalueofACcurrentiissubsitutionofthevalueofDCcurrentIthatactsthesameworkas
theACcurrentdoes,inotherwords,thepowerdissipationattheloadisequaltotheACcurrent.The
instantaneousvalueofpowerivariesasthecurrent,sothatthemeanvalueofpowerinanalysis
periodisusedasshowninFigure2.TheIistheequivalentpowerofACcurrent,andI,squarerootof
I,iseffectivevalueoftheACcurrent.AlsotheACvoltagecanbethoughtaslikethis.Notethat
RMSisabbreviationofrootmeansquare.
ThesinewaveisthetypicalwaveformofACcurrent,e.g.ACpower.TheRMSvalueofsinewave
withpeakvalueVpisknownasVp/2.Figure3showstheequationsaboutRMSvalueofsinewave
toverifythis.WhereTistheacycleperiod,isangularfrequencyandsin()isthefunctionofthesine
wave.Equation(1)expressesRMSvalueIrms,andequation(2)isgotfromtheequation(1).
TherearesometypesofACwaveforms,sine,triangle,saw,squareandetc.DifferentshapeofAC
waveformswithsameIphavedifferentRMSvalueeachother.Forexample,Ip/1forsquarewave,
http://elmchan.org/works/heco/report_e.html

2/8

18/08/2015

ELMACLoadAnalyzer

Ip/3fortriangleandsawwave.
PowerandPowerFactor
Figure4.Purereactiveload

Figure5.Resistance/Reactancemixedload

BydefinitioninFigure2,thepowerdissipationPintheACcircuitcanbeexpressedP=VIorP=
IRasequivalenttoDCcircuit.HoweverthereisapointthatitcannotbeexpressedaslikeDCcircuit,
becausethereisrelationshipofphasebetweencurrentandvoltageinadditiontothevalueofcurrent
andvoltage.AtthepurereactiveloadcircuitshowninFigure4,thephaseofcurrentlags/2from
voltageandthepoweronlygoesbackandforthbetweenpowersourceandload.Astheresult,thereis
nopowerdissipationinthecircuit.Attheresistance/reactancemixedloadcircuitshowninFigure5,
phaseofcurrentfromvoltageis0<</2.Inthiscase,apartofpowergoinginthecircuitis
dissipatedattheload.ThepowerPdissipatedattheloadisP=VIcos(),whereVandIiseffective
valueofvandi,isphaseanglebetweenvandi.
TherforethepowerdissipationintheACcircuitcannotbedeterminedbyonlythevalueofcurrent
andvoltage.HoweverthemultipleofcurrentandvoltageVIisstillimpotantforACcircuitanditis
calledapparentpower.ThesymbolofapparentpowerisSandtheunitisVA.Astheoppositof
apparentpower,thepowerdissipatedattheloadVIcos()iscalledeffectivepowerandtheunitisW.
Generallywhensaied'power'simply,itmeanstheeffectivepower.
Theratioofeffectivepowerintheapparentpower,P/S=VIcos()/VI=cos()iscalledpower
factor.Thelowpowerfactorloadrequireslargecurrenttosupplythesamepowerofhighpower
factorload.Itcanbesaiedthatlowpowerfactorloadisuneconomicalbecauseitneedslargecurrent
capacitytoelectricinstallation.
HarmonicCurrent
Figure6.Nonlinearload
http://elmchan.org/works/heco/report_e.html

3/8

18/08/2015

ELMACLoadAnalyzer

Explanationsaboutpowerfactorinavobeareunderassumptionofwaveformsofcurrentandvoltage
botharesinusoidal.Howevertheloadcurrentisnotthatalwayssinusoidalatrealcircuits.Nonlinear
load,suchasrectifiedcircuit,dischargelampandetc.,createsnonsinusoidalcurrentlikeshownin
Figure6.Thenonsinusoidalcurrentcontainsmanyharmoniccomponentsandtheharmoniccurrent
differfromfundamentalfrequencyiswattlesscurrentthatnotservepowerdissipation.Thereforenon
sinusoidalcurrentcontainingwithmuchharmoniccomponentsmakesworsethepowerfactor.
Additionally,distortedwaveformoflinevoltageduetononsinusoidalcurrentresulutssome
problemsofelectricinstallation.Theharmoniccurrentofinputcurrentisregulatedbylawinsome
countriesandregions.Toavoidthisproblem,mostelectronicsquipments,suchasTV,PCandLED
light,integraatepowerfactorcorrection(PFC)circuit.Itachievesthegoodpowerfactorashighas
99%.HowevercheapwalladapterswithoutPFCseemtobebadinpowerfactor,60%orless.
ItemstoMeasure
AstheitemstomeasureACload,current,effectivepower,apparentpowerandpowerfactorare
neededatleast.Inadditiontothesefouritems,voltage,frequency,energy(watthour),harmonic
currentandcurrentprofileareaddedtothemeasurementitems.

Hardware
Photo1.Builtcircuitboard

Circuitdiagam
InputSignalstoCapture
Twoinputchannels,inputvoltageandloadcurrent,areacquiredtomeasurerequireditems.These
http://elmchan.org/works/heco/report_e.html

4/8

18/08/2015

ELMACLoadAnalyzer

channelsneedtobesampledsimultaneouslybecauserequireddataisnotonlywaveformbutalso
phaseanglebetweenthetwochannels,andtherforetwoADCsareneeded.Fortunately,the
microcontroller(NXPLPC1519)usedinthisprojecthastwo12bitADCmodulesforcomplexsignal
processing,sothatIthoughtthatitwillabletobeachievedwithoutexternalADC.But12bitisnot
sufficientresolutionforcurrentchannelbecausetheloadcurrentvariesinrangefromseveral
milliamperesto10amperesoravobeaslikeidlecurrentandheatercurrent.Tosolvethisissue,a16
bitADCisaddedforcurrentchannelanda12bitintegratedADCisusedforvoltagechannel.
PowerSypply
Totalcurrentconsumptionofmicrocontroller,analogcircuitandLCDCcouldbereducedaslowas10
milliamperes.Thisenablestouseasimplecapacitivedropperforthelocalpowersupply.Thistypeof
powersupplyhasriskofelectricalshockduetotheloadcircuitisnotisolatedfromACinput,sothat
thecircuitboardmustbestoredintoaplasticcasetoavoidunintentionaltouchofliveconductor.
Usingnonisolatedcircuitneedstopayspecialattentiontothesafetybutontheotherhandthereisa
greatadvantage.TheinputcircuitneednottobeisolatedfromACinputanditcaneliminatelarge
partssuchasisolationtransformer.Astheresult,theACloadanalyzercouldbebuiltverysmallin
size.
Display
A128by128dotsTFTLCDmodule(ZYFGD1442701V1)isusedforthedisplay.Thefullgraphic
colordisplayenablestoshowmanyinformationsuperiortocharacterLCDs.Thepowerconsumption
oftheLCDCitselfisrelativelylowbuttheLEDbacklightconsumesasignificantpoweraslargeas
theothercircuit.ThebacklightcircuitisseparatedfromLCDC,sothatitcanbeconnectedatpower
supplyseriallytoreducesupplycurrenttothecircuitanditcancanuseasmalldroppercapacitor.
L/NChecker
Thisfunctioncheckspolarity(line/neutral)ofACinput.WhenitattachedtoACsocketinopposit
directionandtouchedtheearthelectrode,LEDwilllighttoindicatethecircuitgrandisontheline
sideofACinput.Notethattheinputpolaritydoesnotaffectfunctionalityofmeasurement.

Software
SamplingandResampling
Figure7.Resampling

Twoinputsignals,currentandvoltage,areacquiredinsamplingfrequencyof16ksps.Thisisdonein
a16kHzsquarewavegeneratedwithSCT.Therisingedgeofsquarewaveisusedtotriggerexternal
http://elmchan.org/works/heco/report_e.html

5/8

18/08/2015

ELMACLoadAnalyzer

ADCandinternalADC.Italsogeneratesinterruptatfallingedgetoreadtheconversionresults.
Numberofsamplesperacyclevariesasinputfrequency.Ifitisfixedtoanumber,following
processes,especiallyharmonicsanalysis,willbeeasy.Inthisproject,acquiredsamplesarere
sampledin128samplespercycleandstoreitintoawaveformbuffer.Mostprocessesaredonewith
theresampleddata.RawsamplingdataisusedforonlyfrequencyandWHmeasurementthatneed
tobeprocessedcontinuously.
Displaymode
TheACloadanalyzehasfourdisplaymodesinmeasurmentitems.Thedisplaymodeischengedby
MODEbuttoninorderofGeneral,Waveform,HarmonicsandCurrentprofile.Thedisplayis
updatedinrealtimeandcanalsobepausedbyHOLDbutton.UP/DOWNbuttonshavedifferent
functionbydisplaymode.
Gneneral
Current,effectivepower,apparentpower,powerfactorandvoltagearecalcuratedwithacycleofre
sampledwaveform.Tofilteroutthenoisecomponent,thewaveformisstoredtothebufferin8cycle
averaging,sothatthevaluesareupdatedinintervalofseveraltimesperasecond.Alsoconsumed
energy(WH),frequencyandelapsetimearedisplayedinadditiontothoseitems.Thefrequencyis
measuredinreciprocalmethodfromnumberofsamplesof64cycles.Thefrequencyresolution
becomes2.44mHzat50Hzinputfrequency.
Waveform
Capturedwaveformisdisplayedonthedisplay.Theverticalscaleisadjustedtofitpeakofwave
forminthewindow.Thepeakvaluesaredisplayedontheleftbottomofthescope.
Harmonics
ADFTprocessisappliedtothecapturedcurrentwaveformanddisplaythevaluesofharmonic
components.Acycleofwaveformisfittedto128(2)samplesbyresamplingprocess,sothatthe
DFTcanbedonewithoutwindowing.Thisenablestoanalyzeitwithoutgainerrorandlosing
frequencyresolution.The40frequencycomponents,0th(DC)to39th,outof64areusedasvaliddata
butonly18itemscanbedisplayedonthescreen.Toshowhiddenitems,UP/DOWNbuttonsareused
toscrollthetable.Notethattheharmonicsanalysisinthisprojectisalittledifferfromthemethodthat
specifiedinIEC6100047(200ms(10/12cycles)ofDFTwindow).
Currentprofile
Currentcurrentdataisdisplayedinhorizontalrollinggraph.Thedatacapturedeverycyclesis
displayedinspanof2secondsat50Hzinputfrequency.Theverticalscalecanbechangedinrangeof
0.1Ato20AbyUP/DOWNbutton.Ifthecurrentvalueexceedsthedisplayrange,thegraphisshwon
inredbarstoindicateoverrangeinput.Thepeakvaluefromstartofcurrentprofilemodeisdisplayed
underthegraphwindow.Itisdisplayedredifanoverflowatacquisitionpathwasoccured.Thepeak
valueandoverflowstatusisclearedatrestartfrompausemode.
Calibration
Becauseofnonisolatedcircuit,itmustbepoweredbyaseparatedpowersupplywhileflash
programmingandcalibrationprocess.Itcanalsobepoweredbya9VbatteryconnectedtoTP6and
http://elmchan.org/works/heco/report_e.html

6/8

18/08/2015

ELMACLoadAnalyzer

GND.WhensetP0_13lowandapplypower,itwillentercalibrationmode.
1. Voltageoffset:TieACinputsandpressDOWNbutton.
2. Voltagegain:ApplyDC30.0VtoACinputandpressDOWNbutton.
3. Currentoffset:PressDOWNbutton.
4. Currentgain:SetDC2.00AtoR5andpressDOWNbutton.
ThecalibrateddataisstoredintotheEEPROM.

Results

Switchmodepowersupply(SMPS)withoutPFC.Theinputcurrenthashighratioofpeaktoaverage
duetochargecurrenttotheinputcapacitoratpeakofinputvoltage.Thewaveformlikeimpulse
containsmuchoddharmoniccurrentanditresultsabadpowerfactor.BTW,Ifoundthattheinput
frequencyisnotcorrect.Itvariesabout0.05Hzinperiodofseveralminutes.Ofcourseitseemstobe
correctforelectricclocksinthespanofaday.

Phasecontrolledlightdimmer.Itcontrolsthepowerofthelamporheaterbycontrollingratioofon
timeateachhalfcycles.Itisusedforvariouselectricequipmentsbutthepowerfactorisnotgoodat
lowoutputpower.

TemperaturecontrolledsolderingironfromHakkoandGoot.Tomysurprise,thesearenotusinghalf
ofcycle.Asymmetricwaveformcontainsmuchevenharmonicsincluding0th(DC)component.
Currentprofileshowstheinrushcurrentatcoldstart.

http://elmchan.org/works/heco/report_e.html

7/8

18/08/2015

ELMACLoadAnalyzer

Idlecurrentofwalladapters.40WwalladapterfromFujitsu(left)and24Wwalladapterfrom
Akizuki(right).Cheapwalladaptertendstobeinferiortoexpensiveoneinefficiencyandidle
current.

SMPSwithPFC.PowerfactorisdrasticallyimprovedbyPFCcircuit.

Resources
CircuitDiagramandCircuitBoard
Firmware(gccproject)

http://elmchan.org/works/heco/report_e.html

8/8

S-ar putea să vă placă și