# ZMPT101B, powerfactor and current shown

**URL:** <https://community.openenergymonitor.org/t/zmpt101b-powerfactor-and-current-shown/11939>\
**Category:** Hardware\
**Tags:** arduino\
**Created:** [15 September 2019 12:15 UTC](https://community.openenergymonitor.org/t/zmpt101b-powerfactor-and-current-shown/11939 "2019-09-15T12:15:47Z")\
**Posts on this page:** 1\
**Showing post:** 52

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [3 January 2020 15:24 UTC](https://community.openenergymonitor.org/t/zmpt101b-powerfactor-and-current-shown/11939/52 "2020-01-03T15:24:02Z")

</div>

> [@xekon](#):
>
> I am currently researching how this is done.

**Very carefully** , bearing in mind sound cards only expect around 1V maximum input.

> [@xekon](#):
>
> I have like 10 spare sound cards sitting in a box.

I use Soundcard Oscilloscope from [Soundcard Scope](https://www.zeitnitz.de/Christian/scope_en)

The spreadsheet is not that difficult, it’s mainly the same formula then copied 881 more times.  
So rather than attaching the spreadsheet, here it is as instructions to type up (44.1 kHz sampling over 20 ms assumed - you need to change that to 16.666 ms):

> (‘R’ = row)
> 
> Col A:  
> R2: “Time [sec]”  
> R3 - R884: the recorded time values.
> 
> Col B:  
> R2: “Amplitude”  
> R3 - R884: the recorded sample values for channel A.
> 
> Col C:  
> R2: “Amplitude”  
> R3 - R884: the recorded sample values for channel B.
> 
> Col E:  
> R2: “Sample”  
> R3 - R884: sample number starting at zero
> 
> Col F:  
> R1:“Output”  
> R2: “sin”  
> R3 - R884: Formula “=$C3_SIN($N$3_$E3)”
> 
> Col G:  
> R2: “cos”  
> R3 - R884: Formula “=$C3_COS($N$3_$E3)”
> 
> Col I:  
> R1:“Input”  
> R2: “sin”  
> R3 - R884: Formula “=$B3_SIN($N$3_$E3)”
> 
> Col J:  
> R2: “cos”  
> R3 - R884: Formula “=$B3_COS($N$3_$E3)”
> 
> Col L:  
> R2: “Harmonic”  
> R3: “step”  
> R5: “Output”  
> R6: “sum sin”  
> R7: “sum cos”  
> R8: “angle”  
> R9: “phase”  
> R10: “amplitude”
> 
> R13: “Input”  
> R14: “sum sin”  
> R15: “sum cos”  
> R16: “angle”  
> R17: “phase”  
> R18: “amplitude”
> 
> R21: “Result”
> 
> Col N:  
> R2: the harmonic number you’re analysing (usually 1)  
> R3: formula “=-$N$2_2_PI()/882”  
> R6: formula “=SUM(F3:F884)”  
> R7: formula “=SUM(G3:G884)”  
> R8: formula “=ATAN2($N$6,$N$7)”  
> R9: formula “=DEGREES($N$8)”  
> R10: formula “=SQRT(N6_N6+N7_N7)/441”  
> R14: formula “=SUM(I3:I884)”  
> R15: formula "=SUM(J3:J884)!  
> R16: formula “=ATAN2($N$14,$N$15)”  
> R17: formula “=DEGREES($N$16)”  
> R18: formula “=SQRT(N14_N14+N15_N15)/441”  
> R21: formula “=MOD(($N17-$N9+180),360)-180”
> 
> Col O:  
> R9, 17 & 21 “degrees”

---

_[View the full topic](https://community.openenergymonitor.org/t/zmpt101b-powerfactor-and-current-shown/11939)._
