310 likes | 501 Views
PS1000 Single Phase Electricity Meter SOC. By Ann Chou Project Manager. PS1000 User Guide. LCD Display. I 2 C. NVM. Vref. Temp. Sensor. LCD Controller. UART. Modem. IA. AGC. ADC. UARTx2. GPRS. GPIO. Key Pad. DSP. MCU. IB. AGC. ADC. 32-bit H/W DSP. 8032T. RTC. VA.
E N D
PS1000 Single Phase Electricity Meter SOC By Ann Chou Project Manager
LCD Display I2C NVM Vref Temp. Sensor LCD Controller UART Modem IA AGC ADC UARTx2 GPRS GPIO Key Pad DSP MCU IB AGC ADC 32-bit H/W DSP 8032T RTC VA ADC Timerx2 Zcc Detection Watch Dog DSP Controller DSP ROM Shadow Flash 32KB RAM 16KB SPI Power Detection SSP DSP/UP System Architecture
Features • < 0.1% WH accuracy over 2000:1 range. • Exceeds IEC61036/IEC62053/ANSI C12.20 standard • 3 high accuracy Sigma-delta ADC with SNR > 80 dB 2 ch 16-bit ADC with AGC for current input (1x/2x/4x/8x)1 ch 16-bit ADC for voltage input• DSP-MCU dual core with 8051 compatible programming 8032T high performance MCU Built-in 32-bit hardware DSP core• LCD driver(up to 160 pixels) • 64 kB Flash • 16 kB RAM • 3 Timers + Watchdog timer • 3 UARTs for AMR and calibration • RTC for time of use functions • I2C interface • SPI interface • Up to 16 general purpose I/O pins • Built-in internal temperature sensor with 10-bit ADC • Built-in energy management for the power outage meter reading • 128-lead LQFP package
SFR Mapping *Red Mark: PS1000 proprietary, not the standard SFR
0xFE7F I/O Space (128 Bytes) 0xFE00 0xFD00 DSP Buffer (256 Bytes) 0xFC00 0xF400 DSP ROM (1K Bytes) 0xF000 0x3FFF 16KB XDATA 0x0000 I/O Mapping Control by MCUCFG
DSP • DSP calculation items
AGC • when the IA/IB integration is over the 50% of full scale, the AGC will decrease the gain value as one level (8X – 4X – 2X – 1X). • When the IA/IB integration value is under the 16% of full scale, AGC will increase the gain range as one level (1X – 2X – 4X – 8X). The MCU can set the AGC threshold to control the AGC adjustment point. The threshold setting as (MSB) (LSB) AGCTH_L = {FE65h, FE64h, FE63h, FE62h, FE61h, FE60h} AGCTH_H = {FE6Bh, FE6Ah, FE69h, FE68h, FE67h, FE66h}
SCK MISO MOSI VDD SS Port0 Port1 Port2 Port3 SCK SCK SCK SCK MISO MISO MISO MISO MOSI MOSI MOSI MOSI SS SS SS SS SPI
RTC UPD: RTC update 1: Update 0: no update (Default) RTCADJ[5:0]: RTC Frequency Adjust (Hz), 2’s complement … 000010: RTCCLK = 32768 + 2Hz 000001: RTCCLK = 32768 + 1Hz 000000: RTCCLK = 32768Hz 111111: RTCCLK = 32768 - 1Hz 111110: RTCCLK = 32768 - 2Hz
RTC RTCTM[2:0] RTC Test Mode control Must always set as 000 RTCFADJ[3:0] RTC clock tuning fraction part (RTCAdj) 0000 RTCAdj - 0/16Hz 0001 RTCAdj - 1/16Hz 0010 RTCAdj - 2/16Hz 0011 RTCAdj - 3/16Hz 0100 RTCAdj - 4/16Hz 0101 RTCAdj - 5/16Hz 0110 RTCAdj - 6/16Hz 0111 RTCAdj - 7/16Hz 1000 RTCAdj - 8/16Hz 1001 RTCAdj - 9/16Hz 1010 RTCAdj - 10/16Hz 1011 RTCAdj - 11/16Hz 1100 RTCAdj - 12/16Hz 1101 RTCAdj - 13/16Hz 1110 RTCAdj - 14/16Hz 1111 RTCAdj - 15/16Hz
LCD VLCD VCC R: 5K ~ 25K SEG0 VR V1 LCD Driver Control R V2 LCD Driver … R V3 SEG39 R VSS COM0… COM3 LCDEN
IPR/ICR SPI_INT INT0/INT1 I2C_INT T/C 0/1/2 TXINT I R R ISR Entry Point I R 8051 Interrupt Controller RXINT TIin_2 RIin_2 Serial Port 0/1 ExINT1 ExINT0 IMR Interrupt PS1000 has 8 extended interrupt input source
Power Management • Most of the functional block of PS1000 can turn-on/off individually
Power Management • For the MCU and DSP, when you change the different operation frequency, it also can help to save the power consumption or increase the MCU/DSP performance
ckt EVB DSP Code System Frame Built in Sample code Power Calculation kWh pulse output User define Calibration Keil C Compiler (自購) Tools Download program UART Development tool kit Development tool kit
kWh Pulse Output Calculation for kWh pulse output time Let meter constant as Kh (wh/pulse) , Current usage as a watt then time interval of two pulse outputs will be sec Ex : meter constant is 20 wh/pulse , Current conditions are 110V , 5A , PF=0.8 the time interval between two pulse can be found as sec
Communication • Protocol : Modbus • Transmission Modes : RTU mode The format for each byte in RTU mode is: • Coding System: • 8–bit binary, hexadecimal 0–9, A–F • Two hexadecimal characters contained in each • 8–bit field of the message • Bits per Byte: • 1 start bit • 8 data bits, least significant bit sent first • 2 stop bits • Error Check Field: • Cyclical Redundancy Check (CRC)
Communication • Function Codes • Holding Register 0000h-01ffh map to FRAM address 0800h-0bffh • Input Register 0000h-01ffh map to FRAM address 0c00h-0fffh
Calibration • PC transmit measuring time required for calibration • determining external voltage and current sources • after reaching steady , PC transmit calibration step to Modbus Holding Register 0000h • when Modbus Holding Register 0000h = 0 being detected by PC, PC transmit the external voltage and current reference values to respective Modbus Holding Registers • repeating 2-4 for 8 times • PC transmit Modbus Holding Register 0000h = 9 , Calibration parameters will be calculated by PS1000