Development of DC Energy Meter for Renewable Energy Application

. The world we live in, is becoming more and more dependent on electrical energy, which, sadly, still heavily relies on outdated techniques involving the burning of fossil fuels. Fortunately, more and more people are accepting the fact that this system simply isn’t sustainable in the longer-run. Even if air pollution wasn’t a huge factor, the shortage of these resources is something that is bound to happen in the nearest future, and it would pose an impassable obstacle towards the future growth of mankind. Hence, importance of renewable energy is such an important trend for the future of mankind. At present, net AC meters are available for measurement of four quadrant energy, which is used at output of both on grid and off grid solar inverter. This meter can measure both, energy fed into the grid and energy utilize from the grid. However Energy generated by solar panel cannot be measured directly. Even in off grid inverter the present net meter cannot measure energy generated by solar panel. In case of DC micro grid, where DC energy is used/ consumed directly by the load, the present net meter cannot be used as they can be used in AC energy measurement only. With the launch and implementation of national energy saving and emission reduction policies in relation to distributed power supply by renewable power generation, the DC energy metering technology will become an inevitable trend, breaking the landscape dominated by AC in the field of electric energy metering. This paper describes introduction, block diagram [1], Hardware and software description for development of dc energy meter.


Introduction
In today's world, two of the biggest challenges are climate change and management of diminishing fossil fuel reserves. In order to secure the future for ourselves and generations to come, we must act now to reduce energy consumption and substantially cut greenhouse gases, such as carbon dioxide. The consumption of energy is increasing at a fast pace while available resources remain limited. Out of the total electricity produced, over certain amount comes from fossil fuels. Coal and other fossil fuels, have taken hundreds of millions of years to form, are likely to deplete soon. In last two hundred years, we have consumed 60% of all resources. For sustainable development, we need to adopt energy efficiency measures. We need to use renewable sources for production of electricity. One such method is by using solar panels which uses solar energy for production of electricity.
To fulfil the mission of power to all, government of India is promoting DC micro grid so that local energy requirement can be fulfilled. Hence, the demand for DC metering will be increasing in renewable energy applications like solar energy panels metering, wind turbines and many more.
Moreover, now a day with the increase in renewable energy applications, DC circuits are rising in prominence.
With the proliferation of DC circuits, the need for capable DC metering [2] technology has come to the fore. The total energy needed in a given time interval is known as consumption, and can be measured & data can be stored using energy meters. Energy meters measure the energy flowing through some point of an electric circuit, Kilowatt hour (kWh) is the most generally used unit for measuring and billing electrical energy, commonly known as the billing unit. Apart from DC energy, the DC energy meter will measure DC voltage, current and power and additional parameters like temp and humidity & pressure of surrounding atmosphere for renewable energy application. To better understand energy consumption, consider a 100 W lamp that remain on for 10 hours. To produce light this lamp will consume 100 W in an hour, i.e., 100 Wh. If this lamp is turned on for 10 hours, the total consumption will be 100 W x 10 h = 1000 Wh = 1 kWh. At this point, it is clear to understand that after these 10 hours the energy meter will consider one more kWh, for which applicable electricity rate will be charged.
CPEEE 2020 Fig.1 shows the block diagram of the overall system of DC energy meter. Arduino Uno controller takes the data from all sensors i.e. Pressure sensor, Temperature and Humidity sensor, RTC for date and time. After the sensing of voltage and current, Ardunio controller will feed all data to the LCD 20X4.

Developed system
The proposed system consists of Arduino Uno as a heart of the system, voltage sensor, current sensor, Temperature sensor, Humidity sensor, RTC for Date and Time, Pressure sensor, 20 x 4 LCD and Arduino IDE for programming.

Voltage sensor
There are various method for sensing the voltage like voltage divider network and potential transformer. Voltage divider network can be made by resistors divider or capacitors divider.

Fig. 2. Voltage Sensor
We have used LEM 25-P voltage sensor due to good linearity response & excellent accuracy features for dc voltage sensing. This sensor works on the principle of Hall Effect[3] based closed loop current transducer ( Figure 2). 25 kΩ resister is connected in series with the primary circuit of the voltage transducer. 100 Ω resister is connected across secondary output and GND terminal for getting the output voltage. +12 volt & -12 volt is given by Power supply circuit to operate this voltage transducer. This sensor output is connected to Analog 0 channel of Ardunio controller. Sensor response was measured by using Fluke 5100 calibrator, different voltages were given as input of transducer and measured the respective output. After getting calibration data, linear equation was fitted in the program for displaying measured value.

Current sensor
LEM LA 55-P sensor (Figure 3) i.e. Hall Effect based current sensor was used for development of dc energy meter due to good linearity result & excellent accuracy features. It requires ± 12 volt for operation and need 150 Ω resistance at secondary terminal. Output of current sensor was connected with analogue channel 1 of Arduino controller. Sensor response was measured by using Fluke 5100 calibrator, different current/s were passed through input of transducer and the respective output was measured. After getting calibration data, linear equation was fitted in the program for displaying measured value.

BMP180 sensor
The BMP180 (Figure 4) is a new generation of high precision digital pressure sensor for consumer applications. The ultra-low power, low voltage electronics of the BMP180 is optimized for use in mobile phones, PDAs, GPS navigation devices and outdoor equipment. With a low altitude noise of merely 0.25m at fast conversion time, the BMP180 offers superior performance. The I2C interface allows for easy system integration with a Arduino controller SCL and SDA pin of BMP180 sensor is connected with A4 and A5 pin of Arduino controller.

DS1302 RTC for data and temperature
We have used DS 1302 based RTC module ( Figure 6) for updating recorded all data with date and time. SCLK pin, DAT pin, RST pin of RTC modules are interfaced with 2, 3 and 4 pin of Arduino controller.

Ardunio Uno controller
Arduino Uno (Figure 7) is based on AVR microcontroller called Atmega328. This controller comes with 2KB SRAM, 32KB of flash memory, 1KB of EEPROM. Arduino Board comes with 14 digital pins and 6 analog pins. ON-chip ADC is used to sample these pins. A 16 MHz frequency crystal oscillator is equipped on the board. Arduino Uno is a very valuable addition in the electronics that consists of USB interface, 14 digital I/O pins, 6 analog pins, and Atmega328 microcontroller. It also supports serial communication using Tx and Rx pins. It is an open-source platform. The software used for Arduino devices is called IDE (Integrated Development Environment) which is free to use and required some basic skills to learn. It can be programmed using C and C++ language. Atmega328 microcontroller is placed on the board that comes with a number of features like timers, counters, interrupts, PWM, CPU, I/O pins and based on a 16MHz clock that helps in producing more frequency and number of instructions per cycle. Programming is done in such a way so that Ardunio controller senses the voltage, current and sensor data and display on LCD 20x4.  Figure 8 shows the software algorithm which was used during development of DC energy meter. In this algorithm, initially we setup the initiation of RTC, LCD, UART and I2C with their pin. If I2C protocol will not give data of pressure, then "Error" message shows in serial port. During the continuous loop i.e. while loop, Arduino controller initially checks for serial data. If data is not coming then it will wait and nothing display on LCD. Once data receive from serial port, it will take the 13 bit character data of temperature/humidity sensor. It will split the particular temperature data & humidity data from 13 bit character data and send the data on particular column and row position of 20x4 LCD. After that we are calling data of BMP085 sensor i.e. pressure data which we are putting in variable and display on LCD & then we are calling DS 1302 routine for taking data of date and time. Controller receives date and time data through SPI communication and fed to LCD for display. Now controller calling time calculation routine for calculating time to complete whole while routine. Output of time calculation routine gives the required time in variable time. After completion of time routine, controller senses the voltage and current data through output of LEM voltage and current transducer through ADC of Arduino controller.

Software algorithm
DC power will be calculated through software by product of dc voltage and dc current. For calculating DC energy will be calculated by dc power and time for 1 hour. These dc power and dc energy data will be fed to the LCD using controller. After completed this routine, it will again repeat the process and update the all data on LCD.

Arduino IDE complier
The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other opensource software. Adafruit BMP085 library for interfacing BMP180 sensor to measure pressure data, DS1302 library for interfacing of RTC module to measure date and time data, EEPROM library for storing DC energy value when power goes off and display library for data display on LCD are added in the Ardunio IDE compiler for programming.

GUI software
The open-source Arduino Visual basic based data logger was developed for data storing of temperature, humidity and energy data with date and time. These data are coming from Ardunio controller via serial communication before that user will select and detect comport using combo box option given in GUI software [4]. Once communication done, controller starts the sending required data for GUI and update the value. Figure 9. Shows the visual basic based developed GUI software.

Experimental results
Experiment was carried out with the help of programmable dc source. Output of Programmable source was connected with input of developed dc energy meter. Variable DC voltage and dc current was set by programmable dc source and verified voltage and current value with developed dc voltage and dc current value. In this developed dc energy meter, we are continuously taking average of dc energy for 1 minutes and this updated dc energy value display on LCD. We are using ardunio controller which have 10 bit adc with LEM voltage and LEM current sensor. So we can sense low voltage value and get accuracy better. Developed energy meter have accuracy with ± 1%. Table 1 shows the achieved experiment result at 5A load and Table 2 shows the achieved experiment result at 10A load

Conclusion
In this paper, the methodology for development of dc energy meter for dc micro grid is discussed. The development of indigenous test system will be beneficial for Indian industry at low cost. The best suitable method for this application i.e. sensing of voltage, current, DC energy calculation, temperature, humidity & pressure sensing is presented in this paper, which is cost effective too. The programming for Arduno Uno controller is done and it works as per the application. GUI software is developed in visual basic and it is vary user friendly. This GUI software provides weather data monitoring as well as dc energy data storing with real data and time parameter. Moreover, this system can be design if we need IoT based implementation. For that we will use UART to web server interfacing via WIFI module due to the need of smart city project & protect the data theft.