Digital I/O For Raspberry Pi Selection Guide: Form 2208
Digital I/O For Raspberry Pi Selection Guide: Form 2208
Wired+Wireless controllers and brains are licensed under one or more of the following patents: U.S. Patent No(s). 5282222,
RE37802, 6963617; Canadian Patent No. 2064975; European Patent No. 1142245; French Patent No. 1142245; British Patent
No. 1142245; Japanese Patent No. 2002535925A; German Patent No. 60011224.
Opto 22 FactoryFloor, groov, groov EPIC, mobile made simple, Optomux, and Pamux are registered trademarks of Opto 22.
Generation 4, groov Server, ioControl, ioDisplay, ioManager, ioProject, ioUtilities, mistic, Nvio, Nvio.net Web Portal,
OptoConnect, OptoControl, OptoDataLink, OptoDisplay, OptoEMU, OptoEMU Sensor, OptoEMU Server, OptoOPCServer,
OptoScript, OptoServer, OptoTerminal, OptoUtilities, PAC Control, PAC Display, PAC Manager, PAC Project, PAC Project Basic,
PAC Project Professional, SNAP Ethernet I/O, SNAP I/O, SNAP OEM I/O, SNAP PAC System, SNAP Simple I/O, SNAP Ultimate
I/O, and Wired+Wireless are trademarks of Opto 22.
ActiveX, JScript, Microsoft, MS-DOS, VBScript, Visual Basic, Visual C++, Windows, and Windows Vista are either registered
trademarks or trademarks of Microsoft Corporation in the United States and other countries. Linux is a registered
trademark of Linus Torvalds. ARCNET is a registered trademark of Datapoint Corporation. Modbus is a registered trademark
of Schneider Electric, licensed to the Modbus Organization, Inc. Wiegand is a registered trademark of Sensor Engineering
Corporation. Allen-Bradley, CompactLogix, ControlLogix, MicroLogix, SLC, and RSLogix are either registered trademarks or
trademarks of Rockwell Automation. CIP and EtherNet/IP are trademarks of ODVA. Raspberry Pi is a trademark of the
Raspberry Pi Foundation. The registered trademark Ignition by Inductive Automation® is owned by Inductive Automation
and is registered in the United States and may be pending or registered in other countries. CODESYS® is a registered
trademark of 3S-Smart Software Solutions GmbH.
groov includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org)
All other brand or product names are trademarks or registered trademarks of their respective companies or organizations.
Opto 22
Automation Made Simple.
Chapter 1: Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What You Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Digital I/O Carrier Board for Raspberry Pi. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Choose your I/O Family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
G4 I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
SNAP I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
What’s in this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
For Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1: Welcome
INTRODUCTION
Now you can safely and reliably sense and switch 5–60 VDC, 120 VAC, and 240 VAC loads with a Raspberry Pi®.
Your Pi can switch industrial-level electrical loads far beyond the Pi's built in 3.3 VDC GPIO pins, so you can
monitor and control electrical loads required for real-world devices like industrial motors, pumps, and sensors.
This Digital I/O System for Raspberry Pi is ideal for prototyping, proofs of concept, and environments in which
an industrially hardened controller isn’t required.
Digital I/O System for Raspberry Pi—This example shows a Pi, the Digital I/O Carrier Board, a PBSC
industrial power supply, a G4 mounting rack, and 16 G4 digital I/O modules. All items are sold separately; build
your system based on your application’s requirements.
G4 I/O
G4 modules were first introduced in 1989 and are still manufactured today. G4 I/O modules have only 1 point
per module for maximum flexibility. Most output modules are individually fused and include an LED to
indicate status. Each output module can switch up to 3 A.
To choose your G4 rack and I/O, see Chapter 2: G4 Digital I/O.
SNAP I/O
SNAP I/O takes up less space with four points per module and costs less per point. Four LEDs are visible on the
top of the module to indicate status for each of the four points. Most output modules can switch up to 0.75 A
per point or a total of 3 A per module. If you need a higher current rating, SNAP-OMR6 modules can switch up
to 6 A per point.
To choose your SNAP rack and I/O, see Chapter 3: SNAP Digital I/O.
FOR HELP
If you have any questions about these digital I/O products for Raspberry Pi and cannot find the answers you
need in this book or on our website, please contact Opto 22 Product Support. Technical support for all
Opto 22 products is free.
Phone: 800-TEK-OPTO (800-835-6786 toll-free NOTE: Email messages and phone calls
in the U.S. and Canada) to Opto 22 Product Support are
951-695-3080 grouped together and answered in the
Monday through Friday, order received.
7 a.m. to 5 p.m. Pacific Time
Fax: 951-695-3017
Email: support@opto22.com
When calling for technical support, be prepared to provide a complete description of your hardware and
operating system to the Product Support engineer. This information should include:
• Accessories installed
• Type of power supply
• Types of I/O modules and racks used
• Third-party devices installed
• Wiring for your system
2: G4 Digital I/O
A Note on Fuses
These G4 racks come equipped with a 1A fuse, which is sufficient for the Raspberry Pi, rack, and I/O modules.
However, it is not sufficient if you are using USB peripherals such as USB-WiFi dongles, displays, and hard
drives.
If you are using USB peripherals, you should replace the 1 A fuse in the rack with a 5 A fuse. For your
convenience a compatible 5 A fuse is shipped with the OPTO-P1-40P Carrier Board.
Also be sure to see “Power Supplies for G4” on page 47 and “G4 Fuses” on page 49.
Modules
Modules
Built-in
Output
Field Control
Input
Description
Specifications
Dimensions—G4PB8H
Connections—G4PB8H
Notes:
Control
1. Even pins on control connector Module Field
(Header
are connected by etch to Position (Terminal Strip)
Connector)
common.
2. +VCC and return connected to 0 47 1 and 2
terminals marked +5V and 1 45 3 and 4
GND.
2 43 5 and 6
3. At each module position on the
field terminal strip, the lower 3 41 7 and 8
number is always connected to 4 39 9 and 10
pin 1 of the I/O module.
4. Use only 5 VDC logic modules 5 37 11 and 12
when using the mounting rack 6 35 13 and 14
with a Raspberry Pi.
7 33 15 and 16
Description
Specifications
Dimensions—G4PB16H
Connections—G4PB16H
Notes:
Control
1. Even pins on control Module Field
(Header
connector are connected Position (Terminal Strip)
Connector)
by etch to common.
2. +VCC and return 0 47 1 and 2
connected to terminals 1 45 3 and 4
marked +5V and GND.
3. At each module position on 2 43 5 and 6
the field terminal strip, the 3 41 7 and 8
lower number is always
4 39 9 and 10
connected to pin 1 of the
I/O module. 5 37 11 and 12
4. Use only 5 VDC logic 6 35 13 and 14
modules when using the
7 33 15 and 16
mounting rack with a
Raspberry Pi. 8 31 17 and 18
9 29 19 and 20
10 27 21 and 22
11 25 23 and 24
12 23 25 and 26
13 21 27 and 28
14 19 29 and 30
15 17 31 and 32
Features
The following features apply to all G4 I/O modules:
• Maximum flexibility with one point per module
• UL recognized, CSA certified, and CE compliant
• Passed NEMA Showering Arc Test (ICS 2-230)
• Meet IEEE Surge Withstand Specification (IEEE-472)
• Operating temperature: - 30 to 70 C.
1 10–32 VDC
G4IDC5 page 11
12–32 VAC
2.5–28 VDC Low-voltage input G4IDC5D page 11
1 35–60 VDC/AC G4IDC5G page 11
1 10–32 VDC
Manual/auto switch G4IDC5MA page 11
12–32 VAC
2 90–140 VAC/DC G4IAC5 page 14
2 180–280 VAC/DC G4IAC5A page 14
90–140 VAC/DC Low input resistance G4IAC5L page 14
2 90–140 VAC/DC manual/auto switch G4IAC5MA page 14
NA Simulates input G4SWIN page 16
5–60 VDC G4ODC5 page 17
5–200 VDC G4ODC5A page 17
5–60 VDC Manual/auto switch G4ODC5MA page 17
120 VAC G4OAC5 page 19
120/240 VAC G4OAC5A page 19
120/240 VAC Normally closed G4OAC5A5 page 19
120 VAC Manual/auto switch G4OAC5MA page 19
120/240 VAC Manual/auto switch G4OAC5AMA page 19
NA Simulates output G4SWOUT page 21
1
These DC input modules work with either DC or AC field voltages.
2 These AC input modules work with either AC or DC field voltages.
Description
Special features:
• The low-cost G4IDC5D is used for data acquisition.
• The G4IDC5MA features a manual-on/manual-off/automatic switch, ideal for diagnostic testing of
control applications.
Units G4IDC5MA
VDC 10–32
Input voltage range
VAC 12–32
Diagnostic
Key feature
switch
Input current at maximum line mA 25
Isolation, input-to-output (transient):
1 ms V 4000
1 minute V 1500
Turn-on time ms 5
Turn-off time ms 5
Input allowed for off-state mA, V 1, 3
Nominal output supply voltage VDC 5
Output supply voltage range VDC 4.5–6
Output supply current at
mA 12
nominal logic voltage
Input resistance (R1 in schematic) ohms 1.5 K
Control resistance (Rc in schematic) ohms 220
Output voltage drop V @ 50 mA 0.4
Output current (sinking) mA 50
Output leakage with no input microamps @ 30 VDC 100
Transistor V breakdown 30
Temperature:
Operating °C –30 to +70
Storage °C –30 to +85
* At 5Vp-p square wave input, 50% duty cycle.
** Not for use with Opto 22 brains.
To wire sensors to G4 inputs, see “G4 I/O Field Wiring” on page 22.
Description
The G4IAC5MA module features a manual-on/manual-off/automatic switch, ideal for diagnostic testing of
control applications.
To wire sensors to G4 inputs, see “G4 I/O Field Wiring” on page 22.
Description
Description
To wire devices to G4 outputs, see “G4 I/O Field Wiring” on page 22.
Description
To wire devices to G4 outputs, see “G4 I/O Field Wiring” on page 22.
Description
NOTE: The AC input modules listed above will work with either AC or DC field voltages. If you are using them with AC
voltages, see “Input Modules Using AC Field Voltages,” below. If you are using them with DC field voltages, follow this
diagram:
G4IAC5 G4IDC5 NOTE: The DC input modules listed at left will work with either DC or AC field
G4IAC5A G4IDC5G voltages. For DC voltages, see “Input Modules Using DC Field Voltages,” above.
G4IAC5MA G4ID5MA For AC voltages, use this diagram:
See the following pages for details on parts of the SNAP system:
Dimensional Drawing
Features
The following features apply to all SNAP digital I/O modules:
• Four channels per module
• Convenient pluggable wiring terminals
• Channel-specific LEDs
• UL and CE approved (some modules carry additional approvals)
• Accept 22 to 14 AWG wire
<.5 V max. (on) <.5 V max. (on) <.5 V max. (on) <.5 V max. (on)
@ 2 mA sinking @ 2 mA sinking @ 2 mA sinking @ 2 mA sinking
Logic Output Voltage
2.7 V min. (off) 2.7 V min. (off) 2.7 V min. (off) 2.7 V min. (off)
@ 0.4 mA sourcing @ 0.4 mA sourcing @ 0.4 mA sourcing @ 0.4 mA sourcing
Logic Supply Voltage*** 5 VDC ± 0.25 VDC 5 VDC ± 0.25 VDC 5 VDC ± 0.25 VDC 5 VDC ± 0.25 VDC
Logic Supply Current 50 mA maximum 50 mA maximum 50 mA maximum 50 mA maximum
Negative True Logic Out- TTL 74 Series = 1 UL TTL 74 Series = 1 UL TTL 74 Series = 1 UL TTL 74 Series = 1 UL
put Drive TTL 74LS Series = 5 UL TTL 74LS Series = 5 UL TTL 74LS Series = 5 UL TTL 74LS Series = 5 UL
Module Ratings
Module Ratings
SNAP-ODC5SRC SNAP-ODC5SNK
Key Feature Load sourcing Load sinking
Torque, hold-down screws 4 in-lb (0.45 N-m) 4 in-lb (0.45 N-m)
Torque, connector screws 5.26 in-lb (0.6 N-m) 5.26 in-lb (0.6 N-m)
Field Side Ratings (each channel)
Line Voltage - Range 5–60 VDC 5–60 VDC
Line Voltage - Nominal 5–48 VDC 5–48 VDC
Current Rating 0 °C to 70 °C Ambient 3 amps per module 3 amps per module
5 amps peak for 5 amps peak for
Surge Current
1 second 1 second
Minimum Load 20 mA 20 mA
Output Voltage Drop 1.6 volts max.@ 0.75 amps 1.6 volts max.@ 0.75 amps
Off-state Leakage 1 mA @ 60 VDC 1 mA @ 60 VDC
Peak Blocking Voltage 60 VDC 60 VDC
250 VAC - 4A 5x20 mm 250 VAC - 4A 5x20 mm
Fuse Fast-acting Bell Fuse Part No. Fast-acting Bell Fuse Part No.
(Common to all Channels) BEL 5HF4 BEL 5HF4
Opto 22 Part SNAP-FUSE4AB Opto 22 Part SNAP-FUSE4AB
Channel-to-channel isolation Not applicable Not applicable
Logic Side Ratings
Pickup Voltage 4 V @ 5.5 mA 4 V @ 5.5 mA
Dropout Voltage 1 VDC 1 VDC
Control Resistance 220 ohms 220 ohms
Logic Supply Voltage 5 VDC ± 0.25 VDC 5 VDC ± 0.25 VDC
Logic Supply Current 50 mA maximum 50 mA maximum
Module Ratings
Number of Channels Per Module 4 4
Turn-on Time 100 usec 100 usec
Turn-off Time 750 usec 750 usec
Isolation (Field Side to Logic Side) 4,000 volts (transient) 4,000 volts (transient)
-20 to 70 °C, operating -20 to 70 °C, operating
Temperature
-40 to 85 °C, storage -40 to 85 °C, storage
Wire size range 22 to 14 AWG 22 to 14 AWG
Agency Approvals UL, CE, CSA, RoHS, DFARS UL, CE, CSA, RoHS, DFARS
Warranty Lifetime Lifetime
SNAP-OMR6-C SNAP-OMR6T-C
Contact Configuration Form C (SPDT, normally open or closed) Form C (SPDT, normally open or closed)
Line Voltage - Range 0–250 VAC or 5–30 VDC 0–250 VAC or 5–30 VDC
Current Rating 6 amps switching @ 250 VAC / 30 VDC 6 amps switching @ 250 VAC / 30 VDC
Surge Current 6 amps 6 amps
Minimum Load 5 VDC, 10 mA 5 VDC, 10 mA
Contact Resistance 100 milliohms 100 milliohms
Leakage Current none < 1 microamp @ 250 VAC
Clamping Voltage (for transient sup-
External transient suppression required 440 V nominal
pression)
Duty Cycle -- Not applicable -- 1 Hz
Switching Power 1500 VA / 144 W (DC) 1500 VA / 144 W (DC)
Peak Blocking Voltage 250 VAC @ 360 Vpk 250 VAC @ 360 Vpk
Channel-to-channel isolation 300 VAC (1500 Vtransient) 300 VAC (1500 Vtransient)
Pickup Voltage 1 V @ 2 mA 1 V @ 2 mA
Dropout Voltage 4 VDC 4 VDC
Control Resistance 220 ohms 220 ohms
Logic Supply Voltage 5 VDC ± 0.25 VDC 5 VDC ± 0.25 VDC
Logic Supply Current 160 mA maximum 160 mA maximum
Module Ratings
WIRING DIAGRAMS
NOTE: On all SNAP mechanical power relay modules, external transient protection is
recommended for highly inductive loads.
DIMENSIONAL DRAWINGS
All MA Models
OVERVIEW OF ACCESSORIES
Accessories for Digital I/O for Raspberry Pi include the following:
• Power Supplies—see below.
• Fuses—see page 47.
• Jumper straps—see page 50.
POWER SUPPLIES
You can power the rack from the Pi or power the Pi from the rack. We recommend powering the Pi from the
rack, to ensure sufficient, consistent, and reliable power to all devices connected to the Pi. Choose your power
supply based on your system: G4 below, or SNAP on page 48.
USB peripherals: If you are using USB-powered peripherals attached to the Pi (like hard drives, displays, or
WiFi dongles) you require a larger power supply that puts out more current. We recommend a 5 V power
supply rated 2.5 A to 5 A, connected to the rack power terminals.
If you are powering through the Pi, follow the Raspberry Pi Project's 2.5 A recommendation.
Note that if you’re using peripherals, you’ll also need to replace the mounting rack’s 1 A fuse with a 5 A fuse
(included with the Digital I/O Carrier Board). See “Fuses” on page 49.
Here’s an example of how you’d use the worksheet. Suppose you have:
• Raspberry Pi 3 model B
• Peripherals plugged into the Pi’s USB ports that require 1 A total current
• Two SNAP-IDC5-SW, one SNAP-OMR6-C, and one SNAP-OAC5-I on the rack
You’d complete the worksheet like this:
X Power
Total Power Required
Item Quantity Requirements
(Amps)
(Amps)
FUSES
Your Digital I/O System for Raspberry Pi includes a fuse on the mounting rack and fuses on most G4 and SNAP
output modules.
G4 Fuses
G4 mounting rack fuse—The G4PB8H and G4PB16H mounting racks come
equipped with a 1A fuse, which is sufficient for the Raspberry Pi, rack, and I/O
modules. However, if you’re using USB-powered peripherals (especially USB-WiFi
dongles, displays, and hard drives), the 1 A fuse is not sufficient .
If you are using USB peripherals, replace the 1 A fuse in the rack with a 5 A fuse. For
your convenience a compatible 5 A fuse is shipped with the OPTO-P1-40P Carrier
Board.
G4 output module fuse—A 4-amp fuse is mounted on the top of most modules. Each
mounting rack ships with one spare module fuse. Additional fuses can be ordered from
Opto 22 or directly from Wickmann.
G4 Fuse part numbers:
Description Part Number
1 amp fuses for G4PB8H or G4PB16H mounting racks (10 pack) FUSE01B
5 amp fuses for G4PB8H or G4PB16H mounting racks (10 pack) FUSE05B
4 amp fuses for G4 output modules (10 pack)
FUSEG4B
(Not used for G4SWOUT modules)
SNAP Fuses
SNAP mounting rack fuse—The SNAP-D4M comes equipped with a 1A
fuse. If you’re using USB peripherals with your Raspberry Pi, the 1 A fuse is
not sufficient. Replace it with a 4A fuse. For convenience, a compatible 4 A
fuse is shipped with the OPTO-P1-40P Carrier Board.
SNAP output module fuse—A 4 A fuse is located on the top of most
modules, with a small handle to remove it. Replacement fuses can be
ordered from Opto 22 or directly from Wickmann.
Description Part Number
4 amp fuses for SNAP racks and output modules (25 pack) SNAP-FUSE4AB
JUMPER STRAPS
Jumper straps are used to simplify wiring in applications that require a common connection between I/O
module positions.
G4 Jumper Strap
The G4STRAPB (package of 10) can be used on both the G4PB8H and G4PB16H I/O mounting racks. Each
jumper strap has an insulated coating and can be cut to size.
Dimensions:
SNAP-STRAPB works with 8-position field SNAP-STRAP-OMR works with 12-position gray
connectors on many SNAP I/O modules. field connectors on SNAP-OMR6 modules.
OVERVIEW
It’s easy to read and write to Opto 22 I/O points using your favorite Pi-supported language—Python,
Node-RED, Pi Terminal, Pi Filesystem GPIO, or many others.
Visit developer.opto22.com for code samples and tips for using your Pi to read and write to Opto 22 I/O
modules.
IMPORTANT: Opto 22 I/O modules use negative true logic; that is, a zero bit means On and
a 1 bit means Off. When reading and writing to I/O points, remember that 0 is On and 1 is Off.
Place this overlay over your Pi’s GPIO pins for a handy
mapping reference. You can download the template
from developer.opto22.com.