RPIWA - Waveform Access & Continuous Monitoring: Difference between revisions

From lechacal
Jump to navigation Jump to search
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:


<big>'''This product is under development. For stable products please refer to our RPICT range instead'''</big>
<big>'''This product is under development. For stable products please refer to our RPICT range instead'''</big>
[[File:IMG_0699_small.png | right | 300px]]


RPIWA range aims to provide the same functionalities as RPICT range which is to compute RMS values and power related values at regular intervals. The bonus with RPIWA is the possibility to directly access the raw data. A developer can now perform his own RMS / power computations if desired. Or maybe plot the fft in real time. Or anything else you invented.  
RPIWA range aims to provide the same functionalities as RPICT range which is to compute RMS values and power related values at regular intervals. The bonus with RPIWA is the possibility to directly access the raw data. A developer can now perform his own RMS / power computations if desired. Or maybe plot the fft in real time. Or anything else you invented.  
Line 10: Line 12:
* RMS and power related computations.
* RMS and power related computations.
* Continuous monitoring.
* Continuous monitoring.
* Limited Product (only RPICT7V1 for now).
* Limited Product (only RPIWA_CT7V1 for now).
* Not stackable.
* Not stackable yet.
* Not stable (we are still working on the software).
* Not stable (we are still working on the software).


Line 18: Line 20:
* No continuous monitoring.
* No continuous monitoring.
* Stable and well established.
* Stable and well established.
* Large range of product.
* Large range of products.
* Stackable.
* Stackable.


Line 24: Line 26:


==Software installation==
==Software installation==
Install the appropriate packages first
sudo apt-get install pigpio python-pigpio python3-pigpio


Get the package and install it
Get the package and install it
  wget http://lechacal.com/RPIWA/rpiwa-realtime-v1.0.0_armhf.deb
  wget http://lechacal.com/RPIWA/rpiwa-realtime-v1.0.0_armhf.deb
  sudo dpkg -i  rpiwa-realtime-v1.0.0_armhf.deb
  sudo dpkg -i  rpiwa-realtime-v1.0.0_armhf.deb
==Reading the data==
Data are made available from a fifo located in /tmp/RPIWA.fifo. You can access the data with a simple cat command.
cat /tmp/RPIWA.fifo
An example of the output is shown below.
479169 -191.791 -0.009 -0.010 -0.009 -0.010 -0.017 -0.011 -0.025
479170 -223.441 -0.009 0.064 0.065 -0.010 -0.017 -0.011 -0.025
479171 -253.859 -0.009 -0.010 -0.009 -0.010 -0.017 -0.011 -0.025
479172 -277.439 -0.009 -0.010 -0.009 -0.010 -0.017 0.063 0.049
479173 -297.191 -0.009 -0.010 -0.009 -0.010 -0.017 -0.011 -0.025
479174 -312.319 0.065 -0.010 -0.009 -0.010 -0.017 0.063 0.049
The format normally depends on what is configured. In this instance the first field is the sample number followed by the instant value in Volts or Ampere for each channels.
If you prefer doing this with a Python program this is a good start for this below.
<syntaxhighlight lang="python">
with open("/tmp/RPIWA.fifo") as f:
    while True:
        line = f.readline()
        if not line:
            break
        print(line, end = "")
</syntaxhighlight>
==Configuration==
The configuration is /etc/rpiwa.conf
sudo nano /etc/rpiwa.conf
This is the content of the file:
# Calibration Values
KCAL = 200.43 74.074 74.074 74.074 74.074 74.074 74.074 74.074
# OutputRate in milliseconds
# Only valid for Output types CT8 and CT7V1
OutputRate = 1000
# RunType
# 0-RAW 1-Instant 2-CT8 3-CT7V1
RunType = 1
===KCAL===
This is an array containing the calibration values.
===RunType===
This defines the output types that should apply. Enter a number between 0 and 3.<br>
'''0-RAW''' Data are plain RAW data from the ADC. i.e. an integer between 0 and 4095. Format is<br>
Sample raw1 raw2 raw3 raw4 raw5 raw6 raw7 raw8
'''1-Instant''' This is similar to raw but data are centred and scaled to physical value. Values are either representing actual voltage or amperage. Format is<br>
Sample inst1 inst2 inst3 inst4 inst5 inst6 inst7 inst8
'''2-CT8''' Output rms data for each channels.Format is<br>
Sample Irms1 Irms2 Irms3 Irms4 Irms5 Irms6 Irms7
'''3-CT7V1''' Compute power of V1 against all other CT for the RPIWA_CT7V1. Format is
Sample Vrms Irms1 Irms2 Irms3 Irms4 Irms5 Irms6 Irms7 P1 P2 P3 P4 P5 P6 P7
===OutputRate===
Does not apply to RunType 0 and 1.
Determine how often data comes out for all channels at one time. This is set in milliseconds. Minimum acceptable is 0.32ms. Must be a multiple of 0.32.
Once the configuration file is modified you must now restart the rpiwa service for changes to take effect.
sudo systemctl restart rpiwa
==Stacking==
There is no stacking support at the moment. Although we plan to implement single board staking at some point with a CT8 unit.

Revision as of 10:30, 2 October 2021

This product is under development. For stable products please refer to our RPICT range instead

RPIWA range aims to provide the same functionalities as RPICT range which is to compute RMS values and power related values at regular intervals. The bonus with RPIWA is the possibility to directly access the raw data. A developer can now perform his own RMS / power computations if desired. Or maybe plot the fft in real time. Or anything else you invented. A great benefit is the ability to perform continuous monitoring as the waveform sampling is now uninterrupted.

Let's compare RPICT and RPIWA in the current state.

RPIWA

  • RMS and power related computations.
  • Continuous monitoring.
  • Limited Product (only RPIWA_CT7V1 for now).
  • Not stackable yet.
  • Not stable (we are still working on the software).

RPICT

  • RMS and power related computations.
  • No continuous monitoring.
  • Stable and well established.
  • Large range of products.
  • Stackable.

If you are acquiring our product for the first time we recommend starting with RPICT units instead here.

Software installation

Install the appropriate packages first

sudo apt-get install pigpio python-pigpio python3-pigpio

Get the package and install it

wget http://lechacal.com/RPIWA/rpiwa-realtime-v1.0.0_armhf.deb
sudo dpkg -i  rpiwa-realtime-v1.0.0_armhf.deb

Reading the data

Data are made available from a fifo located in /tmp/RPIWA.fifo. You can access the data with a simple cat command.

cat /tmp/RPIWA.fifo

An example of the output is shown below.

479169 -191.791 -0.009 -0.010 -0.009 -0.010 -0.017 -0.011 -0.025
479170 -223.441 -0.009 0.064 0.065 -0.010 -0.017 -0.011 -0.025
479171 -253.859 -0.009 -0.010 -0.009 -0.010 -0.017 -0.011 -0.025
479172 -277.439 -0.009 -0.010 -0.009 -0.010 -0.017 0.063 0.049
479173 -297.191 -0.009 -0.010 -0.009 -0.010 -0.017 -0.011 -0.025
479174 -312.319 0.065 -0.010 -0.009 -0.010 -0.017 0.063 0.049

The format normally depends on what is configured. In this instance the first field is the sample number followed by the instant value in Volts or Ampere for each channels.

If you prefer doing this with a Python program this is a good start for this below.

 with open("/tmp/RPIWA.fifo") as f:
    while True:
        line = f.readline()
        if not line:
            break
        print(line, end = "")

Configuration

The configuration is /etc/rpiwa.conf

sudo nano /etc/rpiwa.conf

This is the content of the file:

# Calibration Values
KCAL = 200.43 74.074 74.074 74.074 74.074 74.074 74.074 74.074

# OutputRate in milliseconds
# Only valid for Output types CT8 and CT7V1
OutputRate = 1000

# RunType
# 0-RAW 1-Instant 2-CT8 3-CT7V1
RunType = 1

KCAL

This is an array containing the calibration values.

RunType

This defines the output types that should apply. Enter a number between 0 and 3.
0-RAW Data are plain RAW data from the ADC. i.e. an integer between 0 and 4095. Format is

Sample raw1 raw2 raw3 raw4 raw5 raw6 raw7 raw8

1-Instant This is similar to raw but data are centred and scaled to physical value. Values are either representing actual voltage or amperage. Format is

Sample inst1 inst2 inst3 inst4 inst5 inst6 inst7 inst8

2-CT8 Output rms data for each channels.Format is

Sample Irms1 Irms2 Irms3 Irms4 Irms5 Irms6 Irms7

3-CT7V1 Compute power of V1 against all other CT for the RPIWA_CT7V1. Format is

Sample Vrms Irms1 Irms2 Irms3 Irms4 Irms5 Irms6 Irms7 P1 P2 P3 P4 P5 P6 P7

OutputRate

Does not apply to RunType 0 and 1. Determine how often data comes out for all channels at one time. This is set in milliseconds. Minimum acceptable is 0.32ms. Must be a multiple of 0.32.

Once the configuration file is modified you must now restart the rpiwa service for changes to take effect.

sudo systemctl restart rpiwa

Stacking

There is no stacking support at the moment. Although we plan to implement single board staking at some point with a CT8 unit.