2019-10-18 05:31 PM
Setup:
1. Using STPM33 eval board with shunt & 110V, connected to ~1500W/700W heater, connected as in Figure 8.
2. Teensy3.2 connected using SPI.
3. Heater is turned on and off and also connected/disconnected from the plug during measurements.
4. Pooling all registers each second.
5. Each register read is with CRC and CRC is checked.
6. Auto latch.
7. After each pool config registers are verified to contain correct values. Values are:
Reg DSP_CR1: 40000a0
Reg DSP_CR3: c8004e0
All works ALMOST fine when heater is connected and working. Have issues when heater is off or not connected:
See the attached log. It prints Power(P), Reactive Pwr(Q), Amps(A), Volts(V), Energy(E), & Reactive Energy(RE) .
This is the timing of wrong measurements:
Line 1-8, 100-137: Heater plugged in and not turned on
Issue 1: REACTIVE ENERGY TOO HIGH.
Line 9-13: Heater turned on low-power
All fine.
Line 14-99: Heater into high-power
Issue 2: REACTIVE ENERGY CLEARED at line 16
Line 99: Heater into low-power
All fine.
Line 138-150: Heater disconnected.
Issue 3: Power(P) and Reactive(Q) TOO HIGH & ERRATIC.
[BTW, Energy and Reactive Energy values in the log are reduced by factor of 2048]
2019-10-18 07:29 PM
So much work because I failed to see negative values are 2-complement. Duh. Hoping energy clearing glitch won't repeat.