Skip to content

RPICT3V1T1

RPICT3V1T1 is a Raspberry Pi hat for iot energy monitoring.

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

  • 3 AC current sensor
  • 1 AC Voltage sensor.
  • 1 Temperature sensor.
  • Computes ActivePower, ApparentPower, ReactivePower, PowerFactor, Frequency, Vrms, Irms.
  • Fit on the 2 holes mounting pattern for Raspberrypi.
  • Arduino AVR32DB28 Microcontroller.

Find me in the shop

Compatibility

Version Compatible?
Raspberrypi 1 A Yes
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

Alternatives known to work with:

  • Asus Tinkerboard.
  • Orange Pi

RPICT3V1T1 is a Raspberry Pi hat for iot energy monitoring.

Important note: Each RPICT card comes with support for one specific CT only. Make sure the correct support is selected at purchase time.

RPICT3V1T1 hat connected to DS18B20 probe and three current sensors plus voltage transformer.

Default Data Output

Using the default configuration the output is
NodeID Rp1 Rp2 Rp3 Irms1 Irms2 Irms3 Vrms T

  • Rp - RealPower in Watts. (active power).
  • Irms - Current in Amperes.
  • Vrms - Voltage in Volts.
  • T - Temperature in Celsius.

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

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

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 -w XXXX.conf

Emoncms Config (Emonhub)

 [[11]]
   nodename = my_RPICT3T1V1
   hardware = RPICT3T1V1
   [[[rx]]]
      names = RP1, RP2, RP3, Irms1, Irms2, Irms3, Vrms, T
      datacode = 0
      scales = 1,1,1,1,1,1,1,1
      units = W,W,W,A,A,A,V,C

View the data with Python

The example script below will be a good starting point.

First of all make sure you have python-serial package installed

sudo apt-get install python-serial

Then copy the following into an executable file and run it.

#!/usr/bin/python3
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)>15:
                print ("----------")
                print ("          \tCT1\tCT2\tCT3")
                print ("RealPower:\t%s\t%s\t%s" % (Z[1], Z[2], Z[3]))
                print ("Irms     :\t%s\t%s\t%s" % (Z[4], Z[5], Z[6]))
                print ("Vrms     :\t%s" % (Z[7]))
                print ("Temperatu:\t%s" % (Z[8]))

except KeyboardInterrupt:
       ser.close()

To get the above example just enter the command below.

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

and run it using

python3 RPICT3V1_DEMO.py

Sketch

Unit are sold with the sketch below already loaded.

Default Sketch V4.2.0.

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_MCP3208_v4.2.0.ino.hex
lcl-upload-sketch.sh RPICT_MCP3208_v4.2.0.ino.hex

Howto setup Raspbian for serial read

Gen6_Passive_Component_Setup

Calibration VCAL ICAL PHASECAL

Use Emonhub with RPICT

FAQ

More generic FAQ are here. Frequently Asked Questions