Difference between revisions of "I2C-RPT-08"

From Land Boards Wiki
Jump to navigation Jump to search
 
(58 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/8-channel-i2c-repeatermultiplexer-i2c-rpt-08/]]
+
[[File:tindie-mediums.png|link=https://www.tindie.com/products/9603/]]
 +
 
 +
[[File:I2C-RPT-08-X1-P218-720px.jpg]]
  
 
<video type="youtube">npC48tq4MF8</video>
 
<video type="youtube">npC48tq4MF8</video>
 
[[File:I2C-RPT-08-X1-P218-720px.jpg]]
 
  
 
== Features ==
 
== Features ==
  
* I2C Hub / Repeater / Replicator / Multiplexer / De-multiplexer
+
* I2C Hub / Repeater / Replicator / Multiplexer / De-multiplexer / Switch
** [https://www.nxp.com/docs/en/data-sheet/PCA9548A.pdf PCA9548A]
+
** [https://www.nxp.com/docs/en/data-sheet/PCA9548A.pdf PCA9548A Datasheet]
 
** Eight I2C Ports
 
** Eight I2C Ports
 
** 100KHz/400KHz operation
 
** 100KHz/400KHz operation
 +
** I2C Base Address 0x70
 +
*** Offset addresses 0x70-0x77
 
* Host port
 
* Host port
 
** Controlled via I2C
 
** Controlled via I2C
 
** 3.3V or 5V host operation
 
** 3.3V or 5V host operation
 +
** Can power slave cards if they are at the same voltage
 
* 3.3V or 5V slave ports operation
 
* 3.3V or 5V slave ports operation
 +
** Removable jumper(s) to supply power from slave
 
* Voltage translation between the ports
 
* Voltage translation between the ports
* Ex: a Raspberry PI which runs 3.3V can control I2C devices which run at 5V
+
** Ex: a Raspberry Pi which runs 3.3V can control I2C devices which run at 5V
* On-board termination resistors
+
* On-board 2.2K termination resistors
 
* 49x49mm form factor
 
* 49x49mm form factor
 
* 4 solid 4-40 mounting holes
 
* 4 solid 4-40 mounting holes
 +
* Drivers/Example Code
 +
** Arduino driver and example code
 +
** Raspberry Pi example code
  
 
== Connectors ==
 
== Connectors ==
  
* The connectors are 2x6 right angle 0.1" pitch headers
+
* 0.1" pitch connections
 +
* [https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313.TR2.TRC1.A0.H0.Xdupont+header.TRS0&_nkw=dupont+header&_sacat=0 Search ebay for Dupont headers]
 +
* [https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1311.R4.TR4.TRC1.A0.H0.Xdupont+jumper.TRS0&_nkw=dupont+wire+jumper+cable&_sacat=0&LH_TitleDesc=0&_osacat=0&_odkw=arduino+cable Search ebay for Dupontwire jumper cable]
 +
* The slave I2C connectors are (4) 2x6 right angle 0.1" pitch headers
 +
* Two ports per 2x6 connector
 
* Two of the pins are for power to or from the I2C connector
 
* Two of the pins are for power to or from the I2C connector
 
* The other four pins are for the I2C interface
 
* The other four pins are for the I2C interface
 +
 +
[[File:I2C-RPT-08-X1-Conns-P218-720px.png]]
  
 
=== H1-H8 - Power to/from I2C Connectors ===
 
=== H1-H8 - Power to/from I2C Connectors ===
Line 31: Line 44:
 
* Install shunt to power the I2C slave card from the I2C-RPT-08 Card
 
* Install shunt to power the I2C slave card from the I2C-RPT-08 Card
 
** Default factory ships as installed to power external I2C interfaces from the card
 
** Default factory ships as installed to power external I2C interfaces from the card
 +
* Remove shunt to power interface externally
 +
** Need to remove if external voltage is different level or sourced externally
 +
* H1 - PORT #0
 +
* ...
 +
* H8 = PORT #7
 +
 +
=== H9 - I2C Slave Address Jumpers ===
 +
 +
* A0-A2
 +
* Install all 3 jumpers for address 0x70
 +
* Remove all three jumpers for address 0x77
  
=== I2C Connections ===
+
=== J1 - Host I2C Connection ===
  
# GNG
+
# GND (GND pin marked)
# VCC (Power Out - if jumper 1-2 installed, Power in - if jumper 1-2 is not installed)
+
# 3.3V or 5V VCC
 +
# SDA
 +
# SCL
 +
 
 +
=== J2-J5 - Slave  I2C Connections (x8) ===
 +
 
 +
# GND
 +
# 3.3V or 5V VCC (Power Out - if jumper 1-2 installed, Power in - if jumper 1-2 is not installed)
 
# SDA
 
# SDA
 
# SCL (Board marked with SCK)
 
# SCL (Board marked with SCK)
 +
 +
== Jumpers ==
 +
 +
=== A0-A2 - Multiplexer I2C Base Address ===
 +
 +
* Install for Ax = 0 (factory default address = 0)
 +
* Remove for Ax = 1
  
 
== Schematic ==
 
== Schematic ==
  
* [http://land-boards.com/I2C-RPT-08/I2CRPT08_RevX1_Schematic.pdf I2C-RPT-08 Schematic]
+
* [http://land-boards.com/I2C-RPT-08/I2CRPT08_RevX1_Schematic.pdf I2C-RPT-08 Rev X1 Schematic]
 +
* [http://land-boards.com/I2C-RPT-08/I2CRPT08_Rev2_Schematic.pdf I2C-RPT-08 Rev 2 Schematic]
  
 
== Drivers/Example Code ==
 
== Drivers/Example Code ==
  
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_I2CRPT08 Github repo] - Driver code
+
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/libraries/LandBoards_I2CRPT08 Arduino Driver code] - Github repo
* [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/I2CRPT08/I2CIO8X8wMux/I2CIO8X8wMux.ino Github repo] - Example code
+
* [https://github.com/land-boards/lb-Arduino-Code/blob/master/LBCards/I2CRPT08/I2CIO8X8wMux/I2CIO8X8wMux.ino Arduino Example code] - Github repo
 +
* [https://github.com/land-boards/RasPi/tree/master/RPI-I2C-Hub Raspberry Pi Example Code] - Github repo
  
 
=== Programming Note ===
 
=== Programming Note ===
Line 52: Line 92:
 
* The mux chip allows multiple or single I2C ports to be written at the same time
 
* The mux chip allows multiple or single I2C ports to be written at the same time
 
** To only enable one port at a time make sure you disable a channel after use or disable last channel used before enabling new channel
 
** To only enable one port at a time make sure you disable a channel after use or disable last channel used before enabling new channel
 +
 +
=== Arduino Driver Functions ===
 +
<pre>
 +
LandBoards_I2CRPT08(void) - Constructor
 +
void begin(uint8_t addr) - Set mux I2C address (offset or absolution 0x70-0x77)
 +
void begin() - Assume I2C address = 0x20
 +
void setI2CChannel(uint8_t chNum, uint8_t enableFlag) - chNum = 0x0-0x7. I2CRPT08_MUXCH_DISABLE, I2CRPT08_MUXCH_ENABLE
 +
uint8_t getI2CChannel(void) - Read entire channel status - useful for testing
 +
</pre>
  
 
== Testing ==
 
== Testing ==
 +
 +
=== Test Station Hardware ===
 +
 +
[[File:IC2RPT-08_P1871-720px.jpg]]
  
 
* [[Arduino Based Test Station]]
 
* [[Arduino Based Test Station]]
** 9600 baud, no hardware handshake
+
** Built in I2C mux on [[BLACK-PILL-HUB]] is set to offset=0x1 so it does not conflict with I2C address of UUT
 +
** Cabling
 +
*** UUT J1 Host connects to I2C port (J7) on the [[BLACK-PILL-HUB]]
 
* Uses 8x of [[I2CIO-8]] cards
 
* Uses 8x of [[I2CIO-8]] cards
* On UUT
+
** Cabling 4 wire from [[I2CIO-8]] cards J1 to UUT I2C #0-#7
** Install jumpers into A0-A2
+
** Address jumpers are all installed for base address of 0x20
*** I2C address offset = 0x0
+
* On Unit Under Test (UUT)
*** [[BLUE-PILL-HUB]] is set to offset=0x1 so it does not conflict
+
** Install (3) h9 jumpers into A0-A2 for card I2C address = 0x70
* Connect directly to I2C port on the [[BLUE-PILL-HUB]]
+
 
 +
=== Test Procedure ===
 +
 
 +
* Run puTTY
 +
** COM port from Device Manager
 +
** 9600 baud
 +
** No parity
 +
** No handshake
 +
* Menu will display
 +
<pre>
 +
Checking if EEPROM is present on UUT...EEPROM is not present on UUT
 +
Count of I2C devices in range 0x20-0x27 on UUT = 0
 +
Found external I2C mux card
 +
Select I2C Mux board type
 +
1 - I2C-RPT-01 board
 +
2 - I2C-RPT-08 board
 +
</pre>
 +
* Enter 2
 +
* Replies with
 +
<pre>
 +
Init I2C-RPT-08 card
 +
I2CIO8 card #0 was detected
 +
I2CIO8 card #1 was detected
 +
I2CIO8 card #2 was detected
 +
I2CIO8 card #3 was detected
 +
I2CIO8 card #4 was detected
 +
I2CIO8 card #5 was detected
 +
I2CIO8 card #6 was detected
 +
I2CIO8 card #7 was detected
 +
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
 +
</pre>
 +
* Verify that all 8 I2CIO-8 cards were detected
 +
 
 +
=== Internal Tests ===
 +
 
 +
* Select C to test card
 +
* Select I to run internal tests
 +
** Tests I2C interface to UUT
 +
<pre>
 +
UUT Internal card tests
 +
Test PASS = 1, FAIL = 0
 +
</pre>
 +
 
 +
=== Bounce LEDS ===
 +
 
 +
* Select B to bounce LED across LEDs on all 4 I2CIO-8 cards
 +
* Verify all 16 LEDs blink
 +
<pre>
 +
Bounce a bit across outputs
 +
Bouncing LEDs I2C-RPT-01 and I2CIO8 - any key to stop
 +
Hit any key to stop test
 +
</pre>
 +
* Hit any key to stop blinking
 +
 
 +
=== Test Station Software ===
 +
 
 
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/ODAS/ODASTESTER ODAS Tester Github Repo]
 
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/LBCards/ODAS/ODASTESTER ODAS Tester Github Repo]
  
[[File:P963-cropped-720px.jpg]]
+
== Issues ==
 +
 
 +
=== Rev 2 ===
  
== Issues ==
+
* Rev 2 fixes SCK -> SCL
 +
* Adds port numbers to slave connectors
 +
* Move SMT fiducials to bottom (lot of resistors on the rear of card)
 +
* Combined Power jumpers into the Port jumpers
 +
* Moved J2 away from mounting screw
 +
* Add silkscreen details
 +
* Removed C2 from front of board
 +
* Added 3D model for all parts
 +
* KiCad 6
 +
 
 +
[[file:I2C-RPT-08_FRONT.png]]
 +
 
 +
=== Rev 1 Issues ===
  
 +
* No functional issues
 
* Silkscreen shows SCK, should be SCL
 
* Silkscreen shows SCK, should be SCL
  
 
== Assembly Sheet ==
 
== Assembly Sheet ==
  
* [[I2C-RPT-08 Assembly Sheet]]
+
* [[I2C-RPT-08 Assembly Sheet]] - Rev X1
 +
* [[I2C-RPT-08 Rev 2 Assembly Sheet]] - Rev 2

Latest revision as of 21:04, 15 May 2022

Tindie-mediums.png

I2C-RPT-08-X1-P218-720px.jpg

Features

  • I2C Hub / Repeater / Replicator / Multiplexer / De-multiplexer / Switch
    • PCA9548A Datasheet
    • Eight I2C Ports
    • 100KHz/400KHz operation
    • I2C Base Address 0x70
      • Offset addresses 0x70-0x77
  • Host port
    • Controlled via I2C
    • 3.3V or 5V host operation
    • Can power slave cards if they are at the same voltage
  • 3.3V or 5V slave ports operation
    • Removable jumper(s) to supply power from slave
  • Voltage translation between the ports
    • Ex: a Raspberry Pi which runs 3.3V can control I2C devices which run at 5V
  • On-board 2.2K termination resistors
  • 49x49mm form factor
  • 4 solid 4-40 mounting holes
  • Drivers/Example Code
    • Arduino driver and example code
    • Raspberry Pi example code

Connectors

I2C-RPT-08-X1-Conns-P218-720px.png

H1-H8 - Power to/from I2C Connectors

  • Install shunt to power the I2C slave card from the I2C-RPT-08 Card
    • Default factory ships as installed to power external I2C interfaces from the card
  • Remove shunt to power interface externally
    • Need to remove if external voltage is different level or sourced externally
  • H1 - PORT #0
  • ...
  • H8 = PORT #7

H9 - I2C Slave Address Jumpers

  • A0-A2
  • Install all 3 jumpers for address 0x70
  • Remove all three jumpers for address 0x77

J1 - Host I2C Connection

  1. GND (GND pin marked)
  2. 3.3V or 5V VCC
  3. SDA
  4. SCL

J2-J5 - Slave I2C Connections (x8)

  1. GND
  2. 3.3V or 5V VCC (Power Out - if jumper 1-2 installed, Power in - if jumper 1-2 is not installed)
  3. SDA
  4. SCL (Board marked with SCK)

Jumpers

A0-A2 - Multiplexer I2C Base Address

  • Install for Ax = 0 (factory default address = 0)
  • Remove for Ax = 1

Schematic

Drivers/Example Code

Programming Note

  • The mux chip allows multiple or single I2C ports to be written at the same time
    • To only enable one port at a time make sure you disable a channel after use or disable last channel used before enabling new channel

Arduino Driver Functions

LandBoards_I2CRPT08(void) - Constructor
void begin(uint8_t addr) - Set mux I2C address (offset or absolution 0x70-0x77)
void begin() - Assume I2C address = 0x20
void setI2CChannel(uint8_t chNum, uint8_t enableFlag) - chNum = 0x0-0x7. I2CRPT08_MUXCH_DISABLE, I2CRPT08_MUXCH_ENABLE
uint8_t getI2CChannel(void) - Read entire channel status - useful for testing

Testing

Test Station Hardware

IC2RPT-08 P1871-720px.jpg

  • Arduino Based Test Station
    • Built in I2C mux on BLACK-PILL-HUB is set to offset=0x1 so it does not conflict with I2C address of UUT
    • Cabling
  • Uses 8x of I2CIO-8 cards
    • Cabling 4 wire from I2CIO-8 cards J1 to UUT I2C #0-#7
    • Address jumpers are all installed for base address of 0x20
  • On Unit Under Test (UUT)
    • Install (3) h9 jumpers into A0-A2 for card I2C address = 0x70

Test Procedure

  • Run puTTY
    • COM port from Device Manager
    • 9600 baud
    • No parity
    • No handshake
  • Menu will display
Checking if EEPROM is present on UUT...EEPROM is not present on UUT
Count of I2C devices in range 0x20-0x27 on UUT = 0
Found external I2C mux card
Select I2C Mux board type
1 - I2C-RPT-01 board
2 - I2C-RPT-08 board
  • Enter 2
  • Replies with
Init I2C-RPT-08 card
I2CIO8 card #0 was detected
I2CIO8 card #1 was detected
I2CIO8 card #2 was detected
I2CIO8 card #3 was detected
I2CIO8 card #4 was detected
I2CIO8 card #5 was detected
I2CIO8 card #6 was detected
I2CIO8 card #7 was detected
C=Card Tests, D=Direct, E=EEPROM, I=access Internal DIGIO32
  • Verify that all 8 I2CIO-8 cards were detected

Internal Tests

  • Select C to test card
  • Select I to run internal tests
    • Tests I2C interface to UUT
UUT Internal card tests
Test PASS = 1, FAIL = 0

Bounce LEDS

  • Select B to bounce LED across LEDs on all 4 I2CIO-8 cards
  • Verify all 16 LEDs blink
Bounce a bit across outputs
Bouncing LEDs I2C-RPT-01 and I2CIO8 - any key to stop
Hit any key to stop test
  • Hit any key to stop blinking

Test Station Software

Issues

Rev 2

  • Rev 2 fixes SCK -> SCL
  • Adds port numbers to slave connectors
  • Move SMT fiducials to bottom (lot of resistors on the rear of card)
  • Combined Power jumpers into the Port jumpers
  • Moved J2 away from mounting screw
  • Add silkscreen details
  • Removed C2 from front of board
  • Added 3D model for all parts
  • KiCad 6

I2C-RPT-08 FRONT.png

Rev 1 Issues

  • No functional issues
  • Silkscreen shows SCK, should be SCL

Assembly Sheet