User Tools

Site Tools

한국어

cp-io22-a4-2:index

CP-IO22-A4-2 Digital and Analog I/O Board for the ComfilePi

The CP-IO22-A4-2 is an IO board accessory for the ComfilePi consisting of 22 digital IO (11 inputs, 11 outputs), 4 16-bit analog inputs, 2 12-bit analog outputs, screw terminals, and indicator LEDs. It can be mounted to the rear panel of the ComfilePi.

Buy

C# Control Example

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

Download Source Code

This example PInvoke's the pigpio library. For more information see the PInvoke documentation and the pigpiod C interface documentation

Pin Map

CP-IO22-A4-2 pins are connected to the ComfilePi's GPIO header as shown below.

  • INPUT : GPIO 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16
  • OUTPUT : GPIO 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27
  • AD IN/OUT : I2C1 SDA, I2C1 SCL

Specifications and IO Circuitry

  • Input Voltage: 5VDC (powered by ComfilePi's 5V pin)
  • Current Rating: 500mA or more
  • Humidity: 35 ~ 85% RH
  • Temperature: -30 ~ 60 ℃
  • Size: 128mm X 78mm

Analog Inputs

  • Interface : I2C
  • Address: 0x48
  • Input Voltage Range : -5Vdc ~ 0 ~ 5Vdc
  • Resolution : 187.5uV / 1bit (-26,666 ~ 0 ~ 26,666)
  • Sample Rate : 1.62mS

Analog Outputs

  • Interface : I2C
  • Address: Ch1-0x62, Ch2-0x63
  • Output Voltage: 0 ~ 5Vdc
  • Resolution : 1.22mV / 1bit (0 ~ 4094)
  • Sample Rate : 12uS
  • Maximum Output Current : 20mA

Digital Inputs

  • Voltage Range: 12 ~ 24V
  • Absolute Min/Max Voltage Range: 3.3 ~ 28V
  • Response Time: 5ms
  • Input OFF Level: <1.8VDC
  • Input ON Level: >2.5VDC
  • Indicator LED OFF Level: <4.5V
  • Indicator LED ON Level: >5.0V

Digital Outputs

  • DC Output Sink (NPN) x 11
  • Maximum Output Voltage: 30VDC
  • Response Time: 10ms
  • Current: 150mA

Setting the Initial Output 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.

  1. Backup the existing /boot/dt-blog.bin file.
    cp /boot/dt-blob.bin dt-blob-backup.bin
  2. Run the following command to decompile the /boot/dt-blog.bin file.
    sudo dtc -I dtb -O dts -o dt-blob.dts /boot/dt-blob.bin
  3. Open the resulting dt-blob.dts file in a text editor and navigate to the pins_cm3 { pin_config { … node.
  4. Add the following to the pins_cm3 { pin_config { … node:
    pin@p17 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO17
    pin@p18 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO18
    pin@p19 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO19
    pin@p20 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO20
    pin@p21 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO21
    pin@p22 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO22
    pin@p23 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO23
    pin@p24 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO24
    pin@p25 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO25
    pin@p26 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO26
    pin@p27 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // GPIO27
  5. Recompile the dt-blob.dts file replacing the existing /boot/dt-blob.bin file.
    sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob.dts
  6. Reboot and the outputs should all be OFF when the ComfilePi is booted.
cp-io22-a4-2/index.txt · Last modified: 2018/06/05 09:30 by COMFILE Technology