The deployment of electronic energy meters has gained a great deal of momentum over the past several years. This is due to their two main advantages over the traditional electromechanical designs: improved accuracy and an expanded set of features. Current microcontroller technology allows designers to build meters that are competitive in price with traditional devices, while maintaining the required IEC 1036 Class 1 accuracy of 1% for domestic applications. Microcontrollers also allow the easy incorporation of added features, such as rms voltage and current and peak demand metering, as local electric utility companies desire to implement them. In this application note, we will discuss the implementation of a basic watthour meter using PICmicro Flash microcontrollers. In the process, we will show how one ADC with a single sample-and-hold circuit can effectively measure both voltage and load current and maintain Class 1 accuracy. The firmware discussed measures and displays rms voltage and current, as well as kWh, presented in a clear digital format on an LCD. Besides basic energy measurement, this design also includes features that many electric utilities are very interested in rolling out on a wider basis. Dual-channel measurement provides a simple method for monitoring for tamper conditions. An on-board RTC provides a time source for calculating and tracking current and historical peak demand. All metered data is securely stored as it is updated in nonvolatile memory. The design discussed here uses the PIC16F873A and two Current Transformers (CTs) for current sensing. It can be implemented just as easily with the pin compatible PIC18F2320. Current measurement using a shunt may also be used in this design, with little or no change to the current amplifier design. |