RPICT3V1: Difference between revisions
No edit summary |
|||
Line 27: | Line 27: | ||
See general instructions for [[Attiny Over Serial Configuration | configuration over serial]]. | See general instructions for [[Attiny Over Serial Configuration | configuration over serial]]. | ||
==View the data with Python== | ==View the data with Python== | ||
Line 73: | Line 55: | ||
except KeyboardInterrupt: | except KeyboardInterrupt: | ||
ser.close() | ser.close() | ||
==EmonCMS Output== | |||
Using the default sketch the output will be <br> | |||
NodeID Realpower1 Realpower2 Realpower3 Irms1 Irms2 Irms3 Vrms | |||
* RealPower in Watts | |||
* Irms in MilliAmps | |||
* Vrms in Volts | |||
[[File:rpict3v1_channel_emoncms.png]] | |||
==Sketch== | |||
[http://lechacal.com/RPICT/CT3V1/RPICT3V1_v1_0.ino Version 1.0]<br> | |||
[http://lechacal.com/RPICT/CT3V1/RPICT3V1_v1_1.ino Version 1.1] | |||
If you wish to use the board as a RPICT3 without any use of the voltage use the sketch below. Note power will be estimated power only.<br> | |||
[http://lechacal.com/RPICT/CT3V1/RPICT3V1_noV_v1_0.ino No Voltage Version 1.0] | |||
==Related Links== | ==Related Links== | ||
[[How to calibrate the Voltage Port]] | [[How to calibrate the Voltage Port]] |
Revision as of 09:22, 26 May 2017

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
Recommended sensors

- AC Current sensor: SCT-013-000
- AC Voltage sensor:
- UK: 77DB-06-09
- EU: 77DE-06-09
- US: 77DA-10-09 or STA-4190D
Configuration
Starting from sketch version 1.1 the RPICT3V1 is configured over serial.
See general instructions for configuration over serial.
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 python-serial
Then copy the following into an executable file and run it.
#!/usr/bin/python import serial ser = serial.Serial('/dev/ttyAMA0', 38400, timeout=1) try: while 1: response = ser.readline() z = response.split(",") if len(z)>=6: print "RealP 1: %s Watts" % z[0] print "RealP 2: %s Watts" % z[1] print "RealP 3: %s Watts" % z[2] print "Irms 1: %s mA" % z[3] print "Irms 2: %s mA" % z[4] print "Irms 3: %s mA" % z[5] print "Vrms : %s Volts" % z[6][:-2] except KeyboardInterrupt: ser.close()
EmonCMS Output
Using the default sketch the output will be
NodeID Realpower1 Realpower2 Realpower3 Irms1 Irms2 Irms3 Vrms
- RealPower in Watts
- Irms in MilliAmps
- Vrms in Volts
Sketch
If you wish to use the board as a RPICT3 without any use of the voltage use the sketch below. Note power will be estimated power only.
No Voltage Version 1.0