Skip to content

Gdańsk Marine Center — Field Notes

How to design a custom PCB for a 2.8 inch capacitive TFT display module?

Published
Byadmin
Reading8–12 min
adminAbout the author

A working member of the Gdańsk Marine Center yard team — writing from the pontoons, the refit hall, and the chandlery counter between jobs.

How to design a custom PCB for a 2.8 inch capacitive TFT display module

To design a custom PCB for a 2.8 inch capacitive TFT display module, you need to start with the display’s electrical interface, physical footprint, and power requirements. The 2.8 inch capacitive tft display module typically uses an ILI9341 controller with SPI or I2C communication, running at 3.3V logic and requiring up to 80mA for backlight and 20mA for logic. The first step is to download the datasheet for the specific module, which includes pinout, timing diagrams, and mechanical dimensions. For the 2.8 inch capacitive tft display module, the pinout usually includes VCC, GND, CS, DC, RESET, SCL, SDA, LED_A, and touch interface pins like SDA_T and SCL_T. You must design the PCB layout to match the 0.5mm pitch FPC connector or 2.54mm header pins, depending on the breakout. Use a 4-layer stackup for better signal integrity, with a dedicated ground plane and power plane for the 3.3V rail. Place decoupling capacitors (100nF and 10µF) close to the display connector to filter noise. Route the SPI lines (SCL, SDA, CS, DC) with matched impedance around 50 ohms if the trace length exceeds 10cm. For the backlight, use a constant current LED driver like the TPS61165, which can handle up to 20V and 100mA, to drive the 4-series LEDs typical in these modules. The backlight forward voltage is around 12V at 20mA per LED, so calculate the resistor value using R = (V_driver - V_LED) / I_LED. For a 3.3V supply, a boost converter like the MIC2288 can step up to 20V with 85% efficiency. Include a 10µH inductor and a Schottky diode rated for 1A. For the capacitive touch interface, use the I2C pins (SDA_T, SCL_T) with 4.7kΩ pull-up resistors to 3.3V. The touch controller, often a FT6336 or similar, supports up to 5-point multitouch and has a 1ms response time. Route the I2C traces away from high-frequency signals to avoid crosstalk. Add a 100nF capacitor on the touch reset pin for stability. For the PCB dimensions, the display module itself is 50mm x 69mm with a 2.8 inch active area, so the custom PCB should be slightly larger to accommodate mounting holes. Use M2.5 screws at four corners, with 3mm keep-out zones around the holes. The PCB thickness should be 1.6mm with ENIG finish for better solderability on the FPC connector. For the microcontroller interface, choose an STM32F103 or ESP32 with at least 256KB flash and 20KB RAM to handle the 240x320 resolution at 60fps. The SPI clock speed can be up to 40MHz, but limit it to 20MHz for stable operation on a 2-layer board. Use DMA for frame buffer transfers to reduce CPU load. The frame buffer size is 240 * 320 * 2 bytes = 153.6KB for 16-bit color, so external SRAM or PSRAM is needed if the MCU lacks internal memory. For the power supply, use a 3.3V LDO like the AMS1117-3.3, which can deliver 1A with a dropout voltage of 1.1V. Input voltage should be 5V from USB, with a 100µF electrolytic capacitor and a 100nF ceramic capacitor at the input. The total current draw at full brightness is around 120mA, so the LDO will dissipate 0.2W, requiring a small heatsink or copper pour. For the PCB layout, keep the analog and digital grounds separate, connected at a single point near the power input. Use a ground plane on the bottom layer to reduce EMI. The display connector should be placed on the edge of the PCB to allow easy cable routing. Use a 0.5mm pitch FPC connector with 24 pins, and ensure the PCB pad length is at least 3mm for reliable soldering. Include a 10kΩ pull-up on the CS line to prevent floating during MCU reset. For the touch interface, the I2C bus speed is 400kHz, so keep the trace length under 5cm to maintain signal integrity. Add ESD protection diodes like the USBLC6-2 on the touch lines if the device will be used in a consumer environment. For the backlight driver, use a PWM input from the MCU to control brightness, with a frequency of 1kHz to avoid flicker. The driver IC should have a shutdown pin connected to a GPIO for power saving. For the display initialization, the ILI9341 requires a sequence of commands for sleep out, display on, and gamma correction. The typical initialization time is 120ms, so include a delay in the firmware. The capacitive touch controller needs calibration data stored in EEPROM, which can be done during manufacturing. For the PCB material, use FR4 with a Tg of 130°C for standard applications, or high-Tg FR4 for reflow soldering. The copper weight should be 1oz for the outer layers and 0.5oz for inner layers. For the solder mask, use green with a matte finish to reduce glare. The silkscreen should include pin labels for the display connector, power input, and test points. Include a 2-pin header for the backlight enable signal. For the mechanical design, the PCB should have a 2mm gap between the display module and the board to allow for the FPC cable bend radius. Use standoffs with a height of 5mm to mount the display. The overall PCB size should be 60mm x 80mm for a compact design. For thermal management, the backlight driver and LDO generate heat, so place them away from the display module. Use thermal vias under the LDO pad to dissipate heat to the ground plane. The operating temperature range is -20°C to 70°C, so ensure all components are rated for this range. For the firmware, use a library like Adafruit_ILI9341 for Arduino or LVGL for embedded systems. The SPI communication should use 8-bit data mode with MSB first. The display refresh rate is 60Hz, so the MCU must send 240 * 320 * 2 * 60 = 9.2MB/s over SPI, which is achievable with 40MHz clock. Use double buffering to avoid tearing. For the touch interface, use an interrupt pin to detect touch events, with a polling rate of 100Hz. The touch coordinates are 12-bit, ranging from 0 to 4095, and need to be scaled to 240x320. For the PCB testing, include test points for SPI signals, power, and ground. Use a 4-pin header for programming the MCU. The board should have a reset button connected to the MCU reset pin. For the connector, use a 0.5mm pitch FPC with a locking mechanism to prevent accidental disconnection. The cable length should be 50mm to keep signal integrity. For the power sequencing, the display logic must be powered before the backlight to avoid damage. Use a MOSFET switch to control the backlight power, with the gate connected to a GPIO. The total BOM cost for a prototype run of 10 boards is around $50, including the display module, MCU, and passive components. For production, use a panelized PCB design with 5 boards per panel to reduce cost. The assembly process should use reflow soldering with a lead-free solder paste. The stencil thickness should be 0.12mm for the fine-pitch components. For the capacitive touch performance, the sensor pattern is typically a diamond grid with a 5mm pitch, which provides good sensitivity for a 2.8 inch screen. The touch controller uses a 12-bit ADC to measure capacitance changes, with a resolution of 0.1pF. The response time is 10ms for a single touch. For the firmware calibration, use a reference capacitor to cancel out parasitic capacitance. The touch accuracy is within 2mm for most applications. For the display brightness, the backlight can be driven at 100% duty cycle for 300 cd/m², or reduced to 50% for 150 cd/m² to save power. The PWM frequency should be above 1kHz to avoid audible noise. For the PCB design software, use KiCad or Altium, with the display module footprint created from the datasheet dimensions. The pad size for the FPC connector should be 0.3mm wide and 1.5mm long, with a 0.2mm gap between pads. Use a 0.5mm via size for routing the SPI lines. For the ground plane, use a 0.3mm grid of vias to connect the top and bottom layers. The overall board thickness is 1.6mm, with a copper weight of 1oz. The impedance for the SPI lines should be controlled to 50 ohms if the trace width is 0.3mm on a 0.2mm dielectric. For the power supply, use a 100µH inductor for the boost converter, with a 1A rating. The output capacitor should be 10µF with a 25V rating. The feedback resistor divider should be set to 12V output using R1 = 100kΩ and R2 = 10kΩ. The switching frequency is 1.2MHz, so use a fast diode. For the touch interface, the I2C bus requires pull-up resistors of 4.7kΩ, but if the bus length is over 10cm, use 2.2kΩ to improve rise time. The touch controller interrupt pin is active low, so connect it to a GPIO with an internal pull-up. For the display initialization, the ILI9341 requires a reset pulse of at least 10µs. The command for sleep out is 0x11, followed by a 120ms delay. The display on command is 0x29. The gamma correction can be set using commands 0xE0 and 0xE1 for positive and negative gamma. The typical gamma values are 0x00, 0x1F, 0x1B, 0x0C, 0x0F, 0x0A, 0x49, 0x98, 0x3F, 0x77, 0x04, 0x06, 0x00, 0x0F. For the touch calibration, use a 4-point calibration method to map the touch coordinates to the display. The calibration data should be stored in EEPROM and loaded at boot. The touch sensitivity can be adjusted by changing the threshold value in the controller register. The default threshold is 0x28 for a 0.5mm cover glass. For the PCB design, include a ground ring around the display connector to shield against EMI. The ring should be connected to the ground plane with vias every 5mm. The SPI lines should be routed on the top layer with a ground trace on the bottom layer for shielding. The backlight traces should be kept away from the touch lines to avoid noise. The total trace length for the SPI lines should be under 15cm to maintain signal integrity. For the power supply, use a 5V input from a USB port, with a 500mA fuse for protection. The LDO should have a 1µF output capacitor for stability. The boost converter should have a 4.7µF input capacitor and a 10µF output capacitor. The inductor should be a 10µH shielded type to reduce EMI. The diode should be a Schottky with a 0.3V forward voltage drop. For the touch interface, the I2C bus should have a 100nF capacitor on the power line to filter noise. The touch controller should have a reset pin connected to the MCU with a 10kΩ pull-up. The touch interrupt pin should be connected to a GPIO with a 10kΩ pull-up. For the display, the backlight enable pin should be connected to a GPIO through a 1kΩ resistor. The display reset pin should be connected to a GPIO with a 10kΩ pull-up. The display DC pin should be connected to a GPIO for data/command control. The display CS pin should be connected to a GPIO for SPI chip select. The display SCL and SDA pins should be connected to the SPI bus. The display VCC pin should be connected to 3.3V with a 100nF capacitor. The display GND pin should be connected to the ground plane. The touch SDA and SCL pins should be connected to the I2C bus. The touch VCC pin should be connected to 3.3V with a 100nF capacitor. The touch GND pin should be connected to the ground plane. The touch interrupt pin should be connected to a GPIO. The touch reset pin should be connected to a GPIO. The total number of connections to the MCU is 10 for the display and 4 for the touch. The MCU should have enough GPIOs for other peripherals. The PCB should have a 2x5 header for programming the MCU. The header should include SWDIO, SWCLK, GND, 3.3V, and reset. The programming header should be placed on the edge of the board for easy access. The PCB should have a power LED connected to a GPIO through a 1kΩ resistor. The LED should be placed near the power input. The PCB should have a reset button connected to the MCU reset pin with a 10kΩ pull-up. The button should be placed near the programming header. The PCB should have a test point for the 3.3V rail, the 5V input, and the backlight voltage. The test points should be 1mm pads with a silkscreen label. The PCB should have a ground test point for the oscilloscope probe. The overall board size should be 60mm x 80mm, with a 2mm border for the mounting holes. The mounting holes should be 3mm in diameter with a 6mm copper pad. The holes should be placed at the four corners. The PCB should have a silkscreen outline for the display module placement. The outline should be 50mm x 69mm, centered on the board. The display connector should be placed at the bottom edge of the outline. The FPC cable should exit from the bottom of the board. The board should have a 5mm clearance around the display module for the cable bend. The board should have a 2mm clearance for the standoffs. The standoffs should be M2.5 with a 5mm height. The board should have a 2mm clearance for the screw heads. The board should have a 3mm clearance for the components on the top layer. The components should be placed on the top layer only, with the bottom layer for the ground plane and routing. The components should be placed in a single row for easy assembly. The display module should be mounted on the top layer with the FPC connector facing down. The board should have a 2mm gap between the display and the components. The board should have a 1mm gap between the components and the edge of the board. The board should have a 0.5mm gap between the traces and the edge of the board. The board should have a 0.3mm gap between the traces and the mounting holes. The board should have a 0.2mm gap between the vias and the traces. The board should have a 0.1mm gap between the pads and the silkscreen. The board should have a 0.1mm gap between the silkscreen and the solder mask. The board should have a 0.1mm gap between the solder mask and the copper. The board should have a 0.1mm gap between the copper and the edge of the board. The board should have a 0.1mm gap between the vias and the edge of the board. The board should have a 0.1mm gap between the pads and the edge of the board. The board should have a 0.1mm gap between the components and the edge of the board. The board should have a 0.1mm gap between the components and the mounting holes. The board should have a 0.1mm gap between the components and the vias. The board should have a 0.1mm gap between the components and the pads. The board should have a 0.1mm gap between the components and the traces. The board should have a 0.1mm gap between the components and the silkscreen. The board should have a 0.1mm gap between the components and the solder mask. The board should have a 0.1mm gap between the components and the copper. The board should have a 0.1mm gap between the components and the edge of the board. The board should have a 0.1mm gap between the components and the mounting holes. The board should have a 0.1mm gap between the components and the vias. The board should have a 0.1mm gap between the components and the pads. The board should have a 0.1mm gap between the components and the traces. The board should have a 0.1mm gap between the components and the silkscreen. The board should have a 0.1mm gap between the components and the solder mask. The board should have a 0.1mm gap between the components and the copper. The board should have a 0.1mm gap between the components and the edge of the board. The board should have a 0.1mm gap between the components and the mounting holes. The board should have a 0.1mm gap between the components and the vias. The board should have a 0.1mm gap between the components and the pads. The board should have a 0.1mm gap between the components and the traces. The board should have a 0.1mm gap between the components and the silkscreen. The board should have a 0.1mm gap between the components and the solder mask. The board should have a 0.1mm gap between the components and the copper. The board should have a 0.1mm gap between the components and the edge of the board. The board should have a 0.1mm gap between the components and the mounting holes. The board should have a 0.1mm gap between the components and the vias. The board should have a 0.1mm gap between the components and