Loading files…
SnapHAT is an addon for RaspberryPi Zero 2 W serving as a handheld photo camera device.
This repository contains KiCad 9 design files for the PCBs of the SnapHAT device (rev.1.1). The boards' layout is prepared to be compatible with JLCPCB standard 2-layer PCB quote.
[!WARNING] This repository is work in progress — core features are functional, but the PCB for this device is still evolving and some parts of the design are not yet behaving as I hoped. To avoid unnecessary hardware headaches, check Troubleshooting and required reworks section!
[!TIP] Python-based app for this camera can be found in this repository.
.
├─ main_board/
│ ├─ docs/
│ ├─ *.kicad_pro, *.kicad_sch, *.kicad_pcb
│ └─ README.md
├─ usb_hat/
│ ├─ docs/
│ ├─ *.kicad_pro, *.kicad_sch, *.kicad_pcb
│ └─ README.md
├─ img/
└─README.md
This repository contains two KiCad projects for each board:
Each board directory contains:
*.kicad_pro, *.kicad_sch, *.kicad_pcb - KiCad 9 design filesdocs/ - documentation outputs generated from the KiCad files - you will find BOM in CSV format and schematic PDF in thereIn the root directory:
img/ - rendered previews of the boards and other images used by READMEsYou can find BOMs for each board as CSV file in their respective docs/ directories.
BOMs list PCB components, wire harness components, fasteners as well as OTS modules required to assemble the whole device.
While designing SnapHAT, Farnell and TME were mostly taken into consideration as part vendors, however some parts need to be sourced from elsewhere (this applies mostly to OTS modules).
Estimated component cost of the whole device is approximately 114 USD.
To connect the Waveshare 18366 2.4" LCD TFT Display, use an 8-pin JST-PH (2.0 mm pitch) wire harness. This is not a straight-through cable — pin numbering is reversed between connectors.
Part numbers for building the harness are listed in the main board's BOM and appear in its KiCad schematics as well.
| SnapHAT J1 | Signal | LCD PH connector |
|---|---|---|
| 1 | 3V3 (VCC) | 8 |
| 2 | GND | 7 |
| 3 | MOSI (DIN) | 6 |
| 4 | SCLK (CLK) | 5 |
| 5 | SPI_CS | 4 |
| 6 | DC | 3 |
| 7 | RST | 2 |
| 8 | BL | 1 |
To connect SnapHAT's USB HAT, use 4 core (1.0 mm pitch) >50 mm FFC cable, with opposite sided contacts. Proposed part number for this cable is listed in the USB HAT's BOM and appear in its KiCad schematics as well.
SnapHAT and USB HAT both include FFC connectors with top-side contacts (SnapHAT: J6, USB HAT: J1). When plugged in, FFC stiffener should face the PCB on both ends.
| SnapHAT J6 | Signal | USB HAT J1 |
|---|---|---|
| 1 | VBUS | 1 |
| 2 | USBC_DATA_N | 2 |
| 3 | USBC_DATA_P | 3 |
| 4 | GND | 4 |
Below table describes connected RaspberryPi GPIO pins and their intended function.
| Pin function | Signal name | GPIO (BCM) | Pin | Pin | GPIO (BCM) | Signal name | Pin function |
|---|---|---|---|---|---|---|---|
| 3.3V power rail | +3V3 | - | 1 | 2 | - | +5V0 | 5V power rail |
| I2C data | I2C_SDA | 2 | 3 | 4 | - | +5V0 | 5V power rail |
| I2C clock | I2C_SCL | 3 | 5 | 6 | - | GND | Ground |
| Not connected | - | 4 | 7 | 8 | 14 | RPI_UART_TX | Debug UART Transmit |
| Ground | GND | - | 9 | 10 | 15 | RPI_UART_RX | Debug UART Receive |
| Menu button | BTN_MENU | 17 | 11 | 12 | 18 | BUZZER_SIGNAL | Buzzer PWM |
| A button | BTN_A | 27 | 13 | 14 | - | GND | Ground |
| B button | BTN_B | 22 | 15 | 16 | 23 | - | Not connected |
| 3.3V power rail | +3V3 | - | 17 | 18 | 24 | DISPLAY_RST | Display reset |
| Display SPI MOSI | DISPLAY_MOSI | 10 | 19 | 20 | - | GND | Ground |
| Not connected | - | 9 | 21 | 22 | 25 | DISPLAY_DC | Display Data/Command |
| Display SPI serial clock | DISPLAY_SPI_SCLK | 11 | 23 | 24 | 8 | DISPLAY_SPI_CS | Display SPI chip select |
| Ground | GND | - | 25 | 26 | 7 | - | Not connected |
| Down button | BTN_D | 0 | 27 | 28 | 1 | - | Not connected |
| Left button | BTN_L | 5 | 29 | 30 | - | GND | Ground |
| Right button | BTN_R | 6 | 31 | 32 | 12 | DISPLAY_BL | Display backlight PWM |
| Up button | BTN_U | 13 | 33 | 34 | - | GND | Ground |
| Low battery indicator LED | LED_LBO | 19 | 35 | 36 | 16 | LED_SHUTTER | Shutter activity LED indicator |
| Shutter button | BTN_SHUTTER | 26 | 37 | 38 | 20 | ACCEL_INT1 | Motion sensor interrupt 1 |
| Ground | GND | - | 39 | 40 | 21 | ACCEL_INT2 | Motion sensor interrupt 2 |
This revision's battery circuit (protection, charger and 5V boost) is still botched. Aside from this, SnapHAT is operational if powered by an external stable 5V supply like PC USB port or powerbank.
To make SnapHAT work in this case, simply connect VBUS to 5V0 (you can solder a wire between corresponding testpads). Keep the SW9 switch off to disable the battery charger circuit and prevent charging indicators flickering.
If you wish to dwell deeper into what's currently wrong with this design, here are symptoms observed during bringup:
No comments yet. Be the first to ask about this board.