A tunnel magnetoresistive effect wattmeters-based wireless sensors network

A tunnel magnetoresistive effect wattmeters-based wireless sensors network

Accepted Manuscript Title: A Tunnel Magnetoresistive Effect Wattmeters-based Wireless Sensors Network Authors: S.I. Ravelo Arias, D. Ram´ırez Mu˜noz, ...

2MB Sizes 1 Downloads 29 Views

Accepted Manuscript Title: A Tunnel Magnetoresistive Effect Wattmeters-based Wireless Sensors Network Authors: S.I. Ravelo Arias, D. Ram´ırez Mu˜noz, J. S´anchez Moreno, S. Cardoso, P.P. Freitas PII: DOI: Reference:

S0924-4247(17)30456-9 http://dx.doi.org/doi:10.1016/j.sna.2017.07.056 SNA 10252

To appear in:

Sensors and Actuators A

Received date: Revised date: Accepted date:

17-3-2017 9-7-2017 31-7-2017

Please cite this article as: S.I.Ravelo Arias, D.Ram´ırez Mu˜noz, J.S´anchez Moreno, S.Cardoso, P.P.Freitas, A Tunnel Magnetoresistive Effect Wattmeters-based Wireless Sensors Network, Sensors and Actuators: A Physicalhttp://dx.doi.org/10.1016/j.sna.2017.07.056 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

1

Title page Title A Tunnel Magnetoresistive Effect Wattmeters-based Wireless Sensors Network

Authors and affiliations S. I. Ravelo Ariasa ([email protected]) D. Ramírez Muñoza (corresponding author, e-mail: [email protected], phone: #34963544035, fax: #34963544353). J. Sánchez Morenoa ([email protected]) S. Cardosob ([email protected]) P.P. Freitasb,c ([email protected])

aDepartment

of Electronic Engineering, University of Valencia, Avda. de la Universitat, s/n,

46100-Burjassot, Spain. bINESC

Microsystems and Nanotechnologies (INESC-MN) and Instituto Superior Tecnico,

University of Lisbon, R. Alves Redol 9, Lisbon 1000-029, Portugal. cINL-International

Iberian Nanotechnology Laboratory, Av. Mestre José Veiga, Braga 4715-31,

Portugal.

Highlights   

The use of tunnel magnetoresistive current sensors configured in Wheatstone bridge as analogue multipliers. The design of an analogue and digital acquisition system to extract different energy related measurands like active power, rms current or power factor. The design of a wireless sensor network to manage the power measurements and show in a web page the required information.

Abstract:

2

In the present work a wireless sensors network (WSN) for smart energy metering is presented using the ZigBee protocol as the communication link. Each network node process the electrical power by means of a Wheatstone bridge sensor based on the tunnel magnetoresistive (TMR) effect working as analogue multiplier. The electrical power is acquired and processed by a digital signal processor that extracts various parameters of interest like current and voltage load, active power and power factor by means of Fourier analysis. All the obtained electrical parameters at each node are served and shown in a web page that can be easily accessed by authorized users.

Keywords: Tunnel magnetoresistance, current sensor, analogue multiplier, power measurement, wattmeter, sensor network.

1 Introduction Nowadays, users at home or small and medium companies know their energy consumption once the bill from distribution enterprise arrives throughout post or electronic messages. The received information may be an estimate or an actual reading provided by the energy meter but with some degree of random periodicity. Moreover, it is not possible to distinguish the origin of the consumption (electric loads like motors, fans, air conditioners, induction cookers, etc.) and then without opportunity to manage or optimize it. Today, the presence of electronic energy meters is growing-up in industrial or domestic environments [1]. Last generation meters not only provide bill information but also specific measurements about active and reactive power consumption, power factor, rms voltage and current, line frequency or total harmonic distortion, [2-3]. This set of information could be the deciding factor to replace a domestic or industrial load working well but consuming excessive energy. An optimal energy management actually needs to consider both economical expenses and also environmental impact. In Spain, data

3

corresponding to 2015 revealed an average ratio between gas emissions and electrical energy consumption of 0.236 kg/kWh of CO2, 0.536 g/kWh of SO2 and 0.368 g/kWh of NO2-NO3, [4]. Recent electronic instrumentation technologies and mixed signal processors contribute to control and reduce the amount of gas emissions related to the electricity energy consumption. To get this objective WSN became for smart metering the best communication technique with respect to cellular network communication, broadband internet or power line communication. WSN offer license free frequency bands, virtually zero operation costs or good transmission through concrete walls, [5-6]. It offers not only benefits to the energy companies like reduction of personnel for meter reading, errors elimination in reading or reduction in fuel and maintenance costs but also at the customer side (energy savings, lowered bill or payment of electricity at convenience), [7]. Specifically, WSN for smart metering based on ZigBee devices offer an improved performance of data collecting systems, [8-10]. Using specific energy electronic processors various technologies have been reported, [10-13]. Generic purpose digital signal processors have demonstrated its performance for smart metering objectives like field programmable gate arrays (FPGA) developments [14] or digital signal processors (DSP) designs, [15]. Current sensing methods based on resistive shunts or current transformers were described due to its wide use and simplicity, [10-12,16] in spite of their power dissipation or limitations originating from their bulky size. Recently spintronic sensors provided advantageous solutions for a wide range of applications in the scientific, industrial or biomedical areas, [17]. Magnetoresistive (MR) sensors based on magnetic multilayers have been developed and applied to measure electrical current in a large number of situations. For metering purposes it is mandatory to process both the current circulating through the load and the line voltage. Many developments used resistive shunts, current transformers, MR current sensors and resistive voltage dividers to process separately electrical current and line voltage as front-end conditioners for smart meters, [10-14,16]. Usually, MR current sensors are implemented as a resistive Wheatstone bridge, this topology has the benefit to work as an analogue multiplier

4

when considering the electrical current as the measurand of the MR sensor and the supply voltage across the bridge. Various works have been described to measure active power in the mW range, [18] or in the kW range [19-20]. The use of a Wheatstone bridge as analogue multiplier implies to process in the same electrical signal (i. e., the bridge output voltage) the instantaneous power delivered to the load. This fact will demand the use of some type of digital processors different from smart energy meters because they are designed to process current and voltage in separated channels. In the present work a WSN for smart energy metering is presented using the ZigBee protocol as the communication link. Each network node processes the electrical power by means of a Wheatstone bridge sensor based on the TMR effect working as analogue multiplier, [17,21]. The electrical power is acquired and processed by a digital signal processor that extracts various parameters of interest like current and voltage load, active power and power factor by means of Fourier analysis. All the obtained electrical parameters at each node are served and shown in a web page that can be easily accessed by authorized users. The proposed development is a clear example of how MR technology and spintronics based materials find applicability in our nearest environment. II.- Power measurement method The power measurement method used in this work is based on the ability existing in the Wheatstone bridge to work as an analogue multiplier. Figure 1 shows a schematic connection of the MR sensor bridge to process instantaneous electrical power from mains supply. The bridge is constituted by four resistors based on the TMR effect as described in [22]. Their effective values change linearly with the magnetic field generated by the current to be measured, in that case, the current i(t) circulating through the load. The bridge is designed in such a way that resistors MR1 and MR3 change their resistance in the same magnitude but in opposite direction that resistors MR2 and MR4, [21, 23-25]. At the same time due to the sensor bridge can not support the entire mains voltage v(t), two fixed k resistors were added to attenuate the voltage drop across the bridge. With that arrangement voltage vo(t) at the output

5

of the bridge will be linearly dependent with the instantaneous product v(t) i(t) delivered to the load. The output voltage vo(t) will be given by the expression: 𝑣0 (𝑡) = 𝐴 𝑣(𝑡) [𝑆̅ 𝑖(𝑡) + 𝑉̅𝑜𝑓𝑓 ]

(1)

where A is the attenuation factor associated to the voltage divider network R-RB, RB being the equivalent input resistance of the bridge. Thanks to the opposite variation in value of resistances MR1 and MR3 with respect to MR2 and MR4 the bridge input resistance RB dos not change with current and the attenuation factor of the voltage divider can be considered constant in order to know line voltage amplitude Vm. The quantities S and Voff are respectively the sensitivity and the output offset voltage of the sensor bridge normalized with respect to bridge supply voltage. They units are [𝑆] = 𝑚𝑉/𝑉 𝐴 and [𝑉𝑜𝑓𝑓 ] = 𝑚𝑉/𝑉. Considering line voltage as a sine wave 𝑣(𝑡) = 𝑉𝑚 𝑠𝑖𝑛(𝜔𝑜 𝑡) and the current circulating across the load shifted a certain angle  with respect to line voltage, i(t) = Im ∙ sin(𝜔𝑜 t + φ) then the bridge output voltage vo(t), can be written as: 𝑣0 (𝑡) = 𝐴 𝑉𝑚 𝑠𝑖𝑛(𝜔𝑜 𝑡) [𝑆̅ 𝐼𝑚 𝑠𝑖𝑛(𝜔𝑜 𝑡 + 𝜑) + 𝑉̅𝑜𝑓𝑓 ]

(2)

and using some trigonometric formulae it could be obtained: 𝑣𝑂 (𝑡) =

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 2

𝑐𝑜𝑠 𝜑 −

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 2

𝑐𝑜𝑠(2 𝜔𝑜 𝑡 + 𝜑) + 𝐴 𝑉̅𝑜𝑓𝑓 𝑉𝑚 𝑠𝑖𝑛(𝜔𝑜 𝑡).

(3)

This expression states that output voltage vo(t) is made up of three components. The first one is a constant DC term with no time dependence, the last ones have time dependence, the 2𝜔𝑜 and 𝜔𝑜 harmonics. With the aim to have the maximum knowledge of the electrical quantities associated to the load (i.e., power, load current, line voltage and power factor), it is more convenient to process the above three components in the Fourier transform domain. In that way, be Vo() the Fourier transform of the bridge output voltage vo(t): 𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚

𝑉𝑜 (𝜔) ≡ 𝔽{𝑣0 (𝑡)} = 𝔽 {

2

𝑐𝑜𝑠 𝜑 −

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 2

𝑐𝑜𝑠(2 𝜔𝑜 𝑡 + 𝜑) + 𝐴 𝑉̅𝑜𝑓𝑓 𝑉𝑚 𝑠𝑖𝑛 (𝜔𝑜 𝑡)}.

(4)

If the sine and cosine Fourier transforms are considered and taking into account its linearity property, Vo() could be expressed in the form: 𝑉𝑜 (𝜔) =

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 2

𝑐𝑜𝑠 𝜑 𝛿(𝜔) − [

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 2

𝑒 −𝑗𝜔𝜑

𝛿(𝜔+2𝜔𝑜 ) 2

+

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 2

𝑒 −𝑗𝜔𝜑

𝛿(𝜔−2𝜔𝑜 ) 2

]+

(5)

6

𝑗𝛿(𝜔+𝜔𝑜 ) 𝑗𝛿(𝜔−𝜔𝑜 ) [𝐴 𝑉̅𝑜𝑓𝑓 𝑉𝑚 − 𝐴 𝑉̅𝑜𝑓𝑓 𝑉𝑚 ] 2 2

where () is the delta function. Considering the norm (magnitude) of Vo() it is possible to consider its dependence on the magnitude of the three DC, 𝜔𝑜 and 2𝜔𝑜 components. ‖Vo (ω)‖ A S̅ Im Vm A S̅ Im Vm −jωφ δ(ω + 2𝜔𝑜 ) A S̅ Im Vm −jwφ δ(ω − 2𝜔𝑜 ) =‖ cos φ‖ δ(ω) + [‖− e ‖ + ‖− e ‖] 2 2 2 2 2 jδ(ω + 𝜔𝑜 ) jδ(ω − 𝜔𝑜 ) ̅off Vm ̅off Vm + [‖A V ‖ + ‖−A V ‖]. 2 2

(6)

Be K1 the DC component of Vo() in the frequency domain: 𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚

𝐾1 ≡ ‖

2

𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚

𝑐𝑜𝑠 𝜑‖ = ‖

2

‖ ‖𝑐𝑜𝑠 𝜑‖,

(7)

K2 the magnitude of the 𝜔𝑜 component: 𝐾2 ≡

̅𝑜𝑓𝑓 𝑉𝑚 ‖ ‖𝐴 𝑉 2

,

(8)

and K3 the magnitude of the 2𝜔𝑜 component: 𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 −𝑗𝜔𝜑 𝛿(𝜔 + 2𝜔0 ) 𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 1 𝐴 𝑆̅ 𝐼𝑚 𝑉𝑚 𝑒 ‖=‖ ‖=‖ ‖ 2 2 2 2 4

𝐾3 ≡ ‖

(9)

The quantities K1, K2 and K3 are known by digital signal processing the bridge output voltage vo(t) in the Fourier transform domain. Line voltage amplitude Vm could be measured from the voltage drop existing at the lower resistance of the R-RB-R voltage divider being RB the bridge input equivalent resistance. Therefore, the load current amplitude Im could be obtained from K3 (equation 9): ‖𝐼𝑚 ‖ = ‖

4 𝐾3

𝐴 𝑆̅ 𝑉𝑚

‖,

(10)

and the power factor from K1 and K3 (equations 7 and 9): ‖cos 𝜑‖ =

𝐾1 2 𝐾3

.

(11)

Using the magnitude values of line voltage Vm, load current Im and power factor cos  it is possible to know the three power components associated to the load, apparent, S, reactive Q and active power, P:

7

‖Apparent power (S)‖ = ‖𝑉𝑚 ‖ ‖𝐼𝑚 ‖

(12)

‖Active power (P)‖ = ‖𝑉𝑚 ‖ ‖𝐼𝑚 ‖ cos 𝜑

(13)

‖Reactive power (Q)‖ = ‖𝑉𝑚 ‖ ‖𝐼𝑚 ‖ sin 𝜑.

(14)

III.- Smart MR wattmeter design Based on the above mentioned power measurement method a MR wattmeter has been designed using analogue and digital processing building blocks. Additionally a software was implemented to support the discrete Fourier transform needed to process the bridge output voltage vo(t).

a) Hardware organization Figure 2 shows the signal conditioning and data acquisition parts designed. All the hardware and software algorithms are valid for both 50 Hz and 60 Hz line frequencies. MR bridge output voltage vo(t) is conditioned by the programmable gain instrumentation amplifier PGA280 (Texas Instruments). This block has 22 possible gain values allowing to accomodate vo(t) to the fullscale input of the analogue-to-digital converter (ADC). Line voltage v(t) is monitored taking a fraction of it by the instrumentation amplifier INA128 (Texas Instruments) configured with a 3.35 gain and using a resistive voltage divider (R-R) with the MR bridge. Both instrumentation amplifiers share the same reference voltage Vref = 2.5 V. The outputs of the instrumentation amplifiers are acquired by the digital signal controller (model dsPIC30f6014a from Microchip) digitizing their voltages with its internal 12-bits resolution ADC. The controller selects the gain of the PGA280, it supports the discrete Fourier transform algorithms to obtain K1, K2 and K3 components of vo(t) and provides data to eventual host computer.

b) Digital signal processing

8

Figure 3 shows an example of the signal acquired by the ADC of the digital signal controller. That case corresponds to a 60 Hz, 110 Vrms line voltage, 10 Arms load current and with a phase shift of 15. A 9600 Hz sampling frequency has been used with the goal to do subsequent subsamplings valid for both 50 Hz and 60 Hz line frequencies. To recover the magnitude of the DC, 𝜔𝑜 and 2𝜔𝑜 harmonics of interest the 9600 Hz sampled signal is sub-sampled at 1600 Hz or 1920 Hz depending on whether the line frequency will be 50 Hz or 60 Hz respectively. After that, a rectangular window is applied to the samples and then a digital algorithm implemented in the dsPIC performs the discrete Fourier transform (DFT) to obtain K1, K2 and K3 components. Particularly in this development a frequency decimation algorithm rather than time decimation was used because no bit reverse steps were needed obtaining thus shorter processing times. Figure 4 summarizes the processing steps implemented in the digital signal controller. Figure 5 shows the case of a signal with 60 Hz and 120 Hz components sub-sampled at 1920 Hz in the time domain and its harmonics as a result of a digital signal processing as described in Fig. 5. Therein it is possible to easily discriminate the DC, fo and 2fo harmonics with a relative magnitude of 1 and 2 respectively.

If the signal is not sub-sampled at the correct frequency the fo and 2fo harmonics will have less normalized magnitude than the expected one of 0.5 and a substantial amplitude of other harmonics scattered around fo and 2fo will be present. Fig. 6 shows this behaviour when a 60 Hz signal is sub-sampled at the inappropriate frequency of 1600 Hz. This fact would be used to detect what line frequency is processed: if the sub-sampling frequencies are matched (50 Hz with 1600 Hz and 60 Hz with 1920 Hz) the harmonic amplitudes are greater than a non-matched sub-sampling (60 Hz with 1600 Hz and 50 Hz with 1920 Hz).

9

A 32 bits IEEE-754 format was used to represent numbers and make calculus inside the dsPIC. This choice was the result of comparing the representation of the DC, fo and 2fo components amplitudes of that format and the Matlab numbers representation (double-precision floating point, 64 bits with 52 fraction bits). Considering this one as the reference, a 0.002% maximum relative deviation was obtained with the IEEE-754 choice. At the time to calculate the discrete Fourier transform (frequency decimation with 128 points and 32 bits) the usage of intermediate variables and constants was optimized to get the maximum free memory. Additionally a time optimization was done to make calculus routines and program interrupts (carrying the sampling process) compatible. Figure 7 shows the program and data memory distributions after optimization using an utility tool provided by the dsPIC software.

c) Adjusting process Once the MR wattmeter was designed as in its hardware organization as in their processing routines it was submitted to several load conditions to validate the instrument. Figure 8 shows the experimental set-up used. Combining a two outputs voltage signal generator (Agilent 33522A) and a transconductance converter (Krohn-Hite PCS2B) a variable phase-shift was generated between voltage and current to produce different power loads conditions.

Figure 9 a) and b) show respectively after and adjusting and calibration process, the comparison of rms current and phase-difference between voltage and current. Both figures were obtained from the readings supplied by the processing algorithms from the experimental set-up with respect to the readings measured by the reference wattmeter (Xitron 2551). Particularly a total amount of 72 acquisitions were taken in Fig. 9.b) sweeping the phase from 0 o to 360o in steps of 5o. d) Distributed MR-wattmeter network Hardware and software algorithms presented in the previous section were the starting point to design and implement a MR-wattmeter sensors network. A ZigBee protocol was chosen as the communication channel supported by the Digi XBee series 2 modules improving in range,

10

power consumption and development tools the previous series. Figure 10.a) shows the XBee module used to support the ZigBee protocol. Four MR wattmeters were configured as routers and slaves based on attention (AT) commands and an additional one as AT coordinator and master. Figure 11 shows the network structure and its communication protocols. Also the master node was configured to support a Wi-Fi link working in access point mode and as a web server allowing to provide the required information using an html page. In that way different Wi-Fi supporting devices like tablets, computers or mobile phones can access and show the power measurements loading the network web page. Master and slaves nodes were organized in a mesh topology allowing the messages to travel over multiple paths (multi hop). The slave nodes work as routers and if someone fails the information will be automatically re-routed, in other case if a new node is added the network would acknowledge and reconfigure its structure. In the present development a maximum of three hops between message sender and recipient were designed corresponding to the worst case of a straight line placement between them. Table I shows the software commands supported by the network that were designed to pass messages and request data between nodes. Concerning the Wi-Fi protocol a hardware module was implemented only in the coordinator with the purpose to serve the information coming from the network to authorized external users. Figure 10.b) shows the module used to support the Wi-Fi protocol (part MRF24WG0MA/B from Microchip). This module could be interfaced directly with computers supporting OS X, Windows and Linux operating systems and in different mobile phones and tablets with Android or Symbian. The security aspects can be configured as Wired Equivalent Privacy (WEP) or Wi-Fi protected Access 2 (WPA2) algorithms. Figure 12 shows the hardware structure of slaves and master nodes. Each one takes its own measurements and process them by the DSP algorithms described in section III.b saving the results in the dsPIC. Also the digital signal controller performs acquisition and data processing routines like gain control and linear regression. Additionally a PIC32-based microcontroller

11

(PIC32mx795f512l) requests data from the dsPIC and sends them if needed by the coordinator using the ZigBee protocol. The files containing the communication protocols were first written in HTML2 language and finally compiled in MPFS2 Microchip proprietary format. That was needed to satisfy the TCP-IP protocol of a web server and the requirements working as a client with wireless connectivity supporting 802.11b and 802.11g standards. The dsPIC internal memory of each node was used to save the calibration parameters and gains associated to each sensor and signal conditioning electronics. The coordinator node has an external EEPROM memory that was needed to support the data and code of the web page because the PIC32 internal memory was not enough. The web page was developed in html code supporting cascading style sheet (CSS) descriptors and javascripts. Once compiled it was compressed into a .bin file to be loaded into the device. The data circulating between the web page and device memory were linked by dynamic variables inserted into the web page code (html) and the C code of the programmed device. The variables defined in the page capture the information arrived at the coordinator from the network and will display it as tables or graphics. Figure 13 shows one web page display including active and apparent powers measured by five wattmeter nodes. IV.- Experimental measurement and discussion Experimental results were obtained varying the effective value of the load and its reactive component. Figure 14 a), b) and c) include respectively current, power factor and active power acquired by the coordinator node and measured by one of the four remote wattmeters of the network. Experimental results were taken varying the load in its real and imaginary parts. The obtained accuracy were better than 2%, 1.5% and 2% for current, power factor and active power respectively. One factor involving the accuracy was the existence of some variability degree in the electrical parameters like offset or sensitivity between the five MR sensors of the network. Some uncertainty in wafer rotation at the micro-fabrication time will lead to a slight misalignment between the four MR resistors of the bridge causing different output offset voltages.

12

Additionally, the distance between U-copper trace and sensor die depends strongly with the volume of adhesive used to attach them into the PCB causing variations in the sensors sensitivity. Thus an improvement in repeatability would be reached following industrial production processes. The work shows the feasibility of the MR Wheatstone bridge to work as analogue multiplier. The subsequent digital signal processing of its output will facilitate extracting the electrical parameters of interest for a domestic or industrial application. The web page designed and supported by the coordinator node would be reduced in memory cost. If a future design would be needed a possible solution to reduce its size will be the use of html5 language. To balance network interoperability and server speed a maximum of three Wi-Fi clients was accepted. The Figure 15 shows how a MR wattmeter node can be arranged in an actual prototype.

Acknowledgements This work was supported in part by the Spanish Ministry of Economics and Competitivity and European Fund of Regional Development (FEDER) [grant ESP2015-68117-C2-1-R (MINECO/FEDER)]; the Consejo Nacional de Ciencia y Tecnología (CONACYT México) [grant 217152-312630]; and INESC-MN acknowledges Fundação para a Ciência e a Tecnologia (FCT) funding through the Instituto de Nanociência e Nanotecnologia (IN) Associated Laboratory.

13

References [1] R. Cáceres, R. Correa, P. Ferreyra, E. Cordero, Study of Active Electric Energy Meters Behavior of Induction and Electronic Types, Transmission & Distribution Conference and Exposition: Latin America, 2006. TDC '06. Aug. 2006, pp. 1-6. [2] J. B. Hoover, The changing world of power monitoring, 22nd International Telecommunications Energy Conference, INTELEC, pp. 103-108, Dresden (Germany), 10-14 Sept. 2000. [3] A. Dede, D. Della Giustina, S. Rinaldi, P. Ferrari, A. Flammini, A. Vezzoli, Smart Meters as Part of a Sensor Network for Monitoring the Low Voltage Grid
 Source, 2015 IEEE Sensors Applications Symposium (SAS), 276-281, April 13-15, Croatia, 2015
 . [4] World Wildlife Fund Spain, Electricity observatory, May 2016, www.wwf.es [5] A. Weigel, C. Renner, V. Turau, Ernst, H. Wireless Sensor Networks for Smart Metering, 2014 IEEE International Energy Conference (ENERGYCON), 722-729, May 13-16, 2014, Dubrovnik, Croatia. [6] W. Boonsong, W. Ismail, Wireless Monitoring of Household Electrical Power Meter Using Embedded RFID with Wireless Sensor Network Platform, International Journal of Distributed Sensor Networks, 876914, 2014. [7] O. M. Longe, K. Ouahada, H. C. Ferreira, S. Rimer, Wireless Sensor Networks and Advanced Metering Infrastructure Deployment in Smart Grid, 5th EAI International Conference on e-Infrastructure and e-Services for Developing Countries (AFRICOMM), Nov 25-27, 2013, Blantyre, Malawi. [8] Z. T. Lin, J. Zheng, Y. S. Ji, B. H. Zhao,Y. G. Qu, X. D. Huang, X. F. Jiang, EMMNet: Sensor Networking for Electricity Meter Monitoring, Sensors
 10, 7, 6307-6323, Jul, 2010. [9] H. Y. Tung, K. F. Tsang, K. L. Lam,
 ZigBee Sensor Network for Advanced Metering Infrastructure, IEEE International Conference on Consumer Electronics, Digest of Technical Paper, Jan 09-13, 2010, Las Vegas, NV. [10] L. F. C. Duarte, J. D. Zambianco, D. Airoldi, E. C. Ferreira, J. A. S. Dias, Sensor network for energy-efficiency programs: characterization and breakdown of the electricity bill using custom wireless smart meters, International Conference on Circuits, Systems, Signals, 262-265, Sep 15-17, 2010, Malta. [11] R. Morales, F. J. Badesa, N. García-Aracil, C. Pérez-Vidal, J. M. Sabater, Distributed Smart Device for Monitoring, Control and Management of Electricity Loads in Domotic Environments, Sensors 2012, 12, 5212-5224. [12] K. S. K. Weranga, D. P. Chandima, S. P. Kumarawadu, Smart Metering for Next Generation Energy Efficiency & Conservation, Innovative smart grid technologies-Asia (ISGTASIA), 21-24 May 2012, Tianjin, China. [13] D. Ramírez, D. Moro, J. Sánchez, E. Castro, Design and experimental verification of an intelligent sensor to measure the energy consumption in a one-phase AC line, Measurement 2009, 42, 412-419.

14

[14] F. Xie, R. Weiss, R. Weigel, Giant-Magnetoresistance-Based Galvanically Isolated Voltage and Current Measurements,
 IEEE Transactions on Instrumentation and Measurement 2015, 64, 8, 2048-2054. [15] Y. Ouyang, J. L. He, J. Hu, S. X. Wang, A Current Sensor Based on the Giant Magnetoresistance Effect: Design and Potential Smart Grid Applications, Sensors
 2012, 12,
 11, 15520-15541. [16] R. G. Zhou, G. L. Xing, Nemo: A High-fidelity Noninvasive Power Meter System for Wireless Sensor Networks, 2013 ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN), 141-152, Apr 08-11, 2013, Philadelphia, PA. [17] P. P. Freitas, R. Ferreira, S. Cardoso, Spintronic Sensors, Proceedings of the IEEE 2016, 104, 10, 1894-1918. [18] M. Vopálensky, A. Platil, P. Kaspar, Wattmeter with AMR sensor, Sensors and Actuators A 2005, 123-124, 303-307. [19] D. Ramírez, J. Sánchez, S. Casans, A. E. Navarro, Active power analog front-end based on a Wheatstone-type magnetoresistive sensor, Sensors & Actuators A 2011, 169, 83-88. [20] D. Ramírez, J. Sánchez, P. P. Freitas, S. Cardoso, Device and smart measurement system for electric power by magnetoresistance, Patent P201331141, 2013. [21] J. Sánchez, D. Ramírez, S. Ravelo, A. Lopes, S. Cardoso, R. Ferreira, P. P. Freitas, Electrical Characterization of a Magnetic Tunnel Junction Current Current Sensor for Industrial Applications, IEEE Transactions on Magnetics 2012, 48, 11, 2823-2826. [22] S. Ravelo, D. Ramírez, S. Cardoso, R. Ferreira, P. P. Freitas, Total ionizing dose (TID) evaluation of magnetic tunnel junction (MTJ) current sensors, Sensors & Actuators A 2015, 225, 119-127. [23] S. Ikeda, J. Hayakawa, Y. Ashizawa, Y. M. Lee, K. Miura, H. Hasegawa, M. Tsunoda, F. Matsukura, H. Ohno, Tunnel magnetoresistance of 604% at 300 K by suppression of Ta diffusion in CoFeB/MgO/CoFeB pseudo-spin-valves annealed at high temperature, Appl. Phys. Lett. 2008, 93, 082508. [24] P. P. Freitas, R. Ferreira, S. Cardoso, F. Cardoso, Magnetoresistive sensors, J. Phys. Condens. Matter. 2007, 19, 165221. [25] A. Lopes, S. Cardoso, R. Ferreira, E. Paz, L. Francis, J. Sánchez, D. Ramírez, S. Ravelo, P. P. Freitas, MgO Magnetic Tunnel Junction Electrical Current Sensor with Integrated Ru Thermal Sensor, Proceedings of the 12th Joint MMM/Intermag Conference, Chicago, IL, 14-18 January 2013. [26] XBEE/RF solutions, http://www.digi.com/products/xbee-rf-solutions (accessed 08.03.17). [27] IEEE 802.11 b/g Wi-Fi radio transceiver module, http://www.microchip.com/wwwproducts/Devices.aspx?product=MRF24WG0MA (accessed 08.03.17).

15

Sergio I. Ravelo Arias was born in Mexico DF, Mexico, 1985. He is graduated in Communications and Electronics and MSc in Bioelectronics from the Center of Research and Advanced Studies, Mexico in 2007 and 2010 respectively. Since 2015 he has the PhD degree in Electronic Engineering from the University of Valencia. His research interests are involved in the field of electronic instrumentation, sensors characterization and the design of microprocessors based measurements systems in particular, the design and characterization of interface circuits for magnetoresistive sensors. Diego Ramírez Muñoz received the M. Sc. and Ph. D. degrees in Physics from the University of Valencia, Spain, in 1986 and 1995, respectively. He is currently Professor of Electronic Instrumentation in the Electronic Engineering Department at the University of Valencia. In this institution he is teaching since 1986 and he founded the Instrumentation and Measurement Systems Division in 1996. His interests are focused on analog signal processing, network theory, sensors electronic interfaces and industrial applications based in magnetoresistive sensing techniques. He belongs to IEEE since 1990 developing activities as a referee in several indexed journals and international conferences. Susana Cardoso (born in 1973) received her Ph.D. degree from Instituto Superior Técnico (Lisbon) in 2002 and is an Associated Professor at the Physics Dep. (IST-Lisbon) and Senior Researcher at INESC-MN, being co-responsible for the Spintronics research group. Her research interests are ion beam deposition of thin films and magnetoresistive materials on 150 mm wafers for sensor and memory applications. She coordinated 4 national projects, managed the INESC-MN participation in 3 Marie-Curie RTN, and has been involved in several EU projects. She is co-author of over 250 publications.

Jaime Sánchez Moreno was born in Valencia, Spain, 1977. He received the BSc degree in telecommunications electronic engineering and the MSc in electronic engineering from the University of Valencia, Spain in 2000 and 2003 respectively. In 2013 he won the PhD degree in electronic engineering at University of Valencia with honors. Now he is an assistance professor at the Electronic Engineering Department of the same university. His research interests are in the field of electronic instrumentation, in particular, the design and characterization of interface circuits for magnetoresistive sensors. Paulo P. Freitas (born in 1958) received his Ph.D. in Condensed Matter Physics from Carnegie Mellon University in 1986. His thesis topic involved the study of the magnetoresistive properties of Co–Fe alloys and thin film multilayers. Between 1986 and 1988 he was an IBM post-doctoral fellow at IBM Yorktown Heights. He has been a Full Professor at the Physics Dep. (IST-Lisbon)

16

until 2013 and also the Director of INESC-MN and co-responsible for the Spintronics research group. Since 2010 is Deputy Director General of the International Iberian Nanotechnology Laboratory in Braga, Portugal. His current research interests include spintronic devices, biosensors and lab-on-chip-devices, and new types of microelectrode arrays for neuroscience applications. He has participated/coordinated 25 national and 14 EU projects related with spintronics. He is co-author of over 400 publications, and has been advisor of 18 Ph. D. students.

17 Fig. 1. Electrical power sensing principle using a MR Wheatstone bridge. Fig. 2 Hardware organization of the smart MR wattmeter. Fig. 3 60 Hz, 110 Vrms line voltage acquired and digitized by the 12-bits ADC of the dsPIC controller. Fig. 4. Signal processing routines done by the digital signal controller. Fig. 5. 60 Hz line voltage sub-sampled at 1920 Hz in the time domain and its harmonics. Fig. 6. 60 Hz line voltage sub-sampled at 1600 Hz in the time domain and its harmonics. Fig. 7. Memory distribution of the final program in the dsPIC30f6014A. Fig. 8. Variable phase shift generation between voltage and current using a two outputs waveform generator (Agilent 33522A) and a transconductance amplifier (Krohn-Hite PCS2B).

Fig. 9. Comparison between the experimental set-up and the reference wattmeter: a) expected and measured rms current, b) normalized phase-difference between voltage and current (expected and measured).

Fig. 10. a) Digi XBee series 2 communication module, [26] and b) Microchip Wi-Fi communication module, [27].

Fig. 11. Wattmeter network structure and its communication protocols.

Fig. 12. Master and slave nodes structure.

Fig. 13. Power measurements shown at the main web page.

Fig. 14. a) rms current, b) power factor and c) active power readings acquired by the coordinator and measured by one wattmeter of the network.

Fig. 15. MR wattmeter prototype node.

18 Table I.- Commands defined in the network to acknowledge and request data by the nodes. Node 1 Command

Node 2

Node 3

Node 4

Command

Command

Command

Identity

@1?

@2?

@3?

@4?

Frequency

@1F

@2F

@3F

@4F

@1P

@1P

@1P

@1P

@1T

@2T

@3T

@4T

@1R

@2R

@3R

@4R

@1A

@2A

@3A

@4A

Voltage

@1V

@2V

@3V

@4V

Current

@1C

@2C

@3C

@4C

Buffer

@1D

@2D

@3D

@4D

Power factor Apparent power Active power Reactive power

Description

Node number (1 to 4) Line frequency (50 or 60 Hz) Power factor (0.0 to 1.0) floating format Apparent power (floating format) Active power (floating format) Reactive power (floating format) Line voltage (floating format) Current load (floating format) Working buffer carrying all the above information (floating format)