RPICT4T4 Version 5: Difference between revisions

From lechacal
Jump to navigation Jump to search
(Created page with " 300px | right [http://lechacalshop.com/en/internetofthing/15-raspberrypi-4-current-sensor-adaptor-4-temperature-emoncms.html Link to shop] This page is fo...")
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:332.jpg | 300px | right]]
[[File:335.jpg | 300px | right]]


[http://lechacalshop.com/en/internetofthing/15-raspberrypi-4-current-sensor-adaptor-4-temperature-emoncms.html Link to shop]
[http://lechacalshop.com/gb/internetofthing/90-raspberrypi-4-current-sensor-adaptor-4-temperature-emoncms.html Link to shop]


This page is for board specific information. More information can be found on the [[Raspberrypi_Current_and_Temperature_Sensor_Adaptor | generic page for RPICT series]].
This page is for board specific information. More information can be found on the [[Raspberrypi_Current_and_Temperature_Sensor_Adaptor | generic page for RPICT series]].
Line 12: Line 12:


==Compatibility==
==Compatibility==
[[File:333.jpg | right | 300px]]
[[File:336.jpg | right | 300px]]
{| class="wikitable"   
{| class="wikitable"   
|+
|+
Line 42: Line 42:
* Asus Tinkerboard has been reported to work with RPICT units. Note we wont be able to provide support for the Tinkerboard.
* Asus Tinkerboard has been reported to work with RPICT units. Note we wont be able to provide support for the Tinkerboard.
==Current Sensor==
==Current Sensor==
[[File:334.jpg | right | 300px]]
[[File:337.jpg | right | 300px]]
Recommended sensor: SCT-013-000
Recommended sensor: SCT-013-000


Line 53: Line 53:


The connector is a 3 way screw terminal connector.
The connector is a 3 way screw terminal connector.
Connection is as follow:<br>
Vcc - Red<br>
Din - Yellow<br>
Gnd - Black<br>
To extend the capacity from 4 to 32 probes the [http://lechacalshop.com/gb/internetofthing/80-ds18b20-junction-board.html DS18B20 junction board] should be used.
[[File:IMG_0104_small.png | 300px]]


==Configuration==
==Configuration==


See general instructions for [[Attiny_Over_Serial_Configuration_A2 | configuration over serial]].
==Default Data Output==
Using the manufacture firmware the data output is:
NodeID P1 P2 P3 P4 T11 T12 T13 T14 T15 T16 T17 T28 T21 T22 T23 T24 T25 T26 T27 T28 T31 T32 T33 T34 T35 T36 T37 T38 T41 T42 T43 T44 T45 T46 T47 T48


Where:
P1 P2 P3 P4 is estimated power in Watt.
Txx temperature in Celsius. For example T23 is temperature probe 3 on port 2. If absent the channel will output a 'nan'


See general instructions for [[Attiny_Over_Serial_Configuration_A2 | configuration over serial]].
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.
 
 
If you prefer having current in Amperes rather than Estimated Power in Watt set VEST=1 in the configuration. In the same manner you can set VEST=1000 to get milliAmperes.
 
==Restore Default Config==
 
You should have received a key when acquiring the unit. Use this key to download and restore the default configuration.<br>
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)==
==Emoncms Config (Emonhub)==
Line 68: Line 98:
     hardware = RPICT4T4
     hardware = RPICT4T4
     [[[rx]]]
     [[[rx]]]
         names = Power1, Power2, Power3, Power4, T1, T2, T3, T4
         names = Power1, Power2, Power3, Power4, T11, T12, T13, T14, T15, T16, T17, T18, T21, T22, T23, T24, T25, T26, T27, T28, T31, T32, T33, T34, T35, T36, T37, T38, T41, T42, T43, T44, T45, T46, T47, T48
         datacode = 0
         datacode = 0
         scales = 1,1,1,1,1,1,1,1
         scales = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
         units = W,W,W,W,C,C,C,C
         units = W,W,W,W,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C


==Python Example==
==Python Example==
Line 114: Line 144:
==Files==
==Files==


[http://lechacal.com/RPICT/4CT4T/RPICT4T4_v1_6.ino Sketch version 1.6]
coming soon...
 
[http://lechacal.com/RPICT/4CT4T/RPICT4T4_v2.0.ino Sketch version 2.0]


==Related Pages==
==Related Pages==
Line 122: Line 150:
[[Howto_setup_Raspbian_for_serial_read]]
[[Howto_setup_Raspbian_for_serial_read]]


[[How to program an Attiny85 or Attiny84]]
[[Gen5_Passive_Component_Setup]]
 


[[File:Rpict4t4_drawing.png]]
[[Use Emonhub with RPICT]]

Revision as of 10:35, 8 October 2021

Link to shop

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
  • DS18B20 extension possible to 32 probes.
  • Microcontroller: Atmel atmega328p
  • 12bit ADC

Compatibility

Version Compatible?
Raspberrypi 1 A No
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.

Current Sensor

Recommended sensor: SCT-013-000

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.

Connection is as follow:
Vcc - Red
Din - Yellow
Gnd - Black

To extend the capacity from 4 to 32 probes the DS18B20 junction board should be used.

Configuration

See general instructions for configuration over serial.

Default Data Output

Using the manufacture firmware the data output is:

NodeID P1 P2 P3 P4 T11 T12 T13 T14 T15 T16 T17 T28 T21 T22 T23 T24 T25 T26 T27 T28 T31 T32 T33 T34 T35 T36 T37 T38 T41 T42 T43 T44 T45 T46 T47 T48

Where: P1 P2 P3 P4 is estimated power in Watt. Txx temperature in Celsius. For example T23 is temperature probe 3 on port 2. If absent the channel will output a 'nan'

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.


If you prefer having current in Amperes rather than Estimated Power in Watt set VEST=1 in the configuration. In the same manner you can set VEST=1000 to get milliAmperes.

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)

For default configuration.

 [[11]]
   nodename = RPICT4T4
   hardware = RPICT4T4
   [[[rx]]]
       names = Power1, Power2, Power3, Power4, T11, T12, T13, T14, T15, T16, T17, T18, T21, T22, T23, T24, T25, T26, T27, T28, T31, T32, T33, T34, T35, T36, T37, T38, T41, T42, T43, T44, T45, T46, T47, T48
       datacode = 0
       scales = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
       units = W,W,W,W,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,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/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])
                 elif i in [1,2,3,4]:
                     print ("Power %d: %s W" % (i, Z[i]))
                 else:
                     print ("Temperature %d: %s C" % (i,Z[i]))
                        
 except KeyboardInterrupt:
        ser.close()

Files

coming soon...

Related Pages

Howto_setup_Raspbian_for_serial_read

Gen5_Passive_Component_Setup

Use Emonhub with RPICT