RPICT4T4: Difference between revisions
Line 9: | Line 9: | ||
* Attiny84 Mcu | * Attiny84 Mcu | ||
=Compatibility= | |||
{| class="wikitable" | |||
|+ | |||
|- | |||
!Version | |||
!Compatible? | |||
|- | |||
|Raspberrypi 1 A | |||
|No | |||
|- | |||
|Raspberrypi 1 B+ | |||
|Yes | |||
|- | |||
|Raspberrypi 2 B | |||
|Yes | |||
|- | |||
|Raspberrypi 3 B | |||
|Yes | |||
|- | |||
|Raspberrypi 3 B+ | |||
|Yes | |||
|- | |||
|} | |||
==Current Sensor== | ==Current Sensor== | ||
[[File:IMG_1542_small.png | right | 300px]] | [[File:IMG_1542_small.png | right | 300px]] |
Revision as of 21:29, 19 September 2018
This page is for board specific information. More information can be found on the generic page for RPICT series.
- 4x AC Current Sensors
- 4x DS18B20 Temperature Sensors
- Attiny84 Mcu
Compatibility
Version | Compatible? |
---|---|
Raspberrypi 1 A | No |
Raspberrypi 1 B+ | Yes |
Raspberrypi 2 B | Yes |
Raspberrypi 3 B | Yes |
Raspberrypi 3 B+ | Yes |
Current Sensor
Recommended sensor: SCT-013-000
Default Voltage for power calculation: 240V (can be modified in firmware).
For AC current only.
Temperature Sensor
Connector: 3.5mm Jack
The intended temperature sensor is the DS18B20.
The connector is a 3 way screw terminal connector.
Configuration
Starting from sketch version 1.4 the RPICT4T4 is configured over serial.
See general instructions for configuration over serial.
Emoncms Config (Emonhub)
For default configuration.
[[11]] nodename = RPICT4T4 hardware = RPICT4T4 [[[rx]]] names = Power1, Power2, Power3, Power4, T1, T2, T3, T4 datacode = 0 scales = 1,1,1,1,1,1,1,1 units = W,W,W,W,C,C,C,C
Python Example
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) try: while 1: response = ser.readline() z = response.split(",") if len(z)>6: 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 "Temperature 1: %s C" % z[4] print "Temperature 2: %s C" % z[5] print "Temperature 3: %s C" % z[6] print "Temperature 4: %s C" % z[7][:-2] except KeyboardInterrupt: ser.close()