Skip to content

RPICT4V3 Version 6

Find me in the shop

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

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

RPICT4V3 is a Raspberry Pi hat for three phase energy monitoring.

Applications

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.

Three phase diagram connecting current sensors for energy monitoring.

Another use of the RPICT4V3 is for computing power on single phase lines that have different voltages.

The use of 3 phase or individual phase is selectable in the configuration of the device.

Compatibility

Version Compatible?
Raspberrypi 1 A No
Raspberrypi 1 B No mounting holes.
Raspberrypi 1 B+ Yes
Raspberrypi 2 B Yes
Raspberrypi 3 B Yes
Raspberrypi 3 B+ Yes
Raspberrypi 4 B Yes
Raspberrypi 5 Yes
  • AC Current sensor:
    • SCT-013-000 100A/50mA
    • SCT-019 200A/33mA
    • SCT-006 20A/25mA
    • SCT-024 400A/100mA
    • SCT-031 600A/100mA
  • AC Voltage sensor:

RPICT4V3 connected to four current transformers and three voltage sensors.

Stacking Configuration

General stacking information is described in the RPICT stacking page.

RPICT_Stacking Version 5

Software Configuration

Configuration via web interface

First make sure the lcl-package is installed if not done already.

wget lechacal.com/RPICT/tools/lcl-rpict-package_latest.deb
sudo dpkg -i lcl-rpict-package_latest.deb

Now starts a server instance on the Raspberrypi using.

lcl-server.sh

You can now access the Raspberrypi configuration server if you point your browser to the link below

http://raspberrypi:8000/

You can now edit the configuration.

RPICT Configuration web tool for in depth monitoring of energy

An online version of this web interface exists on this link below.

http://lechacal.com/RPICT/config/generator/latest/index.html

Configuration via command line

The documentation for serial configuration can be found on this page. Over_Serial_Configuration_-_Sketch_4 The tool to upload the configuration is called lcl-rpict-config.py. To read the configuration use

lcl-rpict-config.py -a

This produce the /tmp/rpict.conf file containing the configuration of the device.

One can modify this file and write it back using

lcl-rpict-config.py -a -w /tmp/rpict.conf

Files

Unit are sold with the sketch below already loaded.

Default Sketch V5.0.1.

If needed this sketch can be loaded directly from the Raspberrypi following this guide and executing the commands below.

wget lechacal.com/RPICT/sketch/RPICT_v5.0.1.ino.hex
lcl-upload-sketch RPICT_v5.0.1.ino.hex

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().decode().strip()

             # Create an array of the data
             Z = line.split(' ')

             # Print it nicely
             if len(Z)>10:
                 print ("----------")
                 print ("          \tCT1\tCT2\tCT3\tCT4")
                 print ("Vrms     :\t%s\t%s\t%s\t%s" % (Z[8], Z[9], Z[10], ""))
                 print ("RealPower:\t%s\t%s\t%s\t%s" % (Z[1], Z[2], Z[3], ""))
                 print ("Irms     :\t%s\t%s\t%s\t%s" % (Z[4], Z[5], Z[6], Z[7]))


 except KeyboardInterrupt:
        ser.close()

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

sudo apt-get install python3-serial

Then run the command below to download the script.

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

and run it using

python RPICT4V3_DEMO_03.py

Data Output

The default data output is:

NodeID P1 P2 P3 Irms1 Irms2 Irms3 Irms4 Vrms1 Vrms2 Vrms3

Real Powers are computed using the following rules:

P1 -> CT1 & V1
P2 -> CT2 & V2
P3 -> CT3 & V3
Irms4 -> CT4
P1, P2 and P3 are active power (or real power).

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 (A)
  • Real Power (W)
  • Apparent Power (W)
  • Power Factor
  • Estimated Power

Restore Default Config

You should have received a key when acquiring the unit. Use this key to download and restore the default configuration. If the key was XXXX then execute these commands below. Replace XXXX with your own key.

wget lechacal.com/hardware/c/XXXX.conf
lcl-rpict-config.py -a -w XXXX.conf

Emoncms Config (Emonhub)

Make sure you read this first.

For the default configuration use the configuration below.

[[/11|11]]
nodename = RPICT4V3
hardware = RPICT4V3
[[[rx]]]
names = P1,P2,P3,Irms1,Irms2,Irms3,Irms4,Vrms1,Vrms2,Vrms3
datacode = 0
scales = 1,1,1,1,1,1,1,1,1,1
units = W,W,W,A,A,A,A,V,V,V

Enclosure

Enclosures kit are available as a 3D printed product.

Enclosures in the shop

All Raspberrypi 3/4 and 5 format are available.

3D printed enclosure for three phase energy monitoring system.

Howto_setup_Raspbian_for_serial_read

Gen6_Passive_Component_Setup

Calibration VCAL ICAL PHASECAL

Upload Arduino sketch from Raspberrypi to RPICT

Use Emonhub with RPICT

2 Watt Meter method