Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Debug in Chrome",
"url": "http://localhost:8000",
"webRoot": "${workspaceFolder}/public",
"preLaunchTask": "serve"
}
]
}
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "serve",
"type": "npm",
"script": "serve",
"isBackground": true,
"presentation": {
"reveal": "silent",
"panel": "dedicated",
"clear": true
},
"problemMatcher": {
"pattern": {
"regexp": "^(Error|Warning): (.*)$",
"severity": 1,
"message": 2
},
"background": {
"activeOnStart": true,
"beginsPattern": "^Generating pinout index",
"endsPattern": "^Serving on http://localhost:8000"
}
}
}
]
}
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Give it a try: **[🚀 Open Web Editor](https://splitbrain.github.io/pinoutleaf/
* **Front & Back Views:**
* Automatically generates diagrams for both the front and back sides of the PCB.

* **Chip Diagrams:**
* Besides PCBs, you can also render a chip/IC package (black body, silver leads, pin-1 marker) — handy for documenting a module or IC by itself instead of a whole board.
* Optional automatic or physical pin numbering printed directly on the leads.

## Screenshot

![Screenshot](screenshot.png)
Expand All @@ -41,6 +45,7 @@ Give it a try: **[🚀 Open Web Editor](https://splitbrain.github.io/pinoutleaf/
* Only four rows of pins are supported (left, right, top, bottom).
* No weird arbitrary layouts.
* Only the standard 0.1-inch pin raster is supported (might change in the future).
* Chip diagrams only ever show the front — there's no back side to a chip.

## Alternatives

Expand Down Expand Up @@ -128,15 +133,51 @@ Defines the title of the diagram:
title: "My PCB"
```

### variant

There are two diagram variants: `pcb` (the default) and `chip`.

```yaml
variant: chip
```

* `pcb` draws the standard green PCB background (or your own background image, see [image](#image)) and generates both a front and a back view.
* `chip` draws a black IC body with silver leads instead, and only ever generates a front view — flipping is a no-op since a chip has no back side. If a chip has pins on both a vertical side (left/right) and a horizontal side (top/bottom), the body is automatically grown by one empty pin position on every edge so that corner leads don't overlap.

### size

The size of the PCB is defined in the number of pins (assuming a standard pin raster of 0.1 inch, aka 2.54mm). Everything else is derived from this size. Best to put your board on a breadboard and count.
The size of the PCB or chip is defined in the number of pins (assuming a standard pin raster of 0.1 inch, aka 2.54mm). Everything else is derived from this size. Best to put your board on a breadboard and count.

```yaml
width: 4
height: 6
```

Both are optional — if omitted, they're calculated automatically from the number of pins you define in the `top`/`bottom` rows (for `width`) and `left`/`right` rows (for `height`).

### pinNumbers

For `chip` diagrams, you can have the physical pin number printed on each lead using the `pinNumbers` option. It has no effect on `pcb` diagrams.

```yaml
pinNumbers: auto
```

* `none` (the default) — no pin numbers are shown.
* `auto` — pins are numbered 1-based, starting at the first pin of the `left` row and proceeding down the left side, across the bottom, up the right side, and across the top. Empty pin positions don't count towards the numbering.
* `firstLabel` — instead of calculating a number, the first `label:type` entry of each pin is used as its pin number (parsed as an integer) and is not rendered as a regular label. Useful when your pin numbers aren't sequential or don't start at 1.

### legend

The legend isthe box explaining what each color/type means. You can turn it off if you like:

```yaml
legend: none
```

* `auto` (the default) — the legend is shown.
* `none` — the legend is hidden.

### pins

The tool supports up to four rows of pins: `left`, `right`, `top`, and `bottom`. If your board does have a different layout, you're out of luck.
Expand Down
19 changes: 19 additions & 0 deletions public/pinouts/BC849-BC850.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: "BC849; BC850 (SOT23)"

# BC849 and BC850 SOT23 transistors
# Note that this is technically a 2x3 package, but these have "missing" pins.
# You can define an empty (- []) pin to indicate this.
# legend: none, these simple chips don't need a legend
variant: chip
pinNumbers: auto
legend: none

pins:
left:
- ["base"]
- []
- ["emitter"]
right:
- []
- ["collector"]
- []
21 changes: 21 additions & 0 deletions public/pinouts/ILC6390-91.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title: "ILC6390/91 (SOT-89-5)"

# ILC6390/91 SOT-89-5 Step-Up PFM Switcher
# A SOT-89-5 package is an example of where we cant use auto-numbering"
# The location of pin nr 5 on the right hand side is actually the same
# as pin nr 2, they are electrically connected at the underside of the package.
# We can use the "firstLabel" option for manually labelling here.
# Note that if you need to manually label 1 pin, you need to label all of them.
variant: chip
pinNumbers: firstLabel
legend: none

pins:
left:
- [ "1", "N/C"]
- [ "2", "Vout"]
- [ "3", "CE"]
right:
- [ "5", "Vss"]
- [ "2", "Vout"]
- [ "4", "Lx"]
51 changes: 51 additions & 0 deletions public/pinouts/attiny85-qfn20.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
title: "ATtiny85 (QFN/MLF-20)"

# 20-pin QFN/MLF package: 5 pins per side. Only 8 of the 20 pads carry a
# signal - the rest are DNC (Do Not Connect), labeled as such below.
# `pinNumbers: auto` prints the physical pad number next to every pin.
variant: chip
pinNumbers: auto

pins:
# left column, top to bottom: pads 1-5
left:
- [ "PB5:gpio", "RESET:control", "ADC0:analog", "dW:control" ] # pad 1
- [ "PB3:gpio", "XTAL1:control", "ADC3:analog" ] # pad 2
- [ "DNC:dnc" ] # pad 3
- [ "DNC:dnc" ] # pad 4
- [ "PB4:gpio", "XTAL2:control", "ADC2:analog" ] # pad 5
# bottom row, left to right: pads 6-10
bottom:
- [ "DNC:dnc" ] # pad 6
- [ "DNC:dnc" ] # pad 7
- [ "GND:gnd" ] # pad 8
- [ "DNC:dnc" ] # pad 9
- [ "DNC:dnc" ] # pad 10
# right column, top to bottom: pads 15-11
right:
- [ "VCC:power" ] # pad 15
- [ "PB2:gpio", "SCK:spi", "SCL:i2c", "ADC1:analog", "INT0:control" ] # pad 14
- [ "DNC:dnc" ] # pad 13
- [ "PB1:gpio", "MISO:spi", "OC0B:pwm" ] # pad 12
- [ "PB0:gpio", "MOSI:spi", "SDA:i2c", "OC0A:pwm", "AREF:analog" ] # pad 11
# top row, left to right: pads 20-16
top:
- [ "DNC:dnc" ] # pad 20
- [ "DNC:dnc" ] # pad 19
- [ "DNC:dnc" ] # pad 18
- [ "DNC:dnc" ] # pad 17
- [ "DNC:dnc" ] # pad 16

types:
control:
label: "Control"
bgcolor: "#637181"
fgcolor: "#ffffff"
pwm:
label: "PWM"
bgcolor: "#e38022"
fgcolor: "#ffffff"
dnc:
label: "Do Not Connect"
bgcolor: "#999999"
fgcolor: "#ffffff"
34 changes: 34 additions & 0 deletions public/pinouts/attiny85.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
title: "ATtiny85"

# An 8-pin DIP: two columns of four pins (height).
# Notice that width and height are not given, they are automatically calculated from the number of pins defined.
# Using `variant: chip` draws the black IC body with silver legsn instead of the default PCB rectangle (no background image needed).
variant: chip
pinNumbers: auto

# Width is auto-calculated as 2, but 3 looks nicer, so we set it.
width: 3

pins:
# left column, top to bottom: physical pins 1-4
left:
- [ "PB5:gpio", "RESET:control", "ADC0:analog", "dW:control" ]
- [ "PB3:gpio", "XTAL1:control", "ADC3:analog" ]
- [ "PB4:gpio", "XTAL2:control", "ADC2:analog" ]
- [ "GND:gnd" ]
# right column, top to bottom: physical pins 8-5
right:
- [ "VCC:power" ]
- [ "PB2:gpio", "SCK:spi", "SCL:i2c", "ADC1:analog", "INT0:control" ]
- [ "PB1:gpio", "MISO:spi", "OC0B:pwm" ]
- [ "PB0:gpio", "MOSI:spi", "SDA:i2c", "OC0A:pwm", "AREF:analog" ]

types:
control:
label: "Control"
bgcolor: "#637181"
fgcolor: "#ffffff"
pwm:
label: "PWM"
bgcolor: "#e38022"
fgcolor: "#ffffff"
73 changes: 73 additions & 0 deletions public/pinouts/esp32-wroom-32.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
title: "ESP32-WROOM-32 (Module)"

# The ESP32-WROOM-32 module itself (not a devkit breakout board).
# Pin numbering nd signal names follow:
# https://lastminuteengineers.com/esp32-wroom-32-pinout-reference/
width: 10
height: 14
variant: chip
pinNumbers: auto

pins:
# left edge, top to bottom: pads 1-14
left:
- [ "GND:gnd" ] # pad 1
- [ "3V3:power" ] # pad 2
- [ "EN:control" ] # pad 3
- [ "GPIO36:gpio", "VP:analog" ] # pad 4
- [ "GPIO39:gpio", "VN:analog" ] # pad 5
- [ "GPIO34:gpio", "ADC1_6:analog" ] # pad 6
- [ "GPIO35:gpio", "ADC1_7:analog" ] # pad 7
- [ "GPIO32:gpio", "ADC1_4:analog", "T9:touch" ] # pad 8
- [ "GPIO33:gpio", "ADC1_5:analog", "T8:touch" ] # pad 9
- [ "GPIO25:gpio", "ADC2_8:analog", "DAC1:dac" ] # pad 10
- [ "GPIO26:gpio", "ADC2_9:analog", "DAC2:dac" ] # pad 11
- [ "GPIO27:gpio", "ADC2_7:analog", "T7:touch" ] # pad 12
- [ "GPIO14:gpio", "ADC2_6:analog", "T6:touch", "HSPI_CLK:spi" ] # pad 13
- [ "GPIO12:gpio", "ADC2_5:analog", "T5:touch", "HSPI_MISO:spi" ] # pad 14
# left edge, left to right: pads 15-24
bottom:
- [ "GND:gnd" ] # pad 15
- [ "GPIO13:gpio", "ADC2_4:analog", "T4:touch", "HSPI_MOSI:spi" ] # pad 16
- [ "GPIO9:flash", "SD2:flash" ] # pad 17
- [ "GPIO10:flash", "SD3:flash" ] # pad 18
- [ "GPIO11:flash", "CMD:flash" ] # pad 19
- [ "GPIO6:flash", "CLK:flash" ] # pad 20
- [ "GPIO7:flash", "SD0:flash" ] # pad 21
- [ "GPIO8:flash", "SD1:flash" ] # pad 22
- [ "GPIO15:gpio", "ADC2_3:analog", "T3:touch", "HSPI_CS:spi" ] # pad 23
- [ "GPIO2:gpio", "ADC2_2:analog", "LED:control" ] # pad 24
# right edge, top to bottom: pads 38-25
right:
- [ "GND:gnd" ] # pad 38
- [ "GPIO23:gpio", "VSPI_MOSI:spi" ] # pad 37
- [ "GPIO22:gpio", "SCL:i2c" ] # pad 36
- [ "GPIO1:gpio", "TX0:uart" ] # pad 35
- [ "GPIO3:gpio", "RX0:uart" ] # pad 34
- [ "GPIO21:gpio", "SDA:i2c" ] # pad 33
- [ "GND:gnd" ] # pad 32
- [ "GPIO19:gpio", "VSPI_MISO:spi" ] # pad 31
- [ "GPIO18:gpio", "VSPI_CLK:spi" ] # pad 30
- [ "GPIO5:gpio", "VSPI_SS:spi" ] # pad 29
- [ "GPIO17:gpio", "TX2:uart" ] # pad 28
- [ "GPIO16:gpio", "RX2:uart" ] # pad 27
- [ "GPIO4:gpio", "ADC2_0:analog", "T0:touch" ] # pad 26
- [ "GPIO0:gpio", "ADC2_1:analog", "BOOT:control" ] # pad 25

types:
control:
label: "Control"
bgcolor: "#637181"
fgcolor: "#ffffff"
dac:
label: "DAC"
bgcolor: "#8e44ad"
fgcolor: "#ffffff"
touch:
label: "Touch"
bgcolor: "#2980b9"
fgcolor: "#ffffff"
flash:
label: "Flash (avoid)"
bgcolor: "#b33939"
fgcolor: "#ffffff"
Loading