3D Enclosure Design


make a 3d model for enclosure for this project
I’ll inspect the PCB and connector geometry, create a manufacturable enclosure concept and CAD model, then verify board fit and access openings.
I’m measuring the finished board now so the enclosure proposal is based on the actual outline, controls, connectors, and assembly clearances.
I measured a 64 × 54 × 1.3 mm board with four exposed Cherry MX keys, a large e-paper display, four indicator LEDs, BAT1 terminal block, BAT2 battery header, and PROG header; there are no dedicated mounting holes.
Proposed enclosure: FDM-printed PETG, two-piece desktop shell with a screw-fastened bottom, edge-captured PCB, top openings for the four keycaps and display, LED light windows, and internal access to PROG. Please confirm these remaining choices:
  1. Is this a desktop/handheld indoor device?
  2. Should BAT1, BAT2, or both be externally accessible—and what battery dimensions must fit inside?
  3. Should the e-paper display be behind a clear protective window or directly exposed?
  4. Accept PETG with M2.5 screws, or specify your printer/material and preferred closure?
Once confirmed, I’ll generate the enclosure concept image for approval before creating the CAD model.
Desktop PETG enclosure
Protect display window
Internal battery option
Recommend battery bay

Waiting for input


IC1 Firmware GPIO Pinout Map
Target: IC1 = ESP32-S3-WROOM-1-N4R8
Use this as the firmware-facing pin map for the current schematic.

C


// E-ink display U2: HTEW0154T8
#define PIN_EINK_BUSY   7
#define PIN_EINK_DC     9
#define PIN_EINK_CS     10
#define PIN_EINK_MOSI   11
#define PIN_EINK_SCLK   12

// User buttons, active-low to GND
#define PIN_BUTTON_1    2
#define PIN_BUTTON_2    39
#define PIN_BUTTON_3    21
#define PIN_BUTTON_4    5

// LEDs, GPIO drives cathode through 150 ohm resistor; active-low
#define PIN_LED_1       1
#define PIN_LED_2       48
#define PIN_LED_3       47
#define PIN_LED_4       4

// Programming / boot / reset
#define PIN_BOOT        0     // GPIO0: pull low during reset for download mode
#define PIN_UART0_RX    44    // IC1 symbol RXD0
#define PIN_UART0_TX    43    // IC1 symbol TXD0
// EN is chip reset/enable, not a firmware GPIO.
Active levels

Table


SignalGPIOActive levelFirmware configuration
BUTTON_1 / SW1GPIO2LOW when pressedInput with pull-up enabled, debounce in firmware
BUTTON_2 / SW2GPIO39LOW when pressedInput with pull-up enabled, debounce in firmware
BUTTON_3 / SW3GPIO21LOW when pressedInput with pull-up enabled, debounce in firmware
BUTTON_4 / SW4GPIO5LOW when pressedInput with pull-up enabled, debounce in firmware
LED1GPIO1LOW = onOutput; drive low to turn on, high/high-Z to turn off
LED2GPIO48LOW = onOutput; drive low to turn on, high/high-Z to turn off
LED3GPIO47LOW = onOutput; drive low to turn on, high/high-Z to turn off
LED4GPIO4LOW = onOutput; drive low to turn on, high/high-Z to turn off
Schematic-derived GPIO map

Table


IC1 module pinIC1 symbol pinESP32-S3 GPIOProject net / connectionFirmware roleDirectionNotes
4IO4GPIO4R4 → LED4 cathode pathLED4OutputActive-low LED through 150 Ω.
5IO5GPIO5SW4 pin 1BUTTON_4InputSwitch to GND; enable internal pull-up or add external pull-up if needed.
6IO6GPIO6UnconnectedSpare GPIOI/OADC1_CH5 / TOUCH6 capable.
7IO7GPIO7U2 BUSYEINK_BUSYInputE-ink busy/status input from display.
8IO15GPIO15UnconnectedSpare GPIOI/OADC2_CH4, U0RTS, optional 32 kHz crystal P. Avoid if using 32 kHz crystal.
9IO16GPIO16UnconnectedSpare GPIOI/OADC2_CH5, U0CTS, optional 32 kHz crystal N. Avoid if using 32 kHz crystal.
10IO17GPIO17UnconnectedSpare GPIOI/OUART1 TX / ADC2_CH6 capable.
11IO18GPIO18UnconnectedSpare GPIOI/OUART1 RX / ADC2_CH7 / CLK_OUT3 capable.
12IO8GPIO8UnconnectedSpare GPIOI/OADC1_CH7 / TOUCH8 capable.
13IO19GPIO19UnconnectedUSB_D− / spareI/ODefault USB Serial/JTAG/USB OTG D− pin; avoid reusing if USB debug/download is needed.
14IO20GPIO20UnconnectedUSB_D+ / spareI/ODefault USB Serial/JTAG/USB OTG D+ pin; avoid reusing if USB debug/download is needed.
15IO3GPIO3UnconnectedSpare, strap-sensitiveI/OStrapping pin for JTAG source; avoid forced reset-time levels. ADC1_CH2 / TOUCH3 capable.
16IO46GPIO46UnconnectedStrap-sensitive spareI/OStrapping pin; default weak pulldown. Used with GPIO0 for boot mode. Avoid external pull-up at reset unless intentional.
17IO9GPIO9U2 D/CEINK_DCOutputE-ink data/command select.
18IO10GPIO10U2 CSEINK_CSOutputE-ink SPI chip-select. Usually active-low.
19IO11GPIO11U2 SDIEINK_MOSIOutputE-ink SPI MOSI/data input.
20IO12GPIO12U2 CLKEINK_SCLKOutputE-ink SPI clock.
21IO13GPIO13UnconnectedSpare GPIOI/OADC2_CH2 / TOUCH13 / SPI alternate capable.
22IO14GPIO14UnconnectedSpare GPIOI/OADC2_CH3 / TOUCH14 / SPI alternate capable.
23IO21GPIO21SW3 pin 1BUTTON_3InputSwitch to GND; enable pull-up and debounce.
24IO47GPIO47R3 → LED3 cathode pathLED3OutputActive-low LED through 150 Ω.
25IO48GPIO48R2 → LED2 cathode pathLED2OutputActive-low LED through 150 Ω.
26IO45GPIO45UnconnectedStrap-sensitive spareI/OStrapping pin; default weak pulldown. Do not pull high at reset unless VDD_SPI implications are understood.
27IO0GPIO0PROG pin 5BOOT / download modeInput strapPull low during reset to enter download boot; otherwise high for normal boot. Avoid large capacitance.
28IO35GPIO35UnconnectedReservedDo not useN4R8 includes Octal PSRAM; IO35 is not available for general use.
29IO36GPIO36UnconnectedReservedDo not useN4R8 includes Octal PSRAM; IO36 is not available for general use.
30IO37GPIO37UnconnectedReservedDo not useN4R8 includes Octal PSRAM; IO37 is not available for general use.
31IO38GPIO38UnconnectedSpare GPIOI/OUsable GPIO; SPI alternate capable.
32IO39GPIO39SW2 pin 1BUTTON_2InputSwitch to GND; enable pull-up and debounce. Also JTAG MTCK capable.
33IO40GPIO40UnconnectedSpare / JTAGI/OJTAG MTDO capable; avoid if JTAG debug needed.
34IO41GPIO41UnconnectedSpare / JTAGI/OJTAG MTDI capable; avoid if JTAG debug needed.
35IO42GPIO42UnconnectedSpare / JTAGI/OJTAG MTMS capable; avoid if JTAG debug needed.
36RXD0GPIO44PROG pin 3UART0_RXInputDefault UART0 receive for programming/logs. Connect to programmer TX.
37TXD0GPIO43PROG pin 4UART0_TXOutputDefault UART0 transmit for programming/logs. Connect to programmer RX.
38IO2GPIO2SW1 pin 1BUTTON_1InputSwitch to GND; enable pull-up and debounce. ADC1_CH1 / TOUCH2 capable.
39IO1GPIO1R1 → LED1 cathode pathLED1OutputActive-low LED through 150 Ω. ADC1_CH0 / TOUCH1 capable, but LED load prevents clean analog/touch use.
Non-GPIO control and power pins

Table


IC1 module pinSymbol pinFirmware relevanceNotes
23V3Power railMain 3.3 V module supply.
3ENReset/enable inputConnected to R5 pull-up and PROG pin 6. Pull low to reset/disable module. Not software-controlled unless an external circuit drives it.
1, 40–49GND_1…GND_11GroundAll tied to GND net.
Firmware initialization suggestions
  1. Configure button pins as INPUT_PULLUP; treat pressed state as 0/LOW.
  2. Configure LED pins as outputs and initialize HIGH/off before other application logic.
  3. Configure the e-ink SPI bus with SCLK = GPIO12 and MOSI = GPIO11; no MISO is connected in this schematic.
  4. Configure e-ink control pins: CS = GPIO10, DC = GPIO9, BUSY = GPIO7.
  5. Leave GPIO35, GPIO36, and GPIO37 unused because of the N4R8 Octal PSRAM variant.
  6. Avoid using GPIO0, GPIO3, GPIO45, and GPIO46 for external circuits that can alter boot strapping during reset.
  • Recommended firmware constants

  • Active levels

  • Schematic-derived GPIO map

  • Non-GPIO control and power pins

  • Firmware initialization suggestions