Research Article International Journal of Distributed Sensor Networks 2017, Vol. 13(3) � The Author(s) 2017 DOI: 10.1177/1550147716685423 journals.sagepub.com/home/ijdsn Measurement of the electric energy storage capacity in solar thermoelectric generators’ energy harvesting modules Pedro C Dias1,2, Flávio JO Morais3, Luis FC Duarte4, Maria Bernadete M Francxa1, Anderson W Spengler5 and Andreu Cabot6 Abstract Reducing energy consumption is mandatory in self-powered sensor nodes of wireless sensor networks that obtain all their energy from the environment. In this direction, one first step to optimize the network is to accurately measure the total energy harvested, which will determine the power available for sensor consumption. We present here a technique based on an embedded circuit with an ultra-low-power microcontroller to accurately measure the efficiency of flat-panel solar thermoelectric generators operating with environmental temperature gradients. Experimental tests showed that when a voltage of 180 mV (best case in an environmental flat-panel solar thermoelectric generators) is applied to the input of the DC–DC converter, the proposed technique eliminates a measurement error of 33% when compared with the conventional single supercapacitor strategy. Keywords Energy harvesting, autonomous sensor networks, DC–DC converters, thermoelectric modules, energy measurement Date received: 16 April 2016; accepted: 10 August 2016 Academic Editor: Gennaro Boggia Introduction Energy harvesting systems based on flat-panel solar thermoelectric generators (STEGs) are an excellent green and sustainable alternative for powering environ- mental sensor networks. The monitoring or detection of environmental parameters for precision agriculture,1–3 monitoring of water quality in remote water sources,4 pollution in remote locations,5 water leaks in pipelines,6 and fire in forests7,8 are examples with a clear socioeco- nomic interest where environmental sensor networks are required. Self-powered environmental sensors must obtain all the energy required for their operation from the envi- ronment, which requires minimizing energy consump- tion by optimizing the network operation, developing low-voltage systems,9 and reducing the power required by the energy consumption of the sensor nodes.10–12 Because most harvesters do not harvest energy 1DAELE - Department of Electronics, Federal University of Technology – Paraná, Cornélio Procópio, Brazil 2Department of Semiconductors, Instruments and Photonics, School of Electrical and Computer Engineering, University of Campinas, Campinas, Brazil 3Faculty of Sciences and Engineering, UNESP, Tupã, Brazil 4Department of Electrical Engineering, State University of Londrina, Londrina, Brazil 5Federal University of Santa Catarina, Joinville, Brazil 6Catalonia Institute for Energy Research (IREC) and the Institució Catalana de Recerca i Estudis Avancxats (ICREA), Barcelona, Spain Corresponding author: Pedro C Dias, DAELE - Department of Electronics, Federal University of Technology – Paraná, Cornélio Procópio 86300-000, Brazil. Email: pcdias@utfpr.edu.br Creative Commons CC-BY: This article is distributed under the terms of the Creative Commons Attribution 3.0 License (http://www.creativecommons.org/licenses/by/3.0/) which permits any use, reproduction and distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (http://www.uk.sagepub.com/aboutus/ openaccess.htm). https://doi.dox.org/10.1177/1550147716685423 https://journals.sagepub.com/home/ijdsn http://crossmark.crossref.org/dialog/?doi=10.1177%2F1550147716685423&domain=pdf&date_stamp=2017-03-14 continuously, but only during certain periods of time, such as when solar radiation is available in the case of STEGs, autonomous networks must rely on the energy surplus stored in a supercapacitor during the harvesting period.13 Thus, to optimize the network parameters and to specify the power consumption of the sensor systems when powered by such energy harvesting systems, an accurate evaluation of the energy conversion module is required. This evaluation involves obtaining experimen- tal data concerning the amount of electrical energy that can be stored by the energy harvesting system. In this work, we present a measurement circuit that, when connected to a DC–DC converter powered by a STEG, can measure the total thermal energy converted to electricity and stored in the supercapacitor. This con- version is continuously monitored by a mixed signal cir- cuit with a low-power microcontroller. A simple Rx-Tx interface of the microcontroller communicates with a secure digital card (SD card) controller board, which records the measured data of the supercapacitor’s vol- tage with its relative timestamps. The values recorded in the SD card are analyzed in a PC, and the value of the electrical energy that the DC– DC converter was able to store in the supercapacitor is then accurately calculated. The circuit also provides an analog input for a solar radiation sensor, so the effi- ciency of the electrical energy conversion can be corre- lated to solar radiation incident on the STEG. STEG with DC–DC converters TEGs operating with environmental temperature gradients Thermoelectric energy harvesting circuits operating from environmental temperature gradients, such as the flat-panel STEGs, require the use of a DC–DC conver- ter that can operate with very low voltages, since maxi- mum open-circuit output voltages generated are Voc ’ 770 mV. This corresponds to a TEG containing 254 high-performance couples with a Seebeck coeffi- cient of 110 mV/8C and a maximum temperature differ- ence between the hot and cold sides of about DT = 78C.13 Besides, under ideal matched load condi- tions, only 50% of this Voc is available to the load and, as an example, on a sunny day, where the temperature of the solar flat-panel reaches T = 448C, the maximum voltage measured at the loaded TEG with a DC–DC converter is only 185 mV.14 Switching step-up DC–DC converter Several designs of low-power autonomous sensor sys- tems have been recently proposed,15,16,17 the LTC3108 (or its auto-polarity version, the LTC3109, both from Linear Technology) being the best performing, com- mercially available DC–DC converter capable of oper- ating with very low TEG voltages. This is the DC–DC converter used in our electrical energy storage measur- ing circuit. The LTC3108/3109 works as an ultra-low input vol- tage step-up DC–DC converter with internal power management circuits. With an external step-up trans- former with a 1:100 turn ratio, it can operate with input voltages as low as 20 mV and an efficiency ranging from 40% to 15% when the input voltage varies, respectively, from 20 to 200 mV. The LTC3108’s internal power management circui- try provides a 2.2-V low drop-out (LDO) voltage regu- lator and a main voltage regulator which can be programmed to supply an output voltage Vout equal to 2.35, 3.3, 4.1, or 5 V. Besides these features, it has an output pin which can charge a supercapacitor Cstore up to 5 V that can be used to supply energy to the internal power management circuits of the IC when no external energy is available. The LTC3108’s schematic diagram recommended by the manufacturer for energy harvest- ing applications with a TEG is presented in Figure 1. However, several modifications can be done to opti- mize this configuration and to allow monitoring the energy stored. Stored energy measurement circuit Isolating Cstore by eliminating the internal power management circuits of the DC–DC converter The power management circuits of the LTC3108 con- sume a relatively large quiescent current (up to 9.6 mA). To avoid wasting the energy stored in the super- capacitor to power the internal circuits, a Schottky diode (PMEG4002; NXP Semiconductors) is connected between the Vstore terminal in the DC–DC converter and the supercapacitor Cstore, as shown in Figure 2.14 Figure 1. Conventional application diagram of the switching DC–DC converter LTC3108. 2 International Journal of Distributed Sensor Networks After this diode is inserted, the energy stored in Cstore cannot be used in any circuit and, therefore, it reflects exactly the total amount of energy stored that is avail- able to power the sensor network. In an application circuit where the energy stored in Cstore is used to power the sensor node circuitry, an external ultra-low-power LDO voltage regulator (ADP 160; Analog Devices) is used to replace the internal power management circuits of the LTC3108, reducing the quiescent current to approximately 860 nA.14 Operation principle of the energy measurement circuit Figure 3 shows the voltage in Cstore experimentally mea- sured as a function of time for the circuit presented in Figure 2. The voltage was measured during the charg- ing of a 1-F Cstore supercapacitor when a voltage of 200 mV (best case in an environmental STEG) was applied to the VTEG input of the DC–DC converter. From this plot, we can assume that the charge current is approximately constant and equal to 0.57 mA. This means that a totally discharged 1-F Cstore supercapaci- tor requires approximately 145 min to be fully charged from 0 to 5 V. The usual technique to measure the energy stored in Cstore is to charge and discharge it, several times, between two voltage levels and then calculate the elec- trical energy stored in each charge cycle. If we design a circuit that allows a capacitor initially charged with a voltage VCmin to charge up to a high level VCmax, we can write the energy Ei stored during this charging cycle as follows Ei = C 2 V 2 Cmax � V 2 Cmin � � ð1Þ If this charge/discharge measuring methodology is applied on a sunny day (where the 200 mV is available at the input of the DC–DC converter during 10 h), with VCmin = 1:0 V and VCmax = 5:0 V, by consulting the charging data from Figure 3, we conclude that the supercapacitor will complete one charging cycle in approximately 117 min. Thus, during 10 h, it will be necessary to discharge the supercapacitor five times. However, supercapacitors cannot supply large cur- rents and, for example, a 1-F state-of-the-art superca- pacitor (EECS5R5H105; Panasonic) can be discharged with a maximum current of 1 mA. This imposes a problem to the proposed charge–discharge methodol- ogy. Discharging a 1-F supercapacitor from 5 V down to 1 V with a constant current Id = 1 mA will take approximately 67 min and, during this time, the har- vested energy which would be stored in Cstore will not be measured. Developed circuit To eliminate this error, the circuit presented in Figure 4, which has two supercapacitors (C1 and C2), was developed. A complementary metal oxide semicon- ductor (CMOS) single-pole, double-throw switch Sw1 (ADG819; Analog Devices), controlled by the port P1.0 of the microcontroller MSP430F2122 (Texas Instruments), is used to select which supercapacitor is connected to D1. During the charge period of C1, the switch Sw1 con- nects D1 to C1, and during the time when C1 is dis- charged, Sw1 connects D1 to the auxiliary storage element, supercapacitor C2. Thus, during the period when C1 is being discharged, the energy that cannot be stored in C1 is stored in C2. Since the maximum dV=dt rate in the supercapaci- tors (C1 and C2) is 1 mV/s (discharging the 1-F super- capacitor with a current of 1 mA), we make one A/D Figure 2. Schottky diode D1 avoids current flow from Cstore into the LTC3108 and guarantees that the energy stored is the total energy available. Figure 3. Measured value of the voltage in Cstore as a function of time. Dias 3 conversion at every 10 s, and the maximum error in the measurement of the supercapacitor voltage due to this slow sampling rate is only 10 mV. It is important to note that the voltage in Vstore can reach 5.25 V and the full-scale voltage of the internal A/D converter of the microcontroller is 1.2 V, so it is necessary to divide the voltages VCstore and C2 before connecting them to the A/D input. This is done by A1, A2, and the resistor dividers Ra � Rb and Rc � Rd . A1 and A2 are 5 pA ultra-low input bias current op-amps (LT6004; Texas Instruments), so they will neither dis- charge the storage supercapacitors nor introduce mea- surement errors. Measurement algorithm The measurement algorithm is as follows. After the battery is connected to the system, the microcontroller begins a start-up sequence, preparing the circuit to begin the energy measurement routine. The VTEG input of the DC–DC converter is connected to an external power supply with 500 mV in its output. The microcontroller sets output P1.1 and P1.2 to ‘‘1,’’ so that transistors Q1 � Q2 and Q3 � Q4 are cut- off. Next, the microcontroller connects switch Sw1 to the position where Cstore is allowed to be charged through D1, and the A=D1 channel of the internal 10 bits A/D converter starts to read the voltage in C1. A=D1 monitors the voltage in C1 until it reaches 2.0 V and then the microcontroller switches Sw1 to the posi- tion where C2 is allowed to charge through D1. Now, the A=D2 channel starts reading the voltage in C2 until it reaches 2.0 V. When this situation is reached, LED LD1 is turned on by the microcontroller, indicating that the 500-mV power supply has to be disconnected from the VTEG input of the DC–DC converter. A timing dia- gram showing the voltage sequencing and the charging of C1 and C2 is shown in Figure 5. After LED LD1 is turned on, the microcontroller waits for 10 s (allowing for the disconnection of the power supply) and then starts the last step of the start- up sequence. The last step consists of forcing the initial conditions for both C1 and C2. The microcontroller sets P1.1 to ‘‘0,’’ biasing, through Q3, the reference voltages Vref 1 (LM385-1.2; Texas Instruments) and forcing the discharge of C1 with the collector current of Q4, which is given by IC4 =(Vref 1 � VBE1)=R6. Again A=D1 monitors the voltage in C1 until it reaches VCmin = 1:0 V when the current in Q4 is imme- diately cut by setting P1.1 to ‘‘1.’’ The same procedure is applied with P1.2, Q1, Q2, and A=D2 until C2 voltage is equal to VCmin = 1:0 V. After the voltage in both capacitors is equal to VCmin = 1:0 V, LD1 turns off, indi- cating that the start-up sequence is finished. A timing Figure 4. Developed measurement circuit. Figure 5. Timing diagram of the first step of the start-up sequence. 4 International Journal of Distributed Sensor Networks diagram showing the voltage sequencing and the dis- charging of C1 and C2 to VCmin = 1:0 V is shown in Figure 6. This finishes the start-up sequence and prepares the system to measure the energy available in the Vstore ter- minal of the DC–DC converter when powered by a STEG energy harvesting system. Energy measurement phase After the start-up sequence is finished, the system starts measuring the total energy which can be stored by the STEG harvesting system. The switch Sw1 is positioned to connect D1 to C1, and when the system is connected to a STEG, C1 starts to charge from its initial condition VCmin = 1:0 V. Simultaneously, A=D1 monitors the vol- tage in C1 (once every 10 s) until it reaches VCmax = 5:0 V when Sw1 disconnects D1 from C1 and connects D1 to C2. Then, C2 starts to charge, a counter NC1 is increased (indicating that C1 has completed one charging cycle), and the value of the counter NC1 is written to the SD card. After Sw1 changes from C1 to C2, P1.1 is set to ‘‘0,’’ and Q4 starts to discharge C1. Now, we have C1 being discharged (and monitored by A=D1) and C2 being charged (and monitored by A=D2). When C1 reaches its initial condition VCmin = 1:0 V, P1.1 is set to ‘‘1,’’ turns off Q4, and is held in this posi- tion until a new cycle starts. The new cycle starts when C2 reaches VCmax = 5:0 V, switch Sw1 changes back to C1, counter NC2 is incremented and written to the SD card, and the discharging of C2 is started by Q2. This alternate cycle repeats as long as the system is left run- ning. A timing diagram showing the charge/discharge sequence of C1 and C2 between VCmax = 5:0 V and VCmin = 1:0 V is shown in Figure 7. To remove the SD card safely, a manual switch Sm in the measurement circuit PCB (printed circuit board) Figure 6. Timing diagram of the final step of the start-up sequence. Figure 7. Timing diagram of the charge/discharge sequence of C1 and C2. Dias 5 is used to interrupt the program, write to the SD card the last value of the voltage Vlast of the capacitor which is being charged (C1 or C2), and stop any communica- tion between the microcontroller and the SD card con- troller. After Sm is pressed and all the data are written to the SD card, and the communication between the microcontroller and the SD card is interrupted, the pro- gram is halted and LED LD2 turns on indicating that the SD card can be safely removed. Since the energy stored by C1 and C2 in each charg- ing cycle is given by equation (2), with C1 =C2 =C, it is possible to calculate the total energy stored by the energy harvesting system during the measurement period simply by Etotal =Ecycles +Elast ð2Þ where Ecycles = C 2 NC1 +NC2ð Þ V 2 Cmax � V 2 Cmin � � ð3Þ and Elast = C(1, 2) 2 Vlast 2 � V 2 Cmin � � ð4Þ Experimental results Operation of the measurement circuit A prototype of the measurement system was implemen- ted and tested in laboratory, with the values of C1 and C2 reduced to 1000 mF in order to accelerate the mea- surements. Figure 8 presents the measured voltages dur- ing the start-up sequence of the system. After a pre-charge of the capacitors to 2.0 V, the LED LD1 turns on, indicating that the power supply must be disconnected from the input of the DC–DC converter and the next phase of the start-up sequence can be initiated. Supercapacitors C1 and C2 are dis- charged (first C1 and then C2) to 1.0 V, 10 s after LED LD1 turns on. Figure 9 displays a plot of the measured voltages in C1 and C2 during the regular operation of the circuit with a constant 190 mV VTEG input applied to the DC–DC con- verter. The voltages V (P1:1) and V (P1:2) were measured at the output pins of the microcontroller. As we can observe, the capacitors C1 and C2 are correctly charged and discharged alternately between VCmax and VCmin, as required for the proper operation of the system. Comparison of the single- and dual-capacitor measurement techniques In order to compare the measured results from both techniques (the single capacitor used in Dias et al.14 and the dual capacitor proposed in this article), various measurements were performed. In the tests, various constant input voltages VTEG (from 35 to 180 mV) were applied to the DC–DC converter and, for each input voltage, the system was left running for 60 min. At the end of the 60-min period, the energy which could be stored in the supercapacitor was calculated. The first test was made with the dual capacitor circuit presented in Figure 4. For testing the single-capacitor technique, the same circuit was used, but the firmware of the sys- tem was modified in order to make the section compris- ing C2 and its discharging circuit (Q1,Q2,Vref 1) inactive. Another important modification was regarding the charge/discharge of C1. The firmware was changed in order to have C1 continuously charged/discharged between VCmax = 5 V and VCmin = 1 V. The total num- ber of charging cycles NC1 and the last voltage in C1 (at the exact moment the measurement period of 60 min is over) are stored in the microcontroller. The energy is calculated using equations (2)–(4), but with NC2 = 0. The energy measured with both techniques is shown, as a function of the VTEG input applied to the DC–DC converter, in the plot presented in Figure 10. The dif- ference in the results of the energy measured with the two techniques is because, for the single-capacitor tech- nique, during the time that C1 is being discharged, the Figure 8. Measured voltages during start-up sequence. Figure 9. Measured voltages during energy measurement phase. 6 International Journal of Distributed Sensor Networks energy furnished by the DC–DC converter is not being measured. Neglecting the errors due to the A/D converter and the mismatches between the discharging currents IC4 and IC2, we can assume that the energy measured with the dual-capacitor technique is correct and therefore calculate the percentage error E(%) between the two techniques. In Figure 11, the calculated percentage error E(%) between the two techniques is presented, and one can observe that for low-input voltages (VTEG\60 mV), the single-capacitor technique leads to small measurement errors (lower than 6%), but when VTEG increases, the measurement error with the single- capacitor technique increase up to 33% when VTEG = 180 mV. Conclusion A circuit to accurately measure the amount of thermal energy converted to electrical energy by a STEG and used to charge a supercapacitor storage element was designed, implemented, and tested. A microcontroller- based circuit is used to charge and discharge alternately two supercapacitors between two voltage levels VCmax and VCmin and to count the number of charge cycles of each of the supercapacitors. The total number of charg- ing cycles of each supercapacitor is written to an SD card and, since the energy stored in each charging cycle is well known, the energy storage capacity in the STEG energy harvesting module under test is accurately mea- sured. We observed that for low-input voltages (VTEG\60 mV), the single-capacitor technique leads to small measurement errors (lower than 6%). However, when VTEG increases to VTEG = 185 mV, the dual capa- citor measurement technique eliminates an error of 33% which is present in the single-capacitor measure- ment technique. Declaration of conflicting interests The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article. Funding The author(s) received no financial support for the research, authorship, and/or publication of this article. References 1. Rivers M, Coles N, Zia H, et al. How could sensor net- works help with agricultural water management issues? Optimizing irrigation scheduling through networked soil- moisture sensors. In: 2015 IEEE sensors applications sym- posium (SAS), Zadar, Croatia, 13–15 April 2015. New York: IEEE. 2. Dias PC, Roque W, Ferreira E, et al. A high sensitivity single-probe heat pulse soil moisture sensor based on a single npn junction transistor. Comput Electron Agr 2013; 32: 139–147. 3. Dias PC, Cadavid D, Ortega S, et al. Autonomous soil moisture sensor based on nanostructured thermosensitive resistors powered by an integrated thermoelectric genera- tor. Sensor Actuat A: Phys 2016; 239: 1–7. 4. Dinh TL, Hu W, Sikka P, et al. Design and deployment of a remote robust sensor network: experiences from an outdoor water quality monitoring network. In: 32nd IEEE conference on local computer networks, 2007, http://eprints.qut.edu.au/33774/1/33774.pdf 5. Pummakarnchana O, Phonekeo V and Vaseashta A. Semiconducting gas sensors, remote sensing technique and internet GIS for air pollution monitoring in residen- tial and industrial areas. In: Vaseashta A and Mihailescu Figure 10. Energy furnished by the DC–DC converter for the single- and dual-capacitor techniques as a function of the VTEG . Figure 11. Measured percentage error E(%) between single- and dual-capacitor measurement techniques as a function of the VTEG . Dias 7 IN (eds) Functionalized nanoscale materials, devices and systems (NATO science for peace and security series B: physics and biophysics). Berlin: Springer, 2008. 6. Mysorewala M, Sabih M, Cheded L, et al. A novel energy-aware approach for locating leaks in water pipe- line using a wireless sensor network and noisy pressure sensor data. Int J Distrib Sens N 2015; 2015: Article ID 675454 (10 pp.). 7. Yu L, Wang N and Meng X. Real-time forest fire detec- tion with wireless sensor networks. In: Proceedings of international conference on wireless communications, net- working and mobile computing (WiMob05), Montreal, QC, Canada, 26 September 2005, pp. 1214–1217. New York: IEEE. 8. Son B, Her Y and Kim J. A design and implementation of forest-fires surveillance system based on wireless sen- sor networks for South Korea mountains. Int J Comput Sci Netw Secur 2006; 6(9): 124–130. 9. Dias PC, Morais FO and França MB.Temperature-sta- ble heat pulse driver circuit for low-voltage single supply soil moisture sensors based on junction transistors. IET Electron Lett 2015; 52: 208–210. 10. Lin D, Wang Q, Lin D, et al. An energy-efficient cluster- ing routing protocol based on evolutionary game theory in wireless sensor networks. Int J Distrib Sens N 2015; 2015: Article ID 409503 (12 pp.). 11. Zhang Z, Wang Y, Song F, et al. An energy-balanced mechanism for hierarchical routing in wireless sensor net- works. Int J Distrib Sens N 2015; 2015: Article ID 123521 (10 pp.). 12. Sha C, Shen T-C, Chen J-Y, et al. Energy-balanced uneven clustering protocol based on regional division for sensor networks. Int J Distrib Sens N 2015; 2015: Article ID 647570 (11 pp.). 13. Zheng C, Kuhn WB and Natarajan B. Ultralow power energy harvesting body area network design: a case study. Int J Distrib Sens N, 2015; 2015: Article ID 824705 (11 pp.). 14. Dias PC, Morais FO, França MB, et al. Autonomous multi-sensor system powered by a solar thermoelectric energy harvester with ultra-low power management cir- cuit. IEEE T Instrum Meas 2015; 64(11): 2918–2925. 15. Yan R, Sun H and Qian Y. Energy-aware sensor node design with its application in wireless sensor networks. IEEE T Instrum Meas 2013; 62(5): 1183–1191. 16. Dalola S, Ferrari M, Ferrari V, et al. Autonomous sensor system with power harvesting for telemetric temperature measurement of pipes. IEEE T Instrum Meas 2009; 58(5): 1471–1478. 17. Salvadori F, De Campos M, Sausen PS, et al. Monitor- ing in industrial systems using wireless sensor network with dynamic power management. IEEE T Instrum Meas 2009; 58(9): 3104–3111. 8 International Journal of Distributed Sensor Networks