RPICT8: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 43: Line 43:


=Files=
=Files=
[[File:IMG_1065_small.png | right | 400px]]


[http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_0.ino Default Sketch V2.0.]<br>
[http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_0.ino Default Sketch V2.0.]<br>
Line 61: Line 62:




[[File:IMG_1065_small.png]]
 


[[File:IMG_1067_small.png]]
[[File:IMG_1067_small.png]]

Revision as of 14:28, 23 February 2018

RPICT8

Link to shop

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

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

Recommended sensors

  • AC Current sensor: SCT-013-000

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)
- Voltage/current combinations for real power computation.
- Output channels

The documentation for serial configuration can be found on this page.
Over Serial Configuration - Sketch 2.2
Over Serial Configuration - Sketch 2.3
Over Serial Configuration - Sketch 2.4
Over Serial Configuration - Sketch 2.5

Starting from sketch 2.4 the board can be configured with the online configurator.

Files

Default Sketch V2.0.

Default Sketch V2.1.

Default Sketch V2.2.

Default Sketch V2.3.

Default Sketch V2.4.

Default Sketch V2.5.

Default Sketch V2.6.

(note boards are sold already flashed with latest firmware).



Emoncms Config (Emonhub)

For default configuration.

 [[11]]
   nodename = RPICT8
   hardware = RPICT8
   [[[rx]]]
       names = Power1, Power2, Power3, Power4, Power5, Power6, Power7, Power8
       datacode = 0
       scales = 1,1,1,1,1,1,1,1
       units = W,W,W,W,W,W,W,W

Python demo script

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/python
import serial
ser = serial.Serial('/dev/ttyAMA0', 38400)

try:
       while 1:
               response = ser.readline()
               z = response.split(",")
               if len(z)>=7:
                       print "Power 1: %s Watts" % z[0]
                       print "Power 2: %s Watts" % z[1]
                       print "Power 3: %s Watts" % z[2]
                       print "Power 4: %s Watts" % z[3]
                       print "Power 5: %s Watts" % z[4]
                       print "Power 6: %s Watts" % z[5]
                       print "Power 7: %s Watts" % z[6]
                       print "Power 8: %s Watts" % z[7][:-2]
                       
except KeyboardInterrupt:
       ser.close()

Emonhub configuration

Below is the emonhub configuration for the RPICT8 with output as setup from manufacture.

[hub]
### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
### see here : http://docs.python.org/2/library/logging.html
loglevel = DEBUG #(default:WARNING)

[interfacers]

[[Serial]] 
   Type = EmonHubSerialInterfacer
   [[[init_settings]]]
       com_port = /dev/ttyAMA0
       com_baud = 38400
     [[[runtimesettings]]]

[[emoncms]] 
   Type = EmonHubEmoncmsHTTPInterfacer
   [[[init_settings]]]
   [[[runtimesettings]]]
       url = http://emoncms.org
       apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
       senddata = 1

[nodes]

 [[11]]
  nodename = my_RPICT8
  firmware = v2.6
  hardware = RPICT8
  [[[rx]]]
     names = P1,P2,P3,P4,P5,P6,P7,P8
     datacode = 0
     scales = 1,1,1,1,1,1,1,1
     units =W,W,W,W,W,W,W,W



Related Pages

Use Emonhub with RPICT

Howto setup rpi3 for CSV reading