Skip to main content

Hardware Guide

Complete hardware configuration and pin mapping for SerialyTTY.

ESP32-C6 DevKitโ€‹

Board Specificationsโ€‹

SpecificationValue
MCUESP32-C6-WROOM-1
ArchitectureRISC-V 32-bit
CPU Frequency160 MHz
RAM320 KB SRAM
Flash8 MB
WiFi802.11 b/g/n (2.4 GHz)
BluetoothBLE 5.0
USBUSB 2.0 Full Speed (native)
Operating Voltage3.3V

Power Requirementsโ€‹

  • Input Voltage: 5V via USB-C
  • Operating Current: ~100mA (typical), up to 500mA with peripherals
  • Deep Sleep: <10ยตA (when implemented)

Pin Configurationโ€‹

UART Bridge (Primary Function)โ€‹

FunctionGPIODescription
UART1_RXGPIO16Receives data from target device
UART1_TXGPIO17Transmits data to target device
UART0_RXGPIO20USB Serial (console)
UART0_TXGPIO21USB Serial (console)

UART Configuration:

  • Baud Rate: Auto-detected (9600-115200)
  • Data Bits: 8
  • Parity: None
  • Stop Bits: 1
  • Flow Control: None

TFT Display (ILI9341) - Optionalโ€‹

FunctionGPIODescription
SPI_MOSIGPIO7Master Out Slave In (shared)
SPI_MISOGPIO2Master In Slave Out (shared)
SPI_SCLKGPIO6SPI Clock (shared)
TFT_CSGPIO10Chip Select (Display)
TFT_DCGPIO3Data/Command
TFT_RSTGPIO4Reset
TFT_BLGPIO5Backlight Control

SPI Configuration:

  • Clock Speed: 40 MHz
  • Mode: SPI Mode 0
  • Bit Order: MSB First
  • DMA: Channel 1 (enabled)

Display Specifications:

  • Resolution: 240x320 pixels
  • Color Depth: RGB565 (16-bit)
  • Interface: 4-wire SPI
  • Operating Voltage: 3.3V
  • Backlight: PWM controlled (future)

SD Card Module - Optionalโ€‹

FunctionGPIODescription
SPI_MOSIGPIO7Master Out Slave In (shared)
SPI_MISOGPIO2Master In Slave Out (shared)
SPI_SCLKGPIO6SPI Clock (shared)
SD_CSGPIO1Chip Select (SD Card)

SPI Configuration:

  • Clock Speed: 20 MHz (default), up to 40 MHz
  • Mode: SPI Mode 0
  • Filesystem: FAT16/FAT32
  • Voltage: 3.3V (ensure card is 3.3V compatible!)

SD Card Requirements:

  • Type: microSD or SD (with adapter)
  • Format: FAT32 (recommended)
  • Capacity: Up to 32GB tested
  • Speed Class: Class 4 or higher

I2C Bus (Reserved)โ€‹

FunctionGPIODescription
I2C_SDAGPIO8I2C Data (future expansion)
I2C_SCLGPIO9I2C Clock (future expansion)

I2C Configuration:

  • Speed: 100 kHz (standard mode)
  • Address Range: 0x08-0x77
  • Pull-ups: 4.7kฮฉ external required

Available GPIO Pinsโ€‹

Reserved for future expansion:

GPIOCurrent UseNotes
GPIO0FreeBoot mode control (avoid external pull-down)
GPIO11FreeGeneral purpose
GPIO12FreeGeneral purpose
GPIO13FreeGeneral purpose
GPIO18FreeGeneral purpose
GPIO19FreeGeneral purpose
GPIO22FreeGeneral purpose
GPIO23FreeGeneral purpose

Wiring Diagramsโ€‹

Minimal Configuration (UART Only)โ€‹

ESP32-C6                Target Device
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ GPIO16 โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ TX โ”‚
โ”‚ (RX) โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ GPIO17 โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ RX โ”‚
โ”‚ (TX) โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ GND โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GND โ”‚
โ”‚ โ”‚ โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Full Configuration (with Display and SD)โ€‹

                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ESP32-C6 โ”‚
โ”‚ โ”‚
ILI9341 โ”‚ GPIO7 (MOSI) โ”‚โ”€โ”€โ”ฌโ”€โ”€ SD Card MOSI
MOSI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GPIO2 (MISO) โ”‚โ”€โ”€โ”ค
MISO โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GPIO6 (SCLK) โ”‚โ”€โ”€โ”ดโ”€โ”€ SD Card SCLK/MISO
SCLK โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GPIO10 (CS) โ”‚
CS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GPIO3 (DC) โ”‚ SD Card
DC โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GPIO4 (RST) โ”‚ CS โ”€โ”€โ”€โ”€โ”€โ”€ GPIO1
RST โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ GPIO5 (BL) โ”‚
BL โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ โ”‚
โ”‚ GPIO16 (RX) โ”‚โ”€โ”€โ”€โ”€ Target TX
โ”‚ GPIO17 (TX) โ”‚โ”€โ”€โ”€โ”€ Target RX
โ”‚ โ”‚
โ”‚ GND โ”‚โ”€โ”€โ”€โ”€ Common Ground
โ”‚ 3.3V โ”‚โ”€โ”€โ”€โ”€ Power peripherals
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Hardware Setup Instructionsโ€‹

Step 1: ESP32-C6 Preparationโ€‹

  1. Inspect the board for physical damage
  2. Verify all GPIO pins are accessible
  3. Connect USB-C cable to computer
  4. Confirm device enumeration (check device manager/dmesg)

Step 2: TFT Display Connection (Optional)โ€‹

  1. Verify display voltage: Must be 3.3V compatible
  2. Connect power first: VCC to 3.3V, GND to GND
  3. Connect SPI bus: MOSI, MISO, SCLK (shared with SD)
  4. Connect control pins: CS, DC, RST, BL

Important:

  • Use short, twisted-pair wires for SPI signals
  • Keep SPI traces under 10cm if possible
  • Add 0.1ยตF decoupling capacitor near display VCC

Step 3: SD Card Connection (Optional)โ€‹

  1. Format SD card: FAT32 using computer
  2. Verify voltage: Use 3.3V compatible module only
  3. Connect SPI bus: Share MOSI, MISO, SCLK with display
  4. Connect CS: GPIO1 (different from display CS)

Important:

  • Many SD modules have built-in level shifters - check specs
  • Ensure separate chip select (CS) pins
  • Test SD card reads/writes on computer first

Step 4: Target Device Connectionโ€‹

  1. Identify target UART pins (TX, RX, GND)
  2. Cross-connect: Target TX โ†’ ESP32 RX (GPIO16)
  3. Cross-connect: Target RX โ†’ ESP32 TX (GPIO17)
  4. Common ground: Connect GND pins

Warning: Ensure voltage levels match (3.3V). Use level shifters for 5V devices.

Signal Quality Considerationsโ€‹

SPI Bus Sharingโ€‹

The display and SD card share the SPI bus (MOSI, MISO, SCLK) but have separate chip select (CS) pins:

  • Display CS: GPIO10
  • SD Card CS: GPIO1

Best Practices:

  • Only one device active at a time (enforced in software)
  • Use pull-up resistors on CS lines (10kฮฉ recommended)
  • Minimize capacitive loading with short wires

UART Signal Integrityโ€‹

For reliable baud detection:

  • Use twisted-pair or shielded cable for long runs
  • Keep UART traces away from SPI clock
  • Add series termination (22-47ฮฉ) for high speeds
  • Avoid running UART parallel to power lines

Power Distributionโ€‹

  • Add bulk capacitor (100ยตF) near ESP32-C6 power input
  • Add ceramic capacitor (0.1ยตF) near each peripheral
  • Keep power traces wide (>20 mil) and short
  • Monitor voltage drop - should stay within ยฑ5%

Testing Hardware Connectionsโ€‹

Visual Inspection Checklistโ€‹

  • All connections secure and properly seated
  • No short circuits between adjacent pins
  • Polarity correct (VCC, GND)
  • Signal lines match pin configuration

Power-On Testโ€‹

  1. Connect USB cable (no peripherals)
  2. Verify green LED on ESP32-C6 board
  3. Check device appears in serial port list
  4. Measure 3.3V between VCC and GND pins

Peripheral Testโ€‹

  1. Display: Should show boot screen on power-up (if enabled)
  2. SD Card: Check for mount success message in serial log
  3. UART: Loopback test - connect GPIO16 to GPIO17, verify echo

Troubleshooting Hardware Issuesโ€‹

Display Issuesโ€‹

SymptomPossible CauseSolution
Blank/white screenPower issueCheck VCC/GND, measure voltage
Garbled displaySPI timingReduce SPI clock speed
No responseCS/DC/RST wrongVerify pin connections
Dim displayBacklight offCheck BL pin (GPIO5)

SD Card Issuesโ€‹

SymptomPossible CauseSolution
Mount failsFormat incompatibleReformat as FAT32
Read errorsBad cardTry different SD card
No detectionCS not workingVerify GPIO1 connection
Slow performanceLow speed cardUse Class 10 card

UART Issuesโ€‹

SymptomPossible CauseSolution
No data receivedTX/RX swappedCross-check connections
Corrupted dataBaud mismatchRun auto-detection
Intermittent errorsSignal qualityShorten cables, add pull-ups
No communicationVoltage mismatchCheck 3.3V/5V levels

PCB Design Guidelines (Future)โ€‹

For custom PCB integration:

  1. Layer Stack: Minimum 2-layer, 4-layer recommended
  2. SPI Routing: Match length within 10mm, 50ฮฉ impedance
  3. UART Routing: Differential pairs if possible, 90ฮฉ impedance
  4. Ground Plane: Solid ground pour on bottom layer
  5. Decoupling: 0.1ยตF ceramic caps within 5mm of ICs
  6. Test Points: Add TP on all critical signals

Next: Learn about Features and system capabilities.