RPICT4V3: Difference between revisions

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


[http://lechacalshop.com/en/rpict-series/14-raspberrypi-4x-current-sensor-adaptor-3-voltage-emoncms-3phase.html Link to shop]
[http://lechacalshop.com/en/rpict-series/14-raspberrypi-4x-current-sensor-adaptor-3-voltage-emoncms-3phase.html Link to shop]
<big>DISCONTINUED PRODUCT SEE NEWEST VERSION BELOW</big><br>
[[RPICT4V3_v2.0]]


==Overview==
==Overview==


This is RPICT4V3 version 1. This version does not support over serial configuration.
<big>This is RPICT4V3 version 1. This version does not support over serial configuration.</big>


This page is for board specific information. More information can be found on the [[Raspberrypi_Current_and_Temperature_Sensor_Adaptor | generic page for RPICT series]].
This page is for board specific information. More information can be found on the [[Raspberrypi_Current_and_Temperature_Sensor_Adaptor | generic page for RPICT series]].
Line 38: Line 41:
|-
|-
|Raspberrypi 3 B+
|Raspberrypi 3 B+
|Yes
|-
|Raspberrypi 4 B
|Yes
|Yes
|-
|-
|}
|}
* Asus Tinkerboard has been reported to work with RPICT units. Note we wont be able to provide support for the Tinkerboard.


==Recommended sensors==
==Recommended sensors==
Line 63: Line 71:
[http://lechacal.com/RPICT/4CT3V/RPICT4V3_v1_5.ino Default Sketch V1.5.]<br>
[http://lechacal.com/RPICT/4CT3V/RPICT4V3_v1_5.ino Default Sketch V1.5.]<br>


[http://lechacal.com/RPICT/4CT3V/RPICT4V3_v1_6.ino Default Sketch V1.6.]<br>
[http://lechacal.com/RPICT/4CT3V/RPICT4V3_v1.6.ino Default Sketch V1.6.]<br>


==Configuration==
==Configuration==
Line 117: Line 125:
First of all make sure you have python-serial package installed
First of all make sure you have python-serial package installed


  $ sudo apt-get install python-serial
  $ sudo apt-get install python3-serial


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


  #!/usr/bin/python2
  #!/usr/bin/python3
  import serial
  import serial
  ser = serial.Serial('/dev/ttyAMA0', 38400)
  ser = serial.Serial('/dev/ttyAMA0', 38400)
Line 160: Line 168:
[[How_to_program_an_Attiny85_or_Attiny84]]
[[How_to_program_an_Attiny85_or_Attiny84]]


[[Howto setup rpi3 for CSV reading]]
[[Howto setup Raspbian for serial read]]

Latest revision as of 13:40, 26 January 2022

Link to shop

DISCONTINUED PRODUCT SEE NEWEST VERSION BELOW
RPICT4V3_v2.0

Overview

This is RPICT4V3 version 1. This version does not support over serial configuration.

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

  • 4x AC current sensor
  • 3x AC Voltage sensor.
  • Compute real power.
  • Fit on Raspberrypi 4 holes mounting pattern.
  • Attiny84 Mcu

THIS IS VERSION 1 FOR THIS TYPE OF BOARD. SEE VERSION 2 HERE. RPICT4V3_v2.0

Compatibility

Version Compatible?
Raspberrypi 1 A Yes
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 wont be able to provide support for the Tinkerboard.

Recommended sensors

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

Files

Default Sketch V1.1.

Default Sketch V1.2.

Default Sketch V1.3.

Default Sketch V1.4.

Default Sketch V1.5.

Default Sketch V1.6.

Configuration

Starting from sketch version 1.6 the RPICT4V3 can be configures over serial.

See the configuration documentation here. Attiny_Over_Serial_Configuration_A2

Output Channels

Using the default sketch version 1.6 and above the output is

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

Some channels can be disabled. See this page for more info. RPICT3V1 Disable channels sketch 2

Power Association

The RPICT4V3 computes RealPower using the combination of Voltage and Current sensor.
The 4 RealPower are computed using the following combinations:

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

Emoncms Config (Emonhub)

For default configuration.

 [[11]]
   nodename = RPICT4V3
   hardware = RPICT4V3
   [[[rx]]]
       names = Vrms1,Vrms2,Vrms3,Realpower1,Realpower2,Realpower3,Realpower4
       datacode = 0
       scales = 1,1,1,1,1,1,1
       units = V,V,V,W,W,W,W


View the data with Python

Please note the uploaded sketch must have CSV enabled. 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 python3-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()

            # 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)>15:
                print ("----------")
                print ("          \tCT1\tCT2\tCT3\tCT4") 
                print ("RealPower:\t%s\t%s\t%s\t%s" % (Z[1], Z[6], Z[11], Z[16]))
                print ("AppaPower:\t%s\t%s\t%s\t%s" % (Z[2], Z[7], Z[12], Z[17]))
                print ("Irms     :\t%s\t%s\t%s\t%s" % (Z[3], Z[8], Z[13], Z[18]))
                print ("Vrms     :\t%s\t%s\t%s\t%s" % (Z[4], Z[9], Z[14], Z[19]))
                print ("PowerFact:\t%s\t%s\t%s\t%s" % (Z[5], Z[10], Z[15], Z[20]))

                       
except KeyboardInterrupt:
       ser.close()

Sketch Upload

An avr programmer with 6pin ribbon cable is needed for programming. See our programmer called NanoProg_v1.

Related Link

How to calibrate the Voltage Port

How_to_program_an_Attiny85_or_Attiny84

Howto setup Raspbian for serial read