Table of Contents

CP-IO19R - IO Relay Board Accessory for ComfilePi 40 pin header

The CP-IO19R is an IO relay board accessory for the ComfilePi consisting of 11 bipolar inputs, 8 relay outputs, screw terminals, and corresponding indicator LEDs. It can be mounted to the rear panel of the CPi-A/B/S series panel PCs.

This product cannot be mounted on CPi-C070WR4C.

Buy

C# Control Example

The following is an example project illustrating how to program the CP-IO19R in C# using the Mono Framework.

Source Code

This example application uses the following .NET libraries to control the digital inputs and relays.

Python Example

The pigpio library also has a Python interface.

The following is an example illustrating digital inputs and outputs:

import pigpio
 
pi = pigpio.pi()
 
pi.set_mode(4, pigpio.INPUT)
pi.set_mode(17, pigpio.OUTPUT)
 
while True:
    if pi.read(4):
        pi.write(17, 1)
    else:
        pi.write(17, 0)
 
pi.stop()

Pin Map

The CP-IO19R's pins are connected to the ComfilePi's GPIO header as shown below.

Inputs: GPIO 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16
Outputs: GPIO 17, 18, 19, 20, 21, 22, 23, 24

Specifications and IO Circuitry

Inputs

Outputs

Please also consider adding an RC Snubber to your solution.

Setting the Initial IO State

It may be necessary to modify the ComfilePi's initial GPIO output state to prevent the ComfilePi from turning the outputs ON when the ComfilePi boots.

Modify the ComfilePi's /boot/config.txt file with the following configuration to set the initial IO state. See GPIO control in config.txt for more information.

gpio=4-13=ip
gpio=16=ip
gpio=17-24=op,np,dl

COMFILE Technology's Documentation Library