Dear Sirs ,
I working on single phase energy meter project , we setup a simple board for STPM10 metering IC ,
we success on reading voltage and current but when we read active energy register we have transiant overshoot in our data , we get sample every 25 msec
for example these data collected from active energy register (decimal value) :
You don't give informations that we can verify. Do you want us to guess:
* how your schematic looks like
* how your code looks like
* what input signal you use
?
Only you know the signal flow fom "analog signals input" to the "values sown in your post".
If you want us to help, you need to give us all informations about your application.
(A schematic from a datasheet is not useful to find an issue in your circuit)
Thank you for your reply
The following code is a part of my software that read DAP register.
Please see my code and help me if any thing is wrong.
forgive me for english.
Signals are named SCL and SDA, but it's a SPI interface. Timing of read transaction looks correct at first sight, but I don't know how you are extracting the data field. As said, there must be something wrong because we have only 20 data bits, can't give the numbers printed in red.
Do you check parity, is it correct for the dubious readings?
STPM10 has a special SPI port and doesnt have I2C port so pull up resistor is not necessary. any of evaluation board of stpm10 have pull up resistor.
I always check parity and it is strange for me that parity is always correct.
for this power, Reactive1.quant = Reactive1.new - Reactive1.old is about 60 to 63. In abnormal value, for example 2039592 that in hex is 1F1F28, if i dont consider 7 high significant bits, the value convert to 11F28 (dec: 73512) that if minus from previous (73451), the result is 61! This is true for all abnormal value.
Thank you for your time.