Design and Implementation of Controller-Based Multifunction Energy Meter with Seven Segment Display

DOI : 10.17577/IJERTV4IS050804

Download Full-Text PDF Cite this Publication

Text Only Version

Design and Implementation of Controller-Based Multifunction Energy Meter with Seven Segment Display

1Harsh Rajesh Mistry

Dept. Embedded Systems School of Engineering, RK University

Rajkot, India

AbstractThis paper describes the design and implementation of an easy-to-use, cost effective electrical multifunction power meter that offers class 0.5s and 0.2s accuracy as per IS14697 and IEC 62053-22/ IEC 62053-23. It accurately measures all quantities of supply including all types of energies. The meter uses MSP430F47177 microcontroller and it is programmed in C. Second-order Sigma-delta ADCs are used for sensing current as well as the voltage signals, and the calculations for RMS voltages and currents, power and frequency are carried out using the code which is loaded into the microcontroller. The type tests performed on the device prove that the meter accuracy meets the specified standards. A LabVIEW based application has been developed to configure the meter using software by interfacing it with a computer using MODBUS protocol. The software stores the logs of various types of parameters which can be exported in Excel and then studied.

KeywordsThree-phase, Multifunction Energy Meter, MSP430 Microcontroller, Energy.

  1. INTRODUCTION

    Energy generation is a very costly process and in order to measure the usage of energy, certain types of devices are required, multi-function meter being one of them. The increase of electric energy price paves a way for the development of such multi-function meters which can accurately measure the energy. Traditional electricity meters, whether electromechanical or digital, provide a measurement of the number of kilowatt hours that have been consumed by a customer. To encourage more efficient use of electricity, utility companies would also like to measure, amongst other things, the variations in supply voltage and electricity consumption through the day. From the knowledge of the variation of electricity consumption with the time of day, it becomes possible for the utility companies to analyse customers behaviour, as well as to predict the load demand at a particular time of the day. It may also be emphasized that from the perspectives of both the customers and the utility companies, it is necessary that certain basic quality requirements are met by the electrical energy supplied to the consumer premises. From the customers perspective, if electrical equipment is to operate correctly, the electrical energy must be supplied at a voltage that is within a specified range around the rated value of the equipments in operation.

    Most of the equipments in use today require good power quality. [1]

    One of the main goals of this paper is to improve the overall energy efficiency of the energy measurement system. The meter has been designed in such a way that it can be read from a long distance as well. The meter may find application in areas where smoke is present and keeping this in mind the seven segment display is chosen over LCD. Seven-segment displays have a twofold benefit- they are cheap and help in reducing the overall cost of the device, and they can be read from a faraway distance due to the bigger size of the digits.

    The MSP430F47177 belongs to the MSP430F4xx family of devices. These devices find its application in energy measurement and have the necessary architecture to support it. It can calculate a wide range of parameters with the use of CPU independent metrology engine.

    The design approach is as follows: the voltage and current inputs are received via the ADCs and the C code does the calculation of various parameters. RTC is used in order to update the date and time needed for the maximum demand calculations. Calibration procedure is carried out before the first use of the meter so that the parameters read accurately. The real time values are stored in an FRAM. Then the values are displayed on the seven segment display according to the user.

  2. HARDWARE DESCRIPTION

    There are a number of hardware devices used in this design and are integrated for the proper functioning of the device. The meter consists of four cards: CT card, SMPS card, CPU card and a display card. The Fig.1 describes the block diagram of the design. The block diagram shows that the design receives a 3P3W/3P4W input. The current and voltage inputs are interfaced with the analog front end (AFE) of the MSP430 microcontroller. These are given as the inputs to the ADCs. The code which is loaded in the controller does all the calculation work which is then displayed on the display card.

    Fig.1. Block diagram of the design

    1. Why MSP430?

      It is a microcontroller which functions on low power modes and along with that it boasts of a higher performance. It has a modern 16-bit RISC CPU which is highly transparent to the application and also provides reduced instruction execution time. This also reduces the code size, which is an important factor in embedded applications. It has 92KB Flash and 8KB of RAM which helps in storage of data. It has a powerful clock system of up to 25MHz clock frequency with less than 6µs of clock startup. It consists of a powerful analog front-end to form a System-on-Chip (SoC) and comes along with intelligent peripherals which boost performance. It has an integrated LCD driver with charge pump to support up to

      160 segments and comes along with embedded emulation which helps in CPU debugging. [2]

      MSP430 for E-metering applications is a unique concept.

      It is possible because of the following reasons:

      1. Powerful 16-bit A/D converter (SD16, SD16_A) with programmable gain amplifier and it also supports differential input.

      2. Multiple SD16/SD16_A for simultaneous sampling of voltage and current channels.

      3. Hardware multiplier to support up to 32-bit x 32-bit multiply for better accuracy.

      4. Multiple communication peripherals that support a variety of wired and wireless protocols.

      5. Enables tamper detection which can be used for anti- tampering as well as theft detection.

      6. Calculates a large set of parameters with the use of CPU independent metrology engine thereby increasing the computation time as well as the accuracy.

    2. Power Supply

      The low-power feature of this device family allows design of the power supply to be very extremely simple and cheap. The power supply allows the operation of the energy meter powered directly from the mains.

      There are two types of power supplies that can be used in an energy meter: a simple Resistor Capacitor (RC) power supply and a transformer based power supply. The power supply used here is a transformer based isolated power supply. Whenever a higher current is required, a transformer based power supply is used. Voltage from the mains is brought down using a step-down transformer which is then followed by a rectification circuitry. In order to do this, a transformer is not needed in all the three phases. Transformer must be selected accordingly so that it can power the whole board. Fig.2 shows the block diagram of a transformer based power supply that is used in the energy meter.

    3. CPU

      The CPU card consists of the controller, JTAG port for programming the controller, FRAM for storing the samples and other connectors which are connected to other cards as well. MSP430F47177 is the controller used. This is a 16-bit controller which has 92KB of flash memory and 8KB of RAM. The CPU is RISC based with single-cycle register operations. A 4-kilobit nonvolatile memory is used which provides data retention for 38 years hile eliminating the complexities, overhead, and system level reliability problems caused by EEPROM and other nonvolatile memories. It supports 100 trillion read/write cycles than EEPROM. Such capabilities make FM25L04B ideal for nonvolatile memory applications requiring frequent or rapid writes or low power operation. [3] This makes it suitable for industrial applications. Fig.3 shows the block diagram of CPU card.

    4. CT card

    Fig.3. Block diagram of CPU card

    Fig.2. Block diagram of transformer based power supply for MSP430 based energy meter

    This card is also known as the signal conditioning card due the presence of CTs which are used for current signal conditioning. Three CTs are used for each phase of the supply namely R, Y and B phase. The CTs are followed by a shunt resistor connected to them in parallel. The value of this resistor depends on the current rating of the CT. The shunt resistor used here was of 120 Ohms. The resistor is then followed by anti-aliasing filters to remove the noise. The CTs convert the current in to values which can be applied to the components on the PCB. Each phase generates two pairs of signals for current: positive component and the negative component of the current. These are then provided to a connector which carries it to the microcontroller in the CPU card. Fig.4 shows the block diagram of the CT card.

    Fig.4. Block diagram of CT card

  3. SOFTWARE IMPLEMENTATION

    The software implementation maintains the overall control of the hardware at all instants of time and also determines the current, voltage, power and energy based on the principles of power and energy calculations. Hardware control consists of input devices, reference voltage circuitry, power supply circuitry and the display module along with other peripherals. The software algorithm must be able to continuously track the input current and voltage signals, convert them from analog to digital form, multiply both these signals to calculate power and then calculate the energy with time. It should then send this data to the display. All this is done by instructing the microcontroller precisely. [4]

    1. Analog to Digital Conversion

      MSP430F47177 controller has seven sigma-delta ADCs out of which six are used, one pair for each phase of supply. Power or energy measurement relies on the product of instantaneous voltage and current samples. In order to ensure this reliability, there should not be any delay or difference in time during their sampling. The MSP430 SD16s allow easy and accurate sampling of voltage and current samples by a feature known as the group. Grouping of SD16s allow simultaneous sampling of all on a single trigger. The clock is derived from the 32.768 KHz external crystal. The sampling frequency is defined as fS = fM/OSR, where OSR is chosen as 256 and the modulation frequency fM, chosen as 1.048576 MHz, resulting in a sampling frequency of 4096 samples per

      second (sps). The SD16s generate regular interrupts every sampling instant. [5]

      The SD16 channels are as follows: A0.0+ and A0.0- : Voltage V1 A1.0+ and A1.0- : Voltage V2 A2.0+ and A2.0- : Voltage V3 A3.0+ and A3.0- : Current I1 A4.0+ and A4.0- : Current I2 A5.0+ and A5.0- : Current I3

      Fig.5 shows the SD16 interrupt routine.

      Fig.5. SD16 interrupt flow chart [5]

    2. Program Flow

    • First task is the initialization of clock and peripherals for the controller. Then initialize the GPIO and watchdog timer. Initialize the LED display and boot FRAM for all parameters. Retrieve the calibration constants from the EEPROM and initialize the ADC. Set timer-0 for 1

      second and basic timer for 4 msec. Initialize UART and set the port in read mode and start the watchdog timer. These steps define the actions that occur during the power ON of the meter.

    • In the start of while loop, clear the watchdog. ADC calculation for energy meter parameters for calculating voltage, current, power and frequency after the required number of samples are taken in interrupt. Then the mode is checked in which the meter can be. There are four modes: RUN mode, PASSWORD mode, PROGRAM mode, RESET mode. According to a key press the meter can go in to any mode and if no key is pressed then the timeout occurs and the meter comes out of RUN mode. This described the main loop of the code.

    • As the data is made ready from the ADC by performing the calculations, it is then sent on the seven segment display. The data is latched on the display and the data is displayed for 8 seconds, after that the data for the next parameter is displayed. This feature is known as Auto- scroll and when the meter is in auto-scroll mode, if any key is pressed then it enters in to manual scroll mode which is indicated by an LED.

  4. EXPERIMENTAL SETUP AND TEST RESULTS

    This section describes the experiments performed on the meter. When such a system is used, there are chances of errors being introduced in to the calculation. This errors may start at the preliminary stage and later on magnify and lead to disastrous outcomes. Hence, it is imperative to test the system based on the standards. This device is tested based on the tests described in the Indian Standard IS14697 and IEC 62053-22/ 62053-23. Various types of type tests and accuracy tests have been performed in order to check the overall performance and efficiency of the meter.

    According to the standard IS14697, type tests is defined as the series of tests carried out on one meter or a small number of meters of the same type having identical characteristics, selected by manufacturer to prove conformity with all the requirements of this standard for the relevant class of meter. These are intended to prove the general qualities and design of a given type of meter. [6]

    Some of the tests performed include shock test, vibration test, spring hammer test etc.

    The energy metering system is connected to a 230V 3- phase power line. Voltage and current signals are provided from a phantom load Zera. RS-485 connections are provided for the calibration of the meter. Different values of voltage and current are applied from the Zera and accordingly the readings are taken. Then they are compared with the standard ranges as suggested by the Indian Standard and IEC standard to check the accuracy. Similarly, different values are fed in to the meter and all the parameters such as voltage, current, power, power factor, frequency, energy are noted down and then compared for accuracy.

    Some of the test results are as follows: Class 0.2 as per IS14697 Active Energy

    Reference conditions

    Vref

    240

    Volt

    Ib

    5

    Amp

    Imax

    6

    Amp

    Freq

    50

    Hz

    Constant

    3600

    Active Energy test report:

    With Balance Load

    Current (Amp)

    no of

    Pulses

    COS Ø

    % of Standard err

    % DUT

    err

    0.01 * Ib

    0.05

    4

    UPF

    ± 0.4

    0.030

    0.02 * Ib

    0.1

    10

    UPF

    ± 0.4

    0.020

    0.05 * Ib

    0.25

    20

    UPF

    ± 0.2

    0.060

    0.1 * Ib

    0.5

    30

    UPF

    ± 0.2

    0.020

    0.2 * Ib

    1

    40

    UPF

    ± 0.2

    0

    0.5 * Ib

    2.5

    50

    UPF

    ± 0.2

    -0.030

    1.0 * Ib

    5

    50

    UPF

    ± 0.2

    -0.020

    Imax

    6

    50

    UPF

    ± 0.2

    -0.030

    0.02 * Ib

    0.1

    4

    0.5 Lag

    ± 0.5

    0.490

    0.05 * Ib

    0.25

    10

    0.5 Lag

    ± 0.5

    0.470

    0.1 * Ib

    0.5

    15

    0.5 Lag

    ± 0.3

    0.410

    0.2 * Ib

    1

    25

    0.5 Lag

    ± 0.3

    0.29

    0.5 * Ib

    2.5

    40

    0.5 Lag

    ± 0.3

    0.070

    1.0 * Ib

    5

    40

    0.5 Lag

    ± 0.3

    -0.120

    Imax

    6

    40

    0.5 Lag

    ± 0.3

    -0.160

    0.02 * Ib

    0.1

    4

    0.8 Lead

    ± 0.5

    -0.180

    0.05 * Ib

    0.25

    10

    0.8 Lead

    ± 0.5

    -0.060

    0.1 * Ib

    0.5

    15

    0.8 Lead

    ± 0.3

    -0.090

    0.2 * Ib

    1

    25

    0.8 Lead

    ± 0.3

    -0.1

    0.5 * Ib

    2.5

    40

    0.8 Lead

    ± 0.3

    -0.050

    1.0 * Ib

    5

    40

    0.8 Lead

    ± 0.3

    0.020

    Imax

    6

    40

    0.8 Lead

    ± 0.3

    0.050

    Similarly tests for reactive energy, KWh register accuracy tests, KVARh register accuracy test, Temco active energy test and Temco reactive energy tests are performed and their results are noted. Here the meter meets the requirement that is specified in the Indian Standard as well as the IEC standard.

  5. CONCLUSION

This low cost multi-function energy meter meets all the requirements of the Indian Standard IS14697 as well as the IEC standard 62053-22/ 62053-23. The design and implementation of a multi-function energy meter with seven segment display is presented. The seven-segment display makes the meter a standout performer from the crowd. This display not only is cost effective but it also aids visibility in the dark, from a further distance and as well as in foggy and smoky environments. It provides both accuracy classes of 0.2 S and 0.5 S. It comes with an IP-51 ABS panel mount enclosure making it light weight, rugged and user-friendly to use.

ACKNOWLEDGMENT

The vast field of embedded energy meter development has been a tough challenge. This project consumed huge amounts of work and dedication. The implementation would not have been possible without the support of various people and an organization. The design and implementation was supported by Masibus Instrumentation and Automation Pvt. Ltd. Warm

regards and thanks to Mr. Chintan Chauhan, Manager in R&D, Masibus and Prof. Nilesh Kalani for providing their continuous guidance, support and sharing ideas without which this would not have been possible.

REFERENCES

  1. A. Chandra Suresh, Dr. Kvnm Prasad, N. Chandra Sekhar Reddy, A. Arif, Design and development of embedded energy meter, International Journal of Engineering Research & Technology, Vol.3, Issue 7, July 2014.

  2. Kripasagar Venkat, MSP430-based E-metering and AMR solutions, MSP430 Advanced Technical Conference.

  3. FM25L04B datasheet, Rev 1.3, February 2011, Ramtron.

  4. Thousif Ahamed, A. Sreedevi, Design and implementation of PIC microcontroller based 3 phase energy meter, International Journal of Innovative Research in Science, Engineering and Technology, International Conference on Engineering Technology and Science (ICETS14), Vol. 3, Special Issue 1, February 2014.

  5. Stephen Underwood, Vincent Chan and Kripasagar Venkat, Implementation of a three-phase electronic Watt-Hour meter uing the MSP430F471xx, Texas Instruments, Application Report, SLAA409A, June 2009.

  6. Indian Standard, AC Static Transformer Operated Watthour and VAR- Hour Meters, Class 0.2 S and 0.5 S Specification, October 1999.

Leave a Reply