Select Page

3-Phase Energy Meter

Problem Statement


The purpose of this project is to develop a 3-phase Energy Meter, using TIVA TM4C1236GPM microcontroller board and MCP3903 ADC IC from microchip, used to perform all the measurements in the energy meter. Basically, the energy meter is designed to measure the energy, equivalent to the power consumption over time, using the formula of P = V * I. Therefore, for each phase two input channels are connected to the ADC chip, one for voltage, and another for current. Analog signals will be detected from the two input channels, which will be converted into Digital signals by ADCs respectively. With the two digital input signals transmitted to the microcontroller via SPI protocol, TIVA calculates the power hence, energy consumed will be accumulated after a specified period of time. The microcontroller is programmed with C language; ADC channels are used for converting both current analog signal and voltage analog signal; multiply algorithm is used to process the power and energy, voltage and current signals based on the energy formula and many parameters are displayed such as voltage, current, Active power.

HARDWARE DESCRIPTION


The hardware includes TM4C1236GPM microcontroller unit, MCP3903 ADC IC for analog to digital conversion of 3-phase voltage and current inputs, external oscillator of 3.2768Mhz acting as clock to energy meter ICs(MCP3909), Threephase voltage and current signals are connected to the meter through transformers and to the MCP3903 A/D converter through a voltage divider circuit. The sampling of the signal as well as analog-to-digital conversion is performed using the device MCP3903 which sends the digital converted results to the microcontrolller device through SPI interface.

Implementation Details


A. Analog Inputs to MCP3903 Ic The back end of the meter is made up of three pairs of voltage and current input networks. Each of the three line voltages is attenuated by a resistor divider and filtered through identical anti-aliasing filters.The current channels signals are converted from current to a voltage through current transformers and burden resistors. The signals are then filtered by the anti-aliasing filter on each of the three phases, and the result is applied to the current inputs of the MCP3903

B. Analog to Digital Conversion All This meter design uses Microchip’s MCP3903 energy meter ICs. Small-signal current inputs can be amplified by the programmable gain amplifier inside the MCP3903 device. The MCP3903 device’s clock is provided by a 3.3768 MHz active crystal. The MCP3903 device’s output data rate is 12.8 ksps.

SOFTWARE IMPLEMENTATION


The software is to have an overall control of the hardware at all time and to determine the current, voltage, power and energy based on the principles of power and energy calculations. Hardware controlling consists of input devices, external reference voltage device, and power circuit and display board with external peripherals. In addition, based on the selected algorithm, the software must be able to continue track the input current and voltage signals, convert these analog signals to digital signals, multiply both signals to a power signal and with a consumed time to get energy. And send those data to display. After overall planning, instructs the microcontroller to execute for initializing peripherals in first priority to work on, the principle of power and energy calculations, value collection and data sending to display board base on the microcontroller. To achieve those functions, the pins configuration and ADC conversion should be considered, interrupt should be introduced in the programming.

Initialize and Configure MCP3903Ic to operating mode The task of this module is to enable the MCP3903 device to enter the “Channel Output” mode. In this mode, the current and voltage data channels measured by the ADC are sent through the MCP3903 device’s SPI port. To enable the MCP3903 device to enter the Channel Output mode, certain instructions must be sent to the device via the SPI interface within a specified time (32CLK) after resetting the MCP3903 device with a flow chart. • Enable MCP3903 devices: enable ADCS1, ADCS2 and ADCS3, and configure MCU’s SPI to 16-bit mode • Reset the MCP3903 device through the RESET pin. The pin must be pulled low for no less than 1 clock cycle of the MCP3909 device • After the RESET pin is pulled high, wait for 4 clock cycles for the MCP3909 device pin functions to reset • Send Instruction 0xac to the MCP3909 device through the SPI Interface • Configure the SPI interface to 16-bit mode and strobe the MCP3909 device for Phase A A. ADC Sampling Scheme for Calculation The ADC conversion rate of the MCP3909 device is determined by the frequency of master clock, MCLK, and the The ADC conversion rate of the MCP3909 device is determined by the frequency of master clock, MCLK, and the