OptoIn8-I2C

From Land Boards Wiki
Jump to navigation Jump to search

Tindie-mediums.png

OptoIn8-I2C-X3-CCA-5456-720px.jpg

Features

  • Eight optically-isolated input channels on card
    • (8) 4N25 optoisolators (20% CTR)
    • 330 ohm series resistor
    • 3.3V or 5V input
    • Wider input voltage range by either replacing 1/4W R1-R8 resistors or adding additional external resistor
  • I2C host interface
    • MCP23008 I2C Parallel I/O
    • Two Wire interface
    • 100/400 KHZ operation
    • Jumper selectable I2C SDA/SCL terminators
    • 3-bit address (Jumper selectable) - Up to 8 boards
    • Single 4-pin host interface connector (Ground, Power, Clock, Data)
  • 24LC024 ODAS Personality EEPROM
    • pid = 4
  • 3.3V or 5V Host operation
  • Compatible with Arduino, Raspberry Pi, BeagleBone Black
  • DB-25 male Opto input connector for rugged uses
  • 95x95mm form factor
  • (4) 6-32 mounting holes - one on each corner

Voltages for Operation

  • Typical Opto inputs can be either 3.3V or 5V
    • Higher opto input voltages can be achieved
      • Either replace R1-R8 with higher value resistors or,
      • Adding external input scaling resistors, R1-R8
      • Factory installed value for R1-R8 is 330 Ohms

3.3V Opto Inputs

  • Vin = 3.3V
  • V(LED) = 1.2V
  • Voltage drop across series resistors (R1-R8) = 2.1V
  • Series resistor = 330 Ohms
  • Input current = 6.36 mA
  • Current transfer ratio = 20% (0.2)
  • Opto output current (max) 1.2 mA
  • Opto out pullup resistor = 4.7K
  • Opto Out Voltage depends on Power Supply used for card
    • With 3.3V power supply on card
      • 3.3V/4.7K = 0.7 mA
    • With 5V power supply on card
      • 5/4.7K = 1 mA
      • Sufficient current margin

5V Opto Inputs

  • Vin = 5V
  • V(LED) = 1.2V
  • Voltage drop across series resistors (R1-R8) = 3.8V
  • Series resistor = 330 Ohms
  • Input current = 11.5 mA
  • Current transfer ratio = 20% (0.2)
  • Opto output current (max) 2.3 mA
  • Opto out pullup resistor = 4.7K
  • Opto Out Voltage depends on Power Supply used for card
    • With 3.3V power supply on card
      • 3.3V/4.7K = 0.7 mA
    • With 5V power supply on card
      • 5/4.7K = 1 mA
      • Sufficient current margin

MCP23008 Block Diagram

MCP23008-Blk-Dia.PNG

Layout

OptoIn8-CAD-X2.png

Power

Vin		5	V	12
Vdiode		1.7	V	1.7
Vres		3.3	V	10.3
I		0.01	A	0.01
PwrRes		0.033	W	0.103
ResRatedPwr	0.25	W	0.25
Derated		13.2	%	41.2

Connectors

J1 - Power

  • Optional power input
  • Can be unused if power is provided via the I2C connectors

OptoIn8-X2-J1.png

  1. GND
  2. VCC
  3. GND

J2-J3 - I2C

  • Daisy Chain connectors
  • 2nd connector can be ignored

OptoIn8-X2-J2-J3.png

  1. GND
  2. VCC
  3. SDA
  4. SCL

J4 - I2C Address Select

  • I2C Slave Address offset
  • Card base address 0x20
  • Install jumper for Ax = 0
  • Do not install jumper for Ax = 1
  • Factory default is all 3 installed 0x20

OptoIn8-X2-J4.png

5-6 = A0
3-4 = A1
1-2 = A2

J5 - EEPROM Write Enable/Write Protect Jumper

  • Install = Allow EEPROM writes
  • Removed = Do not allow writes to EEPROM

OptoIn8-X2-J5.png

J6 - Card Present/Interrupt

  • Interrupt out
  • Card present signal - pulled low on the card
  • Neither are required for typical uses

OptoIn8-X2-J6.png

  1. GND
  2. INT
  3. CP - Card present (pulled low)

J7 - I2C Terminators Jumpers

OptoIn8-X2-J7.png

  • Install shunts to terminate I2C lines to Vcc via 2.2K ohm terminators
  • There has to be one set of terminators somewhere on the I2C bus
3-4 = SDA Terminator
1-2 = SCK Terminator

J8 - I/O connector

OptoIn8-I2C-X3-CCA-5456-640px.jpg

OptoIn8-Connector

Db25M.gif

OptoIn8-X2-J8-fixed.png]

DB-25

Pin	Descr		Pin	Descr
1	CH1-IN+		14	CH1-IN-
15	CH2-IN+		3	CH2-IN-
4	CH3-IN+		17	CH3-IN-
18	CH4-IN+		6	CH4-IN-
7	CH5-IN+		20	CH5-IN-
21	CH6-IN+		9	CH6-IN-
10	CH7-IN+		23	CH7-IN-
24	CH8-IN+		12	CH8-IN-
2	N/C		5	N/C
8	N/C		11	N/C
13	N/C		16	N/C
19	N/C		22	N/C
25	N/C			

Design Validation/First Article Test

Read Single Opto Input Channel Test

  • Test code
  • Write out on Arduino D8 line
  • D8 is wired to the first Opto channel
  • Read back Opto channel
    • Result is complement of write data
Wrote HIGH, read back 0
Wrote LOW, read back  1

Read all 8 Channels

8 channel read card
Wrote LOW to channel  1, read back  FF
Wrote HIGH to channel 1, read back  FE
Wrote LOW to channel  2, read back  FF
Wrote HIGH to channel 2, read back  FD
Wrote LOW to channel  3, read back  FF
Wrote HIGH to channel 3, read back  FB
Wrote LOW to channel  4, read back  FF
Wrote HIGH to channel 4, read back  F7
Wrote LOW to channel  5, read back  FF
Wrote HIGH to channel 5, read back  EF
Wrote LOW to channel  6, read back  FF
Wrote HIGH to channel 6, read back  DF
Wrote LOW to channel  7, read back  FF
Wrote HIGH to channel 7, read back  BF
Wrote LOW to channel  8, read back  FF
Wrote HIGH to channel 8, read back  7F
Wrote LOW to channel  1, read back  FF
Wrote HIGH to channel 1, read back  FE
Wrote LOW to channel  2, read back  FF
Wrote HIGH to channel 2, read back  FD
Wrote LOW to channel  3, read back  FF
Wrote HIGH to channel 3, read back  FB
Wrote LOW to channel  4, read back  FF
Wrote HIGH to channel 4, read back  F7
Wrote LOW to channel  5, read back  FF
Wrote HIGH to channel 5, read back  EF
Wrote LOW to channel  6, read back  FF
Wrote HIGH to channel 6, read back  DF
Wrote LOW to channel  7, read back  FF
Wrote HIGH to channel 7, read back  BF
Wrote LOW to channel  8, read back  FF
Wrote HIGH to channel 8, read back  7F

Pass/Fail version of the code

EEPROM Test

  • Code to read/write to the EEPROM
  • Select E for EEPROM
  • R to read, W to write
R=Read EEPROM, W=Write EEPROM, X=Exit Menu
Reading EEPROM
Family  = ODAS
Company = land-boards.com
Product = OptoIn8-I2C
eepromAccessMenu() - Finished reading EEPROM

Factory Acceptance Test

  • Unit Under Test (UUT)
  • Runs on Open Data Acquisition System
  • I2C cable from Open Data Acquisition System to I2C connector on the UUT
  • The Test Station has an internal DIGIO32 card
  • Cable from UUT connector to the DIGIO32 card in the Test Station
  • The DIGIO32 internal to the Test Station is set to all outputs
  • Put out 8 bit test vector on DIGIO32 pins
    • D0 is LED1+ ... D7 is LED8+
    • D8 is LED1- ... D15 is LED8-
  • To turn on LED1, set D0-D7 High and D8-D15 Low
  • Looks at the returned values on the OptoIn8-I2C
  • The OptoIn8-I2C cards that is the UUT is set up to all inputs.
  • USB-C connection to PC running puTTY
    • 9600 baud
  • Menu driven

EEPROM Setup

  • Auto-detects card if test has been run before
Checking EEPROM for board type...Detected OptoIn8-I2C board
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
  • If the EEPROM has not been programmed (first time for the test to be run)
Checking EEPROM for board type...Company Mismatch
Select the board type
1 - DIGIO16-I2C board
2 - DIGIO-128 board
3 - OptoIn8-I2C board
4 - OptoOut8-I2C board
5 - DIGIO32-I2C board
6 - PROTO16-I2C board
7 - ODAS-PSOC5 board
8 - ODAS-RELAY16 board
9 - TBD board
X - Boards without EEPROMs
Select board > 
  • Select board 3
Select board > 3 [OptoIn8-I2C Card]
Writing EEPROM
Initializing eep buffer
len of buffer=96
reading block
Family=ODAS
Company=land.boards.com
Checking EEPROM for board type...Detected OptoIn8-I2C board

Run Test

  • Test 'T'
R=Read EEPROM, W=Write EEPROM, T=Test DIGIOs, L=Loop Test, B=Bounce LEDs
Loopback Test PASS = 1, FAIL = 0

Revision History

Rev X3 to Rev X4 PWB changes

  • Moved the DB-25 mounting holes to center on the connector pins

OptoIn8-DB-Conn-X3.PNG

OptoIn8-DB-Conn-X4.PNG

Rev X2 to Rev X3 PWB changes

  • Move DB connector (J8) left from X=22.7 mm to X=17 mm

OptoIn8-DB-Conn-X2.PNG

OptoIn8-DB-Conn-X3.PNG

Rev X1

OptoIn8-I2C Rev X1

Assembly Sheet

OptoIn8-I2C Assembly Sheet