RPICT8: Difference between revisions
(→Files) |
|||
(32 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
* MCP3208 ADC | * MCP3208 ADC | ||
* Stackable (up to 5 boards together) | * Stackable (up to 5 boards together) | ||
=Compatibility= | |||
{| class="wikitable" | |||
|+ | |||
|- | |||
!Version | |||
!Compatible? | |||
|- | |||
|Raspberrypi 1 A | |||
|No | |||
|- | |||
|Raspberrypi 1 B+ | |||
|Yes | |||
|- | |||
|Raspberrypi 2 B | |||
|Yes | |||
|- | |||
|Raspberrypi 3 B | |||
|Yes | |||
|- | |||
|Raspberrypi 3 B+ | |||
|Partially (Contact shop if required) [[RPICT Compatibility with B+ | More info here]]. | |||
|- | |||
|} | |||
=Recommended sensors= | =Recommended sensors= | ||
Line 39: | Line 63: | ||
[[Over Serial Configuration - Sketch 2.4]]<br> | [[Over Serial Configuration - Sketch 2.4]]<br> | ||
[[Over Serial Configuration - Sketch 2.5]]<br> | [[Over Serial Configuration - Sketch 2.5]]<br> | ||
[[Over Serial Configuration - Sketch 2.6 | Over Serial Configuration - Sketch 2.6 & 2.7.1]]<br> | |||
[[Over Serial Configuration - Sketch 2.8]]<br> | |||
[[ | [[Over Serial Configuration - Sketch 3.0]]<br> | ||
[http://lechacal.com/RPICT/ | [[File:Online_config_01.png | 300px| link=http://lechacal.com/RPICT/config/generator/v3.0/]] The board can be configured with the [http://lechacal.com/RPICT/config/generator/v3.0/ online configurator]. | ||
[ | [[File:IMG_1065_small.png | right | 400px]] | ||
==Files== | |||
===Default Sketch=== | |||
[http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_5.ino Default Sketch V2.5.]<br> | [http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_5.ino Default Sketch V2.5.]<br> | ||
Line 59: | Line 81: | ||
[http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_6_3.ino Default Sketch V2.6.]<br> | [http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_6_3.ino Default Sketch V2.6.]<br> | ||
[http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_7_1.ino Default Sketch V2.7.1.]<br> | |||
[http://lechacal.com/RPICT/7CT1V/RPICT7V1_v2_8_0.ino Default Sketch V2.8.0.]<br> | |||
[http://lechacal.com/RPICT/7CT1V/RPICT_MCP3208_v3_0_0.ino Default Sketch V3.0.0.]<br> | |||
[http://lechacal.com/RPICT/7CT1V/RPICT_MCP3208_v3.0.1.ino Default Sketch V3.0.1.]<br> | |||
[[ | <small>(note boards are sold already flashed with latest stable sketch).</small> | ||
===noOSC Sketch=== | |||
The Default sketch allows up to 28 computation nodes to be run. If more are needed for higher stacks then we recommend to use the noOSC sketch. This is the same as the default sketch but Over Serial Configuration (OSC) as been removed to allow up to 40 nodes to be computed. Configuration has to be edited in the sketch. | |||
[http://lechacal.com/RPICT/7CT1V/RPICT_noOSC_v1_0.ino noOSC Sketch v1.0]<br> | |||
[http://lechacal.com/RPICT/7CT1V/RPICT_noOSC_v1_1.ino noOSC Sketch v1.1]<br> | |||
==Emoncms Config (Emonhub)== | ==Emoncms Config (Emonhub)== | ||
Make you read [[Raspberrypi_Current_and_Temperature_Sensor_Adaptor#Using_Emoncms | this]] first. | |||
For default configuration. | For default configuration. | ||
Line 86: | Line 119: | ||
Then copy the following into an executable file and run it. | Then copy the following into an executable file and run it. | ||
<syntaxhighlight lang="Python" line='line'> | |||
#!/usr/bin/ | #!/usr/bin/python2 | ||
import serial | import serial | ||
ser = serial.Serial('/dev/ttyAMA0', 38400) | ser = serial.Serial('/dev/ttyAMA0', 38400) | ||
Line 93: | Line 126: | ||
try: | try: | ||
while 1: | 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 | |||
print ("----------") | |||
for i in range(len(Z)): | |||
if i==0: | |||
print ("NodeID: %s" % Z[0]) | |||
else: | |||
print ("Power %d: %s W" % (i, Z[i])) | |||
except KeyboardInterrupt: | except KeyboardInterrupt: | ||
ser.close() | ser.close() | ||
</syntaxhighlight> | |||
=Related Pages= | =Related Pages= | ||
Line 155: | Line 152: | ||
[[Howto setup rpi3 for CSV reading]] | [[Howto setup rpi3 for CSV reading]] | ||
[[Update RPICT firmware (CT7V1/CT4V3/CT8)]] |
Revision as of 12:05, 19 March 2019
RPICT8
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)
Compatibility
Version | Compatible? |
---|---|
Raspberrypi 1 A | No |
Raspberrypi 1 B+ | Yes |
Raspberrypi 2 B | Yes |
Raspberrypi 3 B | Yes |
Raspberrypi 3 B+ | Partially (Contact shop if required) More info here. |
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
Over Serial Configuration - Sketch 2.6 & 2.7.1
Over Serial Configuration - Sketch 2.8
Over Serial Configuration - Sketch 3.0
The board can be configured with the online configurator.
Files
Default Sketch
(note boards are sold already flashed with latest stable sketch).
noOSC Sketch
The Default sketch allows up to 28 computation nodes to be run. If more are needed for higher stacks then we recommend to use the noOSC sketch. This is the same as the default sketch but Over Serial Configuration (OSC) as been removed to allow up to 40 nodes to be computed. Configuration has to be edited in the sketch.
noOSC Sketch v1.0
noOSC Sketch v1.1
Emoncms Config (Emonhub)
Make you read this first.
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/python2
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
print ("----------")
for i in range(len(Z)):
if i==0:
print ("NodeID: %s" % Z[0])
else:
print ("Power %d: %s W" % (i, Z[i]))
except KeyboardInterrupt:
ser.close()