RPICT4V3 v2.0: Difference between revisions

From lechacal
Jump to navigation Jump to search
(15 intermediate revisions by the same user not shown)
Line 76: Line 76:
  - Output format (csv or emoncms)
  - Output format (csv or emoncms)
  - Calibration values (Voltage and Current)
  - Calibration values (Voltage and Current)
- Voltage/current combinations for real power computation.
 
- Output channels


The documentation for serial configuration can be found on this page. <br>
The documentation for serial configuration can be found on this page. <br>


[[Over Serial Configuration - Sketch 3.0]]<br>
[[Over Serial Configuration - Sketch 3.0]]<br>
[[File:Online_config_01.png | 300px| link=http://lechacal.com/RPICT/config/generator/v2.1/]] The board can be configured with the [http://lechacal.com/RPICT/config/generator/v2.1/ online configurator].




Line 91: Line 88:
==Files==
==Files==


===Default Sketch===
===3Phase sketch===
 
This is the default firmware from manufacture.
 
[http://lechacal.com/RPICT/sketch/RPICT4V3_3Phase_V3_v1.1.ino 3Phase Sketch V1.1]<br>
 
===Individual Phase Sketch===
 
If not using the RPICT4V3 for 3 phase you can use the firmware for individual line.


[http://lechacal.com/RPICT/7CT1V/RPICT_MCP3208_v3.0.1.ino Default Sketch V3.0.1.]<br>
[http://lechacal.com/RPICT/7CT1V/RPICT_MCP3208_v3.0.1.ino Default Sketch V3.0.1.]<br>


<small>(note boards are sold already flashed with latest firmware).</small>
Using this sketch the configuration tool below can be used to setup each channels individually.
 
[[File:Online_config_01.png | 300px| link=http://lechacal.com/RPICT/config/generator/v3.1/]]


===noOSC Sketch===
===noOSC Sketch===
Line 108: Line 115:
==Simple Python Example==
==Simple Python Example==
The example python script below will work well with the default configuration.
The example python script below will work well with the default configuration.
 
<syntaxhighlight lang="python">
  import serial
  import serial
  ser = serial.Serial('/dev/ttyAMA0', 38400)
  ser = serial.Serial('/dev/ttyAMA0', 38400)
Line 135: Line 142:
  except KeyboardInterrupt:
  except KeyboardInterrupt:
       ser.close()
       ser.close()
</syntaxhighlight>


To run this first of all make sure you have python-serial package installed
To run this first of all make sure you have python-serial package installed
Line 149: Line 157:
==Data Output==
==Data Output==


Using the manufacture firmware the data output is:
===3Phase firmware===
This is the default from manufacture.
Using the three phase firmware the data output is:
 
NodeID Vrms1 Vrms2 Vrms3 Irms1 Irms2 Irms3 Realpower1 Realpower2 Realpower3 PF1 PF2 PF3
 
Using this firmware channels can not be modified with the configuration. Power associations are as follow.
 
RealPower1 -> CT1 & V1<br>
RealPower2 -> CT2 & V2<br>
RealPower3 -> CT3 & V3<br>
 
===Individual Phase firmware===
Using the individual phase firmware the data output is:


  NodeID Vrms1 Vrms2 Vrms3 Vrms4 Realpower1 Realpower2 Realpower3 Realpower4 Irms1 Irms2 Irms3 Irms4 PF1 PF2 PF3 PF4
  NodeID Vrms1 Vrms2 Vrms3 Vrms4 Realpower1 Realpower2 Realpower3 Realpower4 Irms1 Irms2 Irms3 Irms4 PF1 PF2 PF3 PF4

Revision as of 19:49, 2 June 2021

RPICT4V3 Version 2 & 3

Link to shop

This page is for board specific information. More information can be found on the generic page for RPICT series.

Overview

  • 4 AC current sensors.
  • 3 AC Voltage sensors.
  • Compute real power.
  • Fit on Raspberrypi 4 holes mounting pattern.
  • AtMega328 Mcu (Arduino UNO)
  • MCP3208 12 bits ADC
  • Stackable (up to 5 boards together)

A typical application for the RPICT4V3 is 3 phase systems power reading. The 3 voltages are coupled with 3 CT to perform power computation on each line.

Compatibility

Version Compatible?
Raspberrypi 1 A No
Raspberrypi 1 B+ Yes
Raspberrypi 2 B Yes
Raspberrypi 3 B Yes
Raspberrypi 3 B+ Yes
Raspberrypi 4 B Yes
  • Asus Tinkerboard has been reported to work with RPICT units. Note we won't be able to provide support for the Tinkerboard.

Recommended sensors

  • AC Current sensor:
    • SCT-013-000
    • SCT-019
    • SCT-006
  • AC Voltage sensor:
    • UK: 77DB-06-09
    • EU: 77DE-06-09
    • US: 77DA-10-09

VOLTAGE OUTPUT CT SUCH AS SCT-013-030 and other SCT-013-0XX ARE NOT COMPATIBLE WITH THIS BOARD. Only use the SCT-013-000 which is a current output CT.


Stacking Configuration

General stacking information is described in the RPICT stacking page.
RPICT_Stacking

Software Configuration

Using a serial line terminal program one can configure the following:

- Polling interval
- Output format (csv or emoncms)
- Calibration values (Voltage and Current)


The documentation for serial configuration can be found on this page.

Over Serial Configuration - Sketch 3.0


Files

3Phase sketch

This is the default firmware from manufacture.

3Phase Sketch V1.1

Individual Phase Sketch

If not using the RPICT4V3 for 3 phase you can use the firmware for individual line.

Default Sketch V3.0.1.

Using this sketch the configuration tool below can be used to setup each channels individually.

noOSC Sketch

The Default sketch allows up to 28 computation nodes to be run. If more are needed for higher stacks then we recommend to use the noOSC sketch. This is the same as the default sketch but Over Serial Configuration (OSC) as been removed to allow up to 40 nodes to be computed. Configuration has to be edited in the sketch.

noOSC Sketch v1.0
noOSC Sketch v1.1


Simple Python Example

The example python script below will work well with the default configuration.

 import serial
 ser = serial.Serial('/dev/ttyAMA0', 38400)
 
 try:
       while 1:
            # Read one line from the serial buffer
            line = ser.readline()
 
            # Remove the trailing carriage return line feed
            line = line[:-2]
 
            # Create an array of the data
            Z = line.split(' ')
 
            # Print it nicely
            if len(Z)>16:
                print ("----------")
                print ("          \tCT1\tCT2\tCT3\tCT4") 
                print ("Vrms     :\t%s\t%s\t%s\t%s" % (Z[1], Z[2], Z[3], Z[4]))
                print ("RealPower:\t%s\t%s\t%s\t%s" % (Z[5], Z[6], Z[7], Z[8]))
                print ("Irms     :\t%s\t%s\t%s\t%s" % (Z[9], Z[10], Z[11], Z[12]))
                print ("P Factor :\t%s\t%s\t%s\t%s" % (Z[13], Z[14], Z[15], Z[16]))
 
 
 except KeyboardInterrupt:
       ser.close()

To run this first of all make sure you have python-serial package installed

$ sudo apt-get install python-serial


Then run the command below to download the script.

wget lechacal.com/RPICT/example/RPICT4V3_DEMO_02.py.zip
unzip RPICT4V3_DEMO_02.py.zip

and run it using

python RPICT4V3_DEMO_02.py

Data Output

3Phase firmware

This is the default from manufacture. Using the three phase firmware the data output is:

NodeID Vrms1 Vrms2 Vrms3 Irms1 Irms2 Irms3 Realpower1 Realpower2 Realpower3 PF1 PF2 PF3

Using this firmware channels can not be modified with the configuration. Power associations are as follow.

RealPower1 -> CT1 & V1
RealPower2 -> CT2 & V2
RealPower3 -> CT3 & V3

Individual Phase firmware

Using the individual phase firmware the data output is:

NodeID Vrms1 Vrms2 Vrms3 Vrms4 Realpower1 Realpower2 Realpower3 Realpower4 Irms1 Irms2 Irms3 Irms4 PF1 PF2 PF3 PF4

Real Powers are computed using the following rules:

RealPower1 -> CT1 & V1
RealPower2 -> CT2 & V2
RealPower3 -> CT3 & V3
RealPower4 -> CT4 & V3

These rules can be modified in the configuration if needed.

Other output type can be streamed out. This should be configured in the unit.

All outputs type available are

  • Vrms (V)
  • Irms (mA)
  • Real Power (W)
  • Apparent Power (W)
  • Power Factor
  • Estimated Power

Restore Default Config

$ wget lechacal.com/RPICT/config/B4/rpict4v3_3phase.conf
$ lcl-rpict-config.py -w rpict4v3_3phase.conf

These command above will restore the default configuration for a 100A rated board. For all other rating see the corresponding table here.
Then for parameter kcal replace all the 83.33 with the corresponding calibration coefficient found in the table.

Emoncms Config (Emonhub)

Make sure you read this first.

For default configuration.

 [[11]]
   nodename = RPICT4V3
   hardware = RPICT4V3
   [[[rx]]]
       names = Vrms1,Vrms2,Vrms3,Vrms4,Realpower1,Realpower2,Realpower3,Realpower4,Irms1,Irms2,Irms3,Irms4,PF1,PF2,PF3,PF4
       datacode = 0
       scales = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
       units = V,V,V,V,W,W,W,W,mA,mA,mA,mA

Enclosure

Enclosures kit are available as a 3D printed product. Link to the shop.

Both Raspberrypi 3 and 4 format are available.


Related Pages

Howto_setup_Raspbian_for_serial_read

How to calibrate the Voltage Port

Update RPICT firmware (CT7V1/CT4V3/CT8)