Difference between revisions of "RPICT3V1"

From lechacal
Jump to: navigation, search
Line 16: Line 16:
[[File:IMG_1866_small.png | 300px | right]]
{| class="wikitable"   
{| class="wikitable"   

Revision as of 17:28, 3 March 2019

IMG 1868 small.png

Link to shop

Cart logo.jpg

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.
  • Compute real power.
  • Fit on Raspberrypi 2 holes mounting pattern.
  • Attiny84 Mcu


IMG 1866 small.png
Version Compatible?
Raspberrypi 1 A Yes
Raspberrypi 1 B+ Yes
Raspberrypi 2 B Yes
Raspberrypi 3 B Yes
Raspberrypi 3 B+ Yes


The RPICT3V1 must have a voltage sensor to compute Real Power. If you do not want to use a voltage sensor and prefer using an estimated fixed value then use the RPICT3T1 instead.

(Note it is possible to use a different sketch (firmware) to make the RPICT3V1 using estimated voltage. However you will have to flash the unit for that.)

Recommended sensors

IMG 1118 small.png
  • AC Current sensor: SCT-013-000
  • AC Voltage sensor:
    • UK: 77DB-06-09
    • EU: 77DE-06-09
    • US: 77DA-10-09


Starting from sketch version 1.1 the RPICT3V1 is configured over serial.

See general instructions for configuration below:

Configuration over serial for sketch version 1.1.

Configuration over serial for sketch version 1.2 & 1.3.

Configuration over serial for sketch version 2.0.

Output Channels

Using the default sketch version 1.3 and below the output is

NodeID Realpower1 Realpower2 Realpower3 Irms1 Irms2 Irms3 Vrms
  • RealPower in Watts
  • Irms in MilliAmps
  • Vrms in Volts

Using the default sketch version 2.0 and above the output is

NodeID Realpower1 ApparentPower1 Irms1 Vrms1 PowerFactor1 Realpower2 ApparentPower2 Irms2 Vrms2 PowerFactor2 Realpower3 ApparentPower3 Irms3 Vrms3 PowerFactor3
  • RealPower in Watts
  • ApparentPower in Watts
  • Irms in Amperes
  • Vrms in Volts
  • PowerFactor without units.

With sketch version 2.0 and above some channels can be disabled. See this page for more info. RPICT3V1 Disable channels sketch 2

View the data with Python

Please note the configuration must have Emonhub format enabled (format=3). 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.

  1.  #!/usr/bin/python2
  2.  import serial
  3.  ser = serial.Serial('/dev/ttyAMA0', 38400)
  5.  try:
  6.         while 1:
  7.              # Read one line from the serial buffer
  8.              line = ser.readline()
  10.              # Remove the trailing carriage return line feed
  11.              line = line[:-2]
  13.              # Create an array of the data
  14.              Z = line.split(' ')
  16.              # Print it nicely
  17.              print ("----------")
  18.              for i in range(len(Z)):
  19.                  if i==0:
  20.                      print ("NodeID: %s" % Z[0])
  21.                  elif i in [1,2,3]:
  22.                      print ("RealPower %d: %s W" % (i, Z[i]))
  23.                  elif i in [4,5,6]:
  24.                      print ("Irms %d: %s mA" % (i, Z[i]))
  25.                  elif i==7:
  26.                      print ("Vrms: %s V" % (Z[i]))
  28.  except KeyboardInterrupt:
  29.         ser.close()

Emoncms Config (Emonhub)

For default configuration.

   nodename = my_RPICT3V1
   hardware = RPICT3V1
      names = RP1, RP2, RP3, Irms1, Irms2, Irms3, Vrms
      datacode = 0
      scales = 1,1,1,1,1,1,1
      units =W,W,W,mA,mA,mA,V

Rpict3v1 channel emoncms.png


Units are sold flashed with sketch for use with Voltage sensor.

Usage with Voltage sensor

Version 1.0
Version 1.1
Version 1.2
Version 1.3
Version 2.0

Usage without Voltage sensor

If you wish to use the board without using the voltage sensor use the sketch below. Note power will be estimated power only using fixed voltage setup in configuration.
No Voltage Version 1.0
No Voltage Version 1.1
No Voltage Version 1.2

Once the sketch uploaded write the configuration as follow:

$ wget lechacal.com/RPICT/config/A0/rpict3t1.conf
$ ./lcl-rpict-config.py -w rpict3t1.conf

* rpict3t1 above is not a tipo

Related Pages

How to calibrate the Voltage Port

Use Emonhub with RPICT

Howto setup rpi3 for CSV reading

How to program an Attiny85 or Attiny84