Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unitless conversion #71

Open
TrystanLea opened this issue Dec 26, 2018 · 0 comments
Open

Unitless conversion #71

TrystanLea opened this issue Dec 26, 2018 · 0 comments

Comments

@TrystanLea
Copy link
Member

TrystanLea commented Dec 26, 2018

Approach

  • Unitless code included in the _process_rx method in emonhub_interfacer.py
  • Unitless conversion happens after datacode decoding and before scale application in _process_rx
  • This allows unitless conversion to be used by all interfacers e.g tested with JeeInterfacer and SocketInterfacer.
  • Vcal and Ical calibration factors can be applied as part of existing scales mechanism

Part 1 conversion code, hard coded testing:
emon-pi...486ca72

Part 2 conversion code, unitless structure specified in emonhub.conf:
emon-pi...115c01a

EmonHub.conf example

[[10]]
    nodename = emontx1
    [[[rx]]]
       names = power1, power2, power3, power4, vrms
       datacode = h
       phase_shift = 0.0
       unitless = rp,rp,rp,rp,v
       scales = 24131.42,24131.42,24131.42,24131.42,266.41

Power input scale factor is product of vcal and ical:

vcal = 266.41
ical = 90.91 (2000 turns / 22R burden resistor)
vcal x ical = 24131.42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant