Cost-effective Smart Metering System for the Power Consumption Analysis of Household

—This paper deals with design, calibration, experimental implementation and validation of cost-effective smart metering system. Goal was to analyse power consumption of the household with the immediate availability of the measured information utilizing modern networked and mobile technologies. Research paper outlines essential principles of the measurement process, document theoretical and practical aspects which are important for the construction of such smart meter and finally, results from the experimental implementation has been evaluated and validated.


INTRODUCTION
Microcontroller based embedded control systems and intelligent sensors are nowadays commonly used in smart houses supporting the way we live, work and play.In recent years there was a lot of effort invested in making the systems smart and thus helping to reduce the amount of energy, keeping an eye on power consumption, saving money and sparing the environment.Smart technologies, mobile platforms and e-commerce systems are also changing the way how the energy consumption information is delivered.Modern technologies allow us to provide on-demand value added service like the consumption statistics or abnormality notifications for the behaviour of the powered devices and remote control.
One of the goals of smart home technologies with the immediate availability of power consumption information is to motivate consumers to adjust their behaviour in order to lower their energy consumption and energy costs.Effective usage of the power resources contributes to environmental protection, being one ingredient for the success of the energy transmission.The benefits provided by smart meters can even be maximized, for example, by combining the energy meters with home control systems such as smart homes, with which lighting and household appliances, among other things, can be automatically controlled.
The electronic energy meter which is based on digital micro technology that doesn't use moving parts is also known as static energy meter.In electronic energy meter the accurate functioning is controlled by a specially designed integration circuit.Application specified integration circuit (also known as ASIC) is constructed only for specific applications using embedded system technology.Similar application specified integration circuits are now used in washing machines, air conditioners, automobiles or digital cameras.
The first part of the paper is about theoretical aspects of measuring the electricity by means of the newest intelligent meters.The second part of the article is about real application of constructed device that is installed in household for testing and measuring the behavior of electricity consumption.

II. MEASUREMENT OF ELECTRICAL PARAMETERS
Measurement is the process of getting the knowledge of outside world, where we try to get the desired values.Success is defined mainly with measuring accessibility, environment and the precision of measuring devices.The role of electrical measurement is to find out the values of defined electrical quantities as precisely as possible.During measurement of these values is not possible to interfere with measurement object and the measurement faults would be in the context of equipment quality.Measurement faults should be caused by many factors but not all of them we can eliminate or mitigate their effect.The aim of this chapter is to point out the measurement basis of the electrical quantities such as voltage, current and power in metering system.

A. Measurement and evaluation of electric voltage
Voltage is a physical quantity expressing the difference of electric potential between two points and represents the energy that is required for transferring the electrical charge between these two points within a certain electric field.The measurement unit of voltage is the Volt [V], which belongs to the derived units of SI.
Voltage measuring in smart meters is primarily provided by the integration circuits which consist of signal sensors and analogue-digital converter.Voltage measurement accuracy is affected by many factors such as temperature and also by the fluctuations of input power supply.
Electronic meter records the value of the voltage profile in the 10 minutes power quality.The overall 10 minutes profile consists of a 600-second values that are recorded every second into the computer memory system of electric meter.Subsequently the arithmetic average of these values is submitted according to defined formula (1).

∑
(1) Each value of voltage that is entered into the computer www.ijacsa.thesai.orgmemory is calculated by equation (3).Electric meter reads 32 values every 20 millisecond, from which is calculated the mean voltage per second.

∑ (2)
After modification: The recording of voltage in the meter works on a similar principle as an electronic voltmeter.The signal of sensor is placed across the voltage divider, which records the change of the output voltage signal on the resistance R.

B. Measurement and evaluation of electric current
Electric current is a physical quantity that determines the size of the charge that flows around a given point in an electrical circuit.The basic unit of current is Ampere [A], which is the basic unit of the SI (1A=1C/s).The resistance of direct current circuits to the current flow is constant so that the current in the circuit is related to the ratio of the voltage and the resistance according to Ohm's law.
Measurement of current in the smart meters is carried out by means of a current transformer or with hall sensors.On the output of it is connected a simple constant resistor, which is used for measuring the voltage of the analogue signal.A recording hysteresis of voltage is typically ± 5 V, depending on the resistance.The output voltage signal is fed to the integrator, where the A/D converter converts these voltage pulses to the digital value of the current.
Electronic meter records the value of the current in the 10 minutes profile of power quality.The overall 10-minutes profile consists of a 600-second values that are recorded every second into the computer memory system of the electric meter.Subsequently the arithmetic average of these values is submitted according to defined formula (4)(1).

∑ (4)
Each value of current that is entered into the computer memory is calculated by equation (5).Electric meter reads 32 values every 20 millisecond, from which is calculated the mean current per second.

∑ ( )
After modification: After modification: Recording the current in smart meter provides current transducer, which consist of current transformer that ensures high linearity over a wide range of currents with ability to measure the direct currents.Meter evaluates the measured data and stores them in to the special registers according to OBIS codes.

C. Measurement and evaluation of active power
Active power can be defined as electric power, which converts on the load on work or other form of energy.
The power is defined as work over the time so: (8) The main unit of power is the watt (W), this unit is the SI derived unit (1W = 1J/s).Building on the equation ( 1) and ( 4), the mean value of two multiple signals is an essential part of the active power measurements.The mean value of active power in electricity meter we can calculate according (9).
Substituting the equation ( 8) we get equation: The electric voltage and current are recorded in one second intervals during every 15 minutes.The 15 minute value of the average power is calculated as the multiple of instantaneous values of voltages and currents at one-second intervals.On Fig. 1 is a load profile consisting of a multiple one second values of active power.The amount of consumed active power is recorded in electricity meter in 15 minute intervals.That active power can be calculated as area under the load curve, thus:

D. Sensors -General Overviewr
The sensor converts the information from the physical area of measured quantity into another physical area, usually an electrical signal or an electrical parameter.There are of course number of measuring devices with other than electric outputs (needle indicator, level of liquid).Currently sensors are practically used in all types of industrial products and systems.World market for sensors is still significantly growing.In Europe there are markets for more than hundred thousand different types of sensors.This number does not illustrate only the widespread use of sensors, but the fact that the choice of sensor for specific use is not a simple task.The main reason for rising up the interest for sensors is miniaturization of these devices.For this trend is responsible the continuing progress in the development of technologies compatible with information technologies.Currently there are available sensors based on silicon or similar technology for almost every value and there is also further scope for development in this area.Devices that convert information from one (physical) area to another (usually into electric field) are named converters (transducers), sensors or gauges.
The imperfections of sensors are usually written in the datasheet of the device producer.These specifications inform the users about the deviations of the sensor from the ideal conditions.Every sensor must be fully specified with respect to his further operation.
The main characteristics of sensors we can define as: sensitivity, linearity and hysteresis, resolution, maximum permissible error, zero adjustment, noise, response time, rating of frequency response.
From the energetic point of view the sensor can be divided into two groups: direct and modulating (active and passive).The distinguishing feature is the need for auxiliary energy source.Direct sensors do not require an additional power source.Consequently, the sensor draws power from the measured object, what can cause the loss of information about the original state of the measured object.Indirect or modulating sensors use an additional power source that modulates the measured object.Output energy of sensor comes mostly from auxiliary power and only a part of energy is taken from the measured object.Modulating sensors are due to not burdening the object of measurement more accurate than direct sensors.

E. Sensors of electrical voltage and current
These sensors are suitable for measuring alternating and direct currents.The most common are clamp probes consisting of drop dawn jaws hat encircle the measured wire.And so we can measure currents without galvanic coupling.Measurement of voltage must be performed by means of test leads, respectively spikes.On the output of measurement probe is an analogue value of current, which is usually transformed to digital with usage of digital multimeter, respectively with another A/D converter.
The certain restrictions of measuring probes can be low sensitivity for small currents so the non-contact measurement of current is not appropriate for it.For small currents it is possible to use measurement direct on the contacts.[8] 1) Voltage sensors The most common probes used for voltage measurement are passive voltage probes with damping (divider 1:10).They reduce measured voltage and increase its total output resistance during the sensing of it.When using passive probes we need to take into account the divider ration (measured value of 0.5 with converting 1:10 is 5 volts).With the use of oscilloscope mostly is set the automatic recalculation regarding the type of probe.For high-frequency measurements the oscilloscope input capacitance and parasitic capacitance of the cable together with divider resistors form a low-pass filter suppressing high-frequency parts of the signal.The impact of undesirable capacity can be compensated by adding a parallel capacity.
Transmission of measured voltage to the oscilloscope or analyser through a probe should be frequency-independent.Practical compensation is performed by using calibratorrectangular course with different levels and frequencies.In addition to the classical low frequency compensation also is used additional highfrequency compensation using a broadband current probes.

2) Differential voltage sensors
Differential voltage probes are designed for explaining the basic principles of electric energy.By means of these probes for measuring voltages in low voltage alternating and direct currents with range of ± 6 Volts is system ideal for use in battery and lamp circuits.It is also used in combination with a current probe to explore Ohm laws and phase relationship between reactive power and much more.The main difference with voltage probes is fact that neither terminal is connected to the ground.

Differential voltage probe measures the difference of potential between terminals V+ (usually red) and V-(usually black). Voltage probes have differential inputs it means that
voltage is measured with respect to the black terminal and not to a ground circuit.It allows the measurement direct on the circuit elements without limitations of general ground.Voltage probes can be used for measurement negative potential the same as for positive potential.This is considered as a major advantage with the usage of interface from 0 to 5 Volts.
Voltage probes are intended to use as the voltmeter.They should be placed across the circuit elements.Differential input range is from -6 to +6 volts.Surge protection is provided so that the slightly higher voltage does not damage the voltage sensor.These probes are not designed for measurement of high voltage.

3) Current sensors
Current probes allow the measurement of current curves by means of oscilloscope with a bandwidth of approximately 100MHz.Mostly using the principle of Hall probe at low frequencies and current transformer at high frequency, that are designed for wider range of frequency and smaller values of currents.Hall probe offers a wide frequency response, thus measure with high precision of direct and alternate currents and complex courses too.Hall probes are usually made as compact clip-on probe with a nominal current from 5 mA to www.ijacsa.thesai.org30 A in a peak with an accuracy of ± 1% excluding the effect of interference.These current probes provide a voltage output directly proportional to the measured current.

4) Other types of sensors
Passive probe with low input impedance (50Ω) is designed especially for measurements in high frequency circuits, where it is required to adjust the impedance and high limiting frequency.Active probes with unbalanced inputs contain a preamplifier and are designed for measuring very small signals, for which the oscilloscope sensitivity or high impedance of source signal is insufficient.Input capacitance is usually around 1pF.They are very sensitive to overvoltage, including the static electricity.Bandwidth is usually up to the GHz.
Active differential probes are designed for measuring ungrounded sources of signal.They contain a preamp and conversion from the differential input to unbalanced output suitable for connection to an oscilloscope.They are usually build as the broadband high-frequency probes that are able to process signals up to about 10GHz.
High voltage differential probe with galvanic isolation of input provide secure, precise and broadband measurements of high-voltage devices and systems up to the voltage about kV.

III. MEASURING THE ELECTRICAL PARAMETERS USING THE ATMEL MICROCONTROLLER
Before you begin to format your paper, first write and save the content as a separate text file.Keep your text and graphic files separate until after the text has been formatted and styled.Do not use hard tabs, and limit use of hard returns to only one return at the end of a paragraph.Do not add any kind of pagination anywhere in the paper.Do not number text headsthe template will do that for you.Finally, complete content and organizational editing before formatting.Please take note of the following items when proofreading spelling and grammar:

A. Abbreviations and Acronyms
The previous chapter described essential principles of measurement of the electrical parameters such as voltage, current, active power.Next chapter will explain and illustrate the whole process of measuring and storing of these values in internal memory of microprocessor.The implementation of such smart metering system will consist of the following basic elements: Probes are an inseparable part of electronics that ensure a proper processing of analogue signals for inputs of analoguedigital converter.Goal of the program code (software resource) is to process the input data, calculate arithmetic average and effective values and store them into non-volatile memory so the data could be accessed for the analytical purposes.

B. Block diagram of the smart metering system
Fig. 2 shows internal structure within the block diagram.System is consisted of sensors used for voltage and current measurement, electronics for processing of measured signals, analogue-digital converter, microprocessor and its additional modules.

Fig. 2. Block diagram of one phase measuring system
In order to ensure the accuracy of measured parameters, the implementation of the whole system, as depicted in Fig. 2, is multiplied by the number of measured phases.Based on the specific requirements of the environment where it is important to measure power parameters, the system could be built as one phase system or with the equipment to measure more phases.Three phase meter will have the same components for every phase and one microprocessor with modules.On Fig. 2 is displayed the block diagram just for one phase metering system.

C. Schematic diagram of electronics for IMS
Schematic diagram of electronics consists of circuits for electric voltage metering and circuits for electric currents metering.Some of the intelligent electronic metering systems have a disconnection circuits which are used in order to disconnect consumers remotely without direct intervention of technician.The other functionality is limitation of current in electricity meter.This is used for limitation of the consumer load.On the Fig. 3 there is the scheme of electronics for electric voltage metering on one phase.On the left part of the figure is the voltage transformer.Its role is to transform the voltage from 230 V to the level that is acceptable for processing at the microcontroller.It is appropriate to use the transformer with 230V AC voltage on the inputs and 12V AC output.
The ratio of this transformer is expressed as: In this equation k is transformer ratio, U out is output voltage of the voltage transformer, U in is input voltage of voltage transformer.Transformer ratio k is any value from interval between (0;∞), but it is still open interval.When the ratio is 1 it means that it is separating transformer and when the ratio is more than 1 it means that transformer so increasing.In this case we will have decreasing transformer with transformer ratio k=0,0522.The output alternating current from transformer is placedto voltage divider which consists of resistor R 1 and R 2 .The role of these transformers is to decreasethe value of voltage according to their ratio from the output of transformer to the input of analogue-digital converter.In most cases the AD converters operates with values up to the 5V direct current as it was described in pervious chapter.On the transformer, there is voltage around ± 12V ef what means that amplitude of voltage can achieve values according to equation:

√
(13) When we calculate the absolute value of both amplitudes, we will have the value of voltage 33,94V.Measured voltage on the output of divider we can calculate from equation: According to Ohms law it is possible to express current I by voltage U and resistance R, which is known in our circuit.Subsequently from that we can calculate U R1 .The maximum value of U R1 is 3,04V.The most important is determination of decreasing ratio of divider(labelled as p): (16) Input resistance of voltage divider consists of the sum of two resistors that are connected in series.As the output resistor of voltage divider is considered that one which will be connected to the input of AD converter.The ratio of voltage divider after substitution of resistors values is 11:1.
The next important part is the offset of mean value of AC voltage to the middle of the operating voltage in AD converter.It is ensured by R 3 and R 4 according to scheme on Fig. 3.These two resistors are of the same value and they are connected inseries where the end of first resistor is connected to the GND of AD converter.The end of second resistor is connected to the power source of AD converter.The point where are connected both resistors will have the same potential to the ground as to the power source terminal.
The value between them will be exactly 2,5V.This point will be connected to the output of transformer and resistor of voltage divider with lower value of resistance to ensure the offset of alternate current which will fluctuate around the value of 2,5V.The last part of circuit is capacitor C 1 which ensures low impedance path between AC current and ground of DC power source.Fig. 3 shows the real course of voltage on the resistance divider inputs and the real course of voltage on the output of voltage divider.
The scheme for measurement of currents will be slightly different from the voltage measurement.Every phase is to be measured separately, the same way as was measured voltage.Fig. 4. Scheme of electronics for current metering on phase 1 [7] Fig. 4 shows the initial scheme of circuit for measurement of current with components for evaluation of the current that flows via one phase of metering system.On the left side of the figure there is current transformer.It is probe for metering currents according to chapter II.This probe operates on the principle of transformation of electric voltage from primary winding.Primary winding consist of one wire which cross through interior of ferrite core of that transformer.Around the wire there is induced electromagnetic field which is transmitted over the ferrite core of the secondary winding of this transformer.Every current transformer do have its own ratio that is expressed in amperes.For this case the current transformer with factory mark: SCT 013-030was used.Itsratio is 100A to 50mA where 100A current which flows through the primarily winding is on the secondary winding just 50mAs.This physical law is trueonly when the load isconstant.This is the base for deriving the constant for calculating the real value on the proposed intelligent metering system.The recommended load is on the scheme shown under the label Burden.
Next part of the scheme is once again the pair of resistors that are connected in the series.The role of them is to offset the middle of oscillation amplitude to the value of 2,5V.
Basically, we are dealing with voltage measurement on the load Burden, where it is possible to calculate the current flowing over the resistor following Ohm's law and yet determine the current flowing through the measured wire thanks to ratio of current transformer.
Capacitor C 1 have the same function as it was written in description of scheme of voltage measurement.On the right side is shown the real course of voltage (blue) on the resistorwww.ijacsa.thesai.orgload (Burden) and the real course of current (red).
Microprocessor that is used for this implementation do have integrated 10 bits analoguedigital converteron the outputs.In this case we don't need additional support circuits because the output of prepared circuits will be connected straight to the analogue inputs of microprocessor.In one phase metering system we will use just two analogue inputs on the microprocessor.In three phase metering system we will use six analogue inputs on the microprocessor.For every phase two inputs.One input is just for metering current and the second one is for voltage metering.

D. Software of intelligent metering system
Intelligent metering system which is build on the base of microprocessor shouldn't be functional without the software.Software is an inseparable and very important part of the system.It is used for reading of values from inputs, calculate the effective values of voltage and current and power as well.
For experimental testing we make the prototype solution on the prototyping Arduino board.It is standard Atmel 8-bit family microprocessor.Arduino IDE has been used as the code development environment.

Structure of program consist of these main parts:
 importing the header files,  declaration and initialization of variables,  setting the initial parameters,  the main loop with sampling signals,  calculation of the one second effective value,  storing of calculated values in internal registers.

1) Importing the header files
Core libraries are used to operate the Atmel microprocessor are automatically imported in ARDUINO IDE environment.This depends on the fact which type of ARDUINO prototyping board we will use for the code compilation.Excluding this compilation we need to import the following libraries: #include <SPI.h>,#include <Ethernet.h>,SPI library is for communication via SPI bus, where are connected support modules for communication over the Ethernet.Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances.It can also be used for communication between two microcontrollers [11].
Ethernet library allows an Arduino board with the Arduino Ethernet Shield to connect to the internet.It can serve as either a server accepting incoming connections or a client making outgoing ones.The library supports up to four concurrent connection (incoming or outgoing or a combination).
Arduino communicates with the shield using the SPI bus.This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega.On both boards, pin 10 is used as SS.On the Mega, the hardware SS pin, 53, is not used to select the W5100 but it must be kept as an output or the SPI interface won't work [12].

2) Declaration and initialization of variables
It is important to initialize and declare the following variables: set the MAC address on Ethernet Shield byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; set the IP address, that will be configured on experimental IMS.

IPAddress ip(192,168,1,201);
setting the server that will be using for receiving measured data via Ethernet

i++;
The beginning of term after that time set by variable was achieved.

if(currentMillis -previousMillis > interval){
Calculation of mean value and the square root according to the equation ( 3) and (7).Subsequently we can use these values for calculating the active power or exporting the parameters of voltage and current.

5) Results from designed IMS
Electrical parameters that were read, calculated and described in previous chapters are exported to the remote places by means of existing networks.We can export values secondly to the storage system or we can use 15 minutes profile for exporting.For transferring of collected data we can choose any well-known technology such as PLC, GPRS, LAN or any other.It depends on the connected module to the designed IMS system.
If we do not convert the read values from A/D converter according to equations ( 3) and (7) we will have on the output of the microprocessor just sampling values in range from 0 to 1023.
We put these values of measurement of the load in to the graph On Fig. 5 where we have graph of real course of the measured current.The minimal term is that electricity meter must read at least 32 samples per one period.From graph it is possible to see that designed IMS device measure about 50 samples per one period of time and satisfy this term in full range.After applying the equation we have results with export of currents and voltage every second.These values we put into the table and make graph as on the Fig. 6.On the x axis of this graph there is sequential number of measurement from 1 up to 900 what is number of samples per 15 minutes.y axis is the effective value of measured voltage in volts.After analyse we decided that the voltage isn't constant but fluctuates under the value 250 V.This is a little higher voltage as usual what is caused by closeness of distributional transformer which make the voltage level higher.It is still considered as normal value in the range of 230V ± 10%, so the quality of electricity is ensured.The fluctuation of voltage is caused by the variable character of load in the power system.www.ijacsa.thesai.orgThe similar graph we can see on Fig. 7 which is constructed from values of current that were consumed by consumer equipment.The x-axis is the sequential number of measurement.We have 900 measurements and the y-axis is the effective value of current measured in amperes.It is possible to see that the fluctuation of current is more significant than voltage.While the voltage should be constant the current will be changing in dependence of what appliance is connected and consume the energy.There we can see that from the moment of measure 24 up to 257 is the increase about 8 amperes.We expect that one appliance was connected to the power system.The current of 8 amperes equals to the consumption of electric kettle.
The next figure shows the graph of active power calculated on one phase.On Fig. 8 we can see that graph which is similar than currents on one phase.The axis of x is sequential number of measurement from 1 up to 900 what is number of samples per 15 minutes.The axis y shows values of active power.The main measure unit of power is Watt.The last graph showed on Fig. 9 is the summary graph of exported 15 minutes values of power.The x-axis is sequential number of measurement and y-axis shows values of active power in Watt.There are only 10 values but every value characterize the duration of 15 minutes.The whole time of measurement showed there is two and half an hour.

IV. CALIBRATION AND TESTING OF THE IMS SYSTEM
In previous chapter was mentioned the calibration constant k i and k u .It is necessary to calculate these constants, after that to verify the calculation and store the result in the memory of microprocessor.This process is important when we want to have effective values calculated by IMS the same as real measured values.Constant k i depend on the values according the equation ( 17) where we have ratio from the A/D converter, part for calculation of the current flowing via the resistor according the Ohms law.Next one is transformation ratio of current transformer and the number of threads on the primary winding.In this experimental implementation there was used the current transformer with maximal measured current of 100 Amps.To decrease the range and increase the accuracy we put six threads on the core of the probe.

(17)
We can measure the value of R burden with millimetre.In this case the nominal value of itis 33 Ohms but the real value is 33,6 Ohms.For further calculations we will use this measured value of resistor.The next unknown value is the ratio of current transformer or current probe.The verification of nominal values on current sensors we can make by means of measuring the currents on any circuit where we need to use two different types of measuring devices of current and our designed current probe.Our probe must be connected to the constant load.With measuring voltage on this load we can calculate the current that is flowing through load according to Ohms law.So we can determine the ratio of primary winging of current transformer to the value that we had calculated.www.ijacsa.thesai.orgFrom the following table 1, where we have written values according to previous process we can calculate the ratio of current probe.Subsequently from the equation (18) we can determine the average ratio of transformers.
Constant k u was derived from the equation ( 19) where we have the ratio of A/D converter, the ratio of voltage divider according the equation ( 16) and the last part is proportion of nominal input and output values of voltage.

(19)
The ratio of A/D converter is given and precise defined by producer.The ratio of voltage divider was measured and confirmed that it isn't different from the nominal value.We need to verify whether the ratio of input and output winding of transformer is correct.We connect two resistors (10 and 10 kOhms) that are connected to the series on the output of the transformer.We will measure by means of two voltmeters.One will be connected to the input and the second one will be connected to the output.The output voltage will be increasing continuously.We will make 10 measurements with the range from 0 to 250 Volts and the results we will write to the table.From the table we calculate the arithmetic average of the proportioninput and output voltage.The nominal value is 19,166.Experimentally verified value is 19,41.The nominal value is different from the verified about 1,25%.K u we can quantify as the value 1,0424.The power source was designed to be continuously adjustable for the range 0 -250V 0-20A, in this way both values can be adjusted.From the power source is in series directly connected multimeter and analog pointer ampere meter.Subsequently, from these devices, is directly connected only the load.Oscilloscope and IMS have their own probes connected contactless but for better understanding on the Fig. 10 they are shown as connection to the series.
Measurement was processed according the table2: From measured values we can calculate coefficient k ix for increasing or decreasing constant k i .
According the equation (17) we can calculate the arithmetic average of the current ratio and measured on the IMS system.

∑ (20)
In this case is the value of coefficient k ix 1.2621833.When we look back for the constant k i which has been calculated from nominal value of the element, it has value of 0,042123.
From the table2 we can see that our IMS system measure a little smaller values as the lab equipment.We need to multiply the calibration constant k i with coefficient k ix to ensure the

Fig. 3 .
Fig.3.Scheme of electronics for voltage metering on phase 1[6] char server[] = "michal.kovalcik.s.cnl.sk"variable of Ethernet client type EthernetClient client; variable for resetting the memory of last connection boolean lastConnected = false the variable for counting the number of samples per unit of time int i = 0; variables that will store data from A/D converter int ii1 = 0, u = 0; variable for partial calculation of measured data float uuu=0; float iii1=0; variable for final calculation of measured data float napatie = 0 float prud1 = 0; calibration constant for conversion measured values prom microprocessor to the real effective values float ki = 0,053167; float ku = 1,085731; definition the time interval per one second long interval = 1000000; variable for counting the time long previousMillis = 0; 3) Setting the initial parameters and creation the necessary instance in the loop setup() Initialization the Ethernet library and the network settings Ethernet.begin(mac);Reading the time stamp www.ijacsa.thesai.orgpreviousMillis = micros(); 4) The main loop with signal sampling loop() Reading the time stamp before reading the first value of the sample.unsigned long currentMillis = micros(); Reading the first sample from A/D converter and saving it to the served samples.ii1 = analogRead(i1Pin); uu = analogRead(uPin); Summarization of reading values according the equation (3) and(7).iii1 = iii1 + sq((ii1-511.5)*ki);uuu = uuu + sq((uu-511.5)*ku);Increment of variable for calculation number of samples per time unit.
napatie = sqrt(uuu/i); prud1 = sqrt(iii1/i); Resetting and set the variables for further use in the loop () and finishing the term.Now we have values of measured electrical parameters per one second that are in registers (variables voltage and current).

Fig. 5 .
Fig. 5.The real course of the current

Fig. 6 .
Fig. 6.The graph of measured voltage on one phase

Fig. 7 .
Fig. 7.The graph of measured current on one phase

Fig. 8 .
Fig. 8.The graph of measured active power on one phase

Fig. 9 .
Fig. 9.The profile of one phase power in 15 minutes


Scheme of calibration circuit:

TABLE I .
MEASURING THE RATIO OF CURRENT TRANSFORMER