RPICT3T1 RLY2

From lechacal
Revision as of 13:09, 13 January 2021 by Administrator (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Link to the shop

IMG 0546 small.png

Overview

  • 3 AC current input port
  • 1 Temperature DS18B20 port
  • 2 Relays 250V/10A

AC and Temperature Reading

The RPICT3T1_RLY2 is the same unit as the RPICT3T1 with 2 relays added.

Refer to the RPICT3T1 for full documentation covering the AC reading side.

Relay Control

Connection

IMG 0549 small.png

Each relay port is a 3 way screw terminal block with the following connection:

  • NO - Normally Open (Left)
  • CO - Common (Middle)
  • NC - Normally Closed (Right)

Technical specs

Relays are HLS8L-DC5V.

The datasheet is available here.

Control

IMG 0547 small.png

The 2 relays are connected to GPIO5 and GPIO6 on the raspberrypi.

These can be easily controlled with the RPi.GPIO module from python.

We made a small script to get you started with this. This can be downloaded as follow:

wget lechacal.com/RPICT/tools/lcl-gpio-toggle.py.zip
unzip lcl-gpio-toggle.py.zip

This utility simply toggles the relay state. For example to change the state on the first relay (i.e. gpio5) one will execute

python lcl-gpio-toggle.py 5

The code of the utility is given below.

import RPi.GPIO as GPIO
import sys
 
pin = int(sys.argv[1])
 
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(pin, GPIO.OUT)
state = GPIO.input(pin)
if state:
    GPIO.output(pin, GPIO.LOW)
    print "GPIO%d Low" % pin
else:
    GPIO.output(pin, GPIO.HIGH)
    print "GPIO%d High" % pin




IMG 0548 small.png