---
active: false
created: 2025-04-29 08:16
tags:
- eg
- project
---
S## Goal
Create an RPi puzzle breakout board that makes it easier to plug in different switches, RFID readers and I2C components with connector pins holes aligned with red/yellow/black wires on commonly available leads.
![[Pasted image 20240618071431.png]]
Pin 1 on GPIO connector goes to Pin 1 on the breakout board.
![[GPIO_Board_v3.jpg]]
## J9
.png)
![[Ribbon_Cable_Orientation.png.png]]
## U1 Chip Output
We use a [CD4051B](https://www.ti.com/lit/ds/symlink/cd4051b.pdf) multiplexer chip to turn 3 GPIO lines (17, 27, 22) into 8 output control lines. The chip's INH (disable pin) is permanently held low. GPIO 20 provides the X input value (high or low depending the use case)

| Socket | Socket Pin | BCM | Pin | Action |
| ------ | ---------- | --- | --- | -------------------------------------- |
| X | 3 | 20 | 38 | Master enable switch (0 = off, 1 = on) |
| A | 11 | 17 | 11 | Refer to selector table |
| B | 10 | 27 | 13 | Refer to selector table |
| C | 9 | 22 | 15 | Refer to selector table |
### Selector table U1
| Reset | RSTn | A (BCM 17) | B (BCM 27) | C (BCM 22) |
| ----- | ---- | ---------- | ---------- | ---------- |
| J1 | 0 | 0 | 0 | 0 |
| J2 | 1 | 1 | 0 | 0 |
| J3 | 2 | 0 | 1 | 0 |
| J4 | 3 | 1 | 1 | 0 |
| J5 | 4 | 0 | 0 | 1 |
| J6 | 5 | 1 | 0 | 1 |
| J7 | 6 | 0 | 1 | 1 |
| J8 | 7 | 1 | 1 | 1 |
## J1 to J8
.png)
| Socket | Socket Pin | BCM | Pin | Action |
| ------ | ---------- | --- | --- | ------------- |
| Jn | 1 | 8 | 24 | SDA/SPI0/CE0 |
| | 2 | 11 | 23 | SCK |
| | 3 | 10 | 19 | MOSI |
| | 4 | 9 | 21 | MISO |
| | 5 | | | Not connected |
| | 6 | | 25 | Ground |
| J2 | 7 | | | See U1 table |
| J3 | 7 | | | See U1 table |
| J4 | 7 | | | See U1 table |
| J5 | 7 | | | See U1 table |
| J6 | 7 | | | See U1 table |
| J7 | 7 | | | See U1 table |
| J8 | 7 | | | See U1 table |
| Jn | 8 | | 17 | 3V3 |
## J17 to J22
.png)
| Socket | Socket Pin | BCM | Pin | Action | Position |
| ------ | ---------- | --- | --- | ----------- | -------- |
| J22 | 1 | | 9 | Ground | |
| | 2 | 25 | 22 | I/O | |
| J21 | 1 | | 9 | Ground | |
| | 2 | 18 | 12 | I/O
PWM0 | |
| J20 | 1 | | 9 | Ground | |
| | 2 | 23 | 16 | I/O | |
| J19 | 1 | | 9 | Ground | |
| | 2 | 24 | 18 | I/O | |
| J18 | 1 | | 9 | Ground | |
| | 2 | 12 | 32 | I/O
PWM0 | |
| J17 | 1 | | 9 | Ground | |
| | 2 | 16 | 36 | I/O | |
## J10 to J15
.png)
| Socket | Socket Pin | BCM | Pin | Action |
| ------ | ---------- | --- | --- | ----------- |
| J10 | 1 | 5 | 29 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J11 | 1 | 6 | 31 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J12 | 1 | 13 | 33 | I/O
PWM1 |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J13 | 1 | 19 | 35 | I/O
PWM1 |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J14 | 1 | 26 | 37 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J15 | 1 | 21 | 40 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
## J16
.png)
| Socket | Socket Pin | BCM | Pin | Action | Wire Color |
| ------ | ---------- | --- | --- | ---------- | ---------- |
| J16 | 1 | | 9 | Ground | Black |
| | 2 | | 1 | 3V3 | Red |
| | 3 | 3 | 5 | SCL1 / I2C | White |
| | 4 | 2 | 3 | SDA1 / I2C | Yellow |