Skip to main content

Solid state relay

Project description

GitHub Issues GitHub Commit Maintained Build status badge MIT licensed

Python-OC03

The OC03 xChip is a low-voltage control relay module able to switch AC and DC loads. It is based on the PCA9554A and TLP241A.

The optically isolated relay is controlled by a PCA9554A IO expander, which provides an control interface to the switch. The PCA9554A has several selectable I2C addresses accessible via solder pads.

The TLP241A photorelay consist of a photo MOSFET optically coupled to an infrared light emitting diode which switches a AC or DC load. It provides an isolation voltage of 5000 Vrms, making it suitable for applications that require reinforced circuit insulation.

Usage

Mu-editor

Download Mu-editor

CW01 and CW02

  • Use XinaBoxUploader and flash MicroPython to the CW01/CW02.
  • Download Python packages from the REPL with the following code:
    import network
    import upip
    sta_if = network.WLAN(network.STA_IF)
    sta_if.active(True)
    sta_if.connect("ssid", "password")
    upip.install("xinabox-OC03")
    

CC03, CS11 and CW03

  • Download the .UF2 file for CC03/CS11/CW03 CircuitPython and flash it to the board.
  • TO DO

MicroBit

  • TO DO

Raspberry Pi

Requires Python 3

pip3 install xinabox-OC03

Example

from xOC03 import xOC03
from xCore import xCore

OC03 = xOC03()

# start OC03
OC03.init()

# sleep time
DELAY = 500

# infinite loop
while True:

    # close relay
    OC03.writePin(True)
    xCore.sleep(DELAY)

    # open relay
    OC03.writePin(False)
    xCore.sleep(DELAY)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xinabox-OC03-0.0.5.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page