RPICT8 Version 5
RPICT8 Master Version 5
This page is for board specific information. More information can be found on the generic page for RPICT series.
- 8 AC current sensors.
- Compute Irms and Estimated Power.
- Fit on Raspberrypi 4 holes mounting pattern.
- AtMega328 Mcu (Arduino UNO)
- MCP3208 12bit ADC
- Stackable with RPICT8 Slave
- 1 Compatibility
- 2 Recommended sensors
- 3 Stacking Configuration
- 4 Software Configuration
- 5 Files
- 6 Default Data Output
- 7 Emoncms Config (Emonhub)
- 8 Python demo script
- 9 Enclosure
- 10 Related Pages
|Raspberrypi 1 A||No|
|Raspberrypi 1 B||No mounting holes.|
|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.
OrangePi. There is an ongoing project to port RPICT8 to Orange Pi. This will under the naming of OPICT8 since the mechanical design must be different. Preliminary setup is shown here. Get in touch with us if you are interested in OPICT8.
AC Current sensor
- SCT-024 400A/100mA
- SCT-031 600A/100mA
Only current output CT are supported.
General stacking information is described in the RPICT stacking page.
For any units ordered before the 1st of July 2022 the firmware version is version 3. Follow this link below for configuration. If possible upgrade to firmware version 4.
Before 1st July 22 RPICT8 Configuration
Upgrading to sketch version 4
Configuration via web interface
First make sure the lcl-package is installed if not done already.
wget lechacal.com/RPICT/tools/lcl-rpict-package_latest.deb sudo dpkg -i lcl-rpict-package_latest.deb
Now starts a server instance on the Raspberrypi using.
You can now access the Raspberrypi configuration server if you point your browser to the link below
You can now edit the configuration.
An online version of this web interface exists on this link below.
Configuration via command line
The documentation for serial configuration can be found on this page.
The tool to upload the configuration is called lcl-rpict-config.py. To read the configuration use
This produce the /tmp/rpict.conf file containing the configuration of the device.
One can modify this file and write it back using
lcl-rpict-config.py -a -w /tmp/rpict.conf
Unit are sold with the sketch below already loaded.
If needed this sketch can be loaded directly from the Raspberrypi following this guide and executing the commands below.
wget lechacal.com/RPICT/sketch/RPICT_MCP3208_v4.1.0.ino.hex lcl-upload-sketch.sh RPICT_MCP3208_v4.1.0.ino.hex
Default Data Output
Using the manufacture firmware the data output is:
NodeID P1 P2 P3 P4 P4 P5 P6 P7 P8
P1 being the estimated Power using CT1. `Estimated Power` computes power multiplying Irms by Vest. Where Vest is the estimated Voltage setup in the config. By default Vest=240V we recommend to change this to 220V or 110V if your local voltage supply differ.
Other output type can be streamed out. This should be configured in the unit.
All outputs type available are
- Estimated Power (W)
- Irms (A)
If stacked with another unit that include a voltage port the following outputs can also be added:
- Real Power (W)
- Apparent Power (W)
- Power Factor
- Vrms (V)
Restore Default Config
You should have received a key when acquiring the unit. Use this key to download and restore the default configuration.
If the key was XXXX then execute these commands below. Replace XXXX with your own key.
$ wget lechacal.com/hardware/c/XXXX.conf $ lcl-rpict-config.py -w XXXX.conf
Emoncms Config (Emonhub)
Make you read this first.
For default configuration.
[] 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 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().decode().strip() # 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) else: print("Power %d: %s W" % (i, Z[i])) except KeyboardInterrupt: ser.close()
Enclosures kit are available as a 3D printed product. Link to the shop.
Both Raspberrypi 3 and 4 format are available.
Howto setup Raspbian for serial read
Update RPICT firmware (CT7V1/CT4V3/CT8)