Skip to content
Combating GlobalizationInstitute · Est. 2011
Vol. XIV · No. 47 · Weekly Dispatch · Washington · London · Budapest · Sydney

How to connect a 1.14 inch IPS screen to Arduino?

To connect a 1.14 inch IPS screen to Arduino, you need to wire the SPI interface pins correctly, install the right libraries, and configure the display controller—typically the ST7789 or GC9A01—depending on the specific model. The most common variant is the 240x135 pixel IPS display using the ST7789 driver, which communicates via SPI (Serial Peripheral Interface) at up to 40 MHz, offering smooth 262K color rendering. Start by identifying the pinout: the display module usually has 8 pins—VCC (3.3V or 5V), GND, SCL (SPI clock), SDA (SPI data), RES (reset), DC (data/command), CS (chip select), and BLK (backlight). For Arduino Uno, connect VCC to 3.3V (not 5V, as the display runs at 3.3V logic), GND to ground, SCL to pin 13 (SCK), SDA to pin 11 (MOSI), RES to pin 9, DC to pin 8, CS to pin 10, and BLK to 3.3V via a 100-ohm resistor to limit current—though many modules work with direct 3.3V. The SPI interface uses 4 wires: MOSI, MISO (not used here), SCK, and CS, plus DC and RES for control. The 1.14 inch 240x135 ips display typically has a 1.14-inch diagonal, 240x135 resolution, 0.0938mm pixel pitch, and a 160-degree viewing angle, making it ideal for compact projects like smartwatches or data dashboards.

Before writing code, install the Adafruit ST7789 library and the Adafruit GFX library via the Arduino Library Manager. The ST7789 driver supports 240x135 pixels natively, but you must set the rotation correctly—usually rotation 1 or 2—to match the physical orientation, as the display is often mounted in landscape or portrait mode. The SPI speed can be set to 40 MHz on most Arduino boards, but for stability, use 20 MHz on 3.3V systems. The backlight current draw is around 20-30 mA at 3.3V, while the display logic draws about 10-15 mA, so total consumption is under 50 mA—safe for Arduino’s 3.3V regulator (which outputs up to 150 mA). If using a 5V Arduino, include a level shifter for the SPI lines, as the display is 3.3V tolerant but not 5V tolerant. The reset pin must be held high during operation; many modules have a built-in pull-up resistor, but connecting it to an Arduino pin ensures proper initialization.

To wire the display to an Arduino Uno, use the following connections: VCC to 3.3V, GND to GND, SCL to pin 13, SDA to pin 11, RES to pin 9, DC to pin 8, CS to pin 10, and BLK to 3.3V through a 100-ohm resistor. For Arduino Mega, the SPI pins are different: pin 52 for SCK, pin 51 for MOSI, and any digital pin for CS, DC, and RES. The SPI clock speed should be set to 20 MHz in the library initialization to avoid signal degradation on longer wires. The display’s pixel clock is 40 MHz, but Arduino’s SPI hardware can handle up to 16 MHz on Uno and 20 MHz on Mega, so 20 MHz is a safe compromise. The refresh rate is around 60 Hz for static images, but updating the full 240x135 frame buffer at 16-bit color (64,800 bytes) takes about 10 ms at 20 MHz SPI, allowing smooth animations at 30-40 fps.

Software setup requires initializing the display with the correct SPI pins. Use the Adafruit_ST7789 library, which includes a constructor for hardware SPI: Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); Then call tft.init(240, 135); to set the resolution. The library automatically sets the SPI clock to 20 MHz, but you can override it with tft.setSPISpeed(40000000); for 40 MHz if your wiring is short and clean. The color depth is 16-bit RGB565, with 65,536 colors, but the display controller supports 262K colors via dithering. The frame buffer is stored in the display’s RAM (240x135x2 bytes = 64,800 bytes), and the Arduino’s SRAM (2 KB on Uno) is insufficient for double buffering, so use direct drawing commands like tft.fillScreen(ST77XX_BLACK) or tft.drawPixel(x, y, color) to update the screen incrementally. For complex graphics, use the Adafruit GFX library’s drawBitmap() function to send pre-calculated data from PROGMEM (flash memory) to save RAM.

One common issue is the display not showing anything after wiring. Check the voltage: the display requires 3.3V, and using 5V on VCC can damage the driver. The backlight pin (BLK) should be connected to 3.3V through a resistor—100 ohms works for 20 mA current, giving a brightness of about 300 cd/m². If the backlight is too dim, lower the resistor to 50 ohms (40 mA), but keep it above 30 ohms to avoid overheating. The SPI lines (SCL, SDA) must be connected to the correct pins; on Uno, SCL is pin 13 and SDA is pin 11. If using software SPI, you can use any digital pins, but hardware SPI is faster and more reliable. The reset pin must be held high; if left floating, the display may reset randomly. The CS pin must be pulled low during SPI communication; many libraries handle this automatically, but double-check the wiring.

For advanced users, you can optimize performance by using the SPI transactions feature in Arduino’s SPI library. Include and call SPI.beginTransaction(SPISettings(40000000, MSBFIRST, SPI_MODE0)); before any display command. The ST7789 uses SPI mode 0 (CPOL=0, CPHA=0), meaning the clock idles low and data is sampled on the rising edge. The display’s command set includes 0x36 for memory access control (rotation), 0x3A for pixel format (set to 0x05 for 16-bit color), and 0x11 for sleep out (wake up). The initialization sequence typically takes 10-20 ms, and you can reduce it by skipping unnecessary commands. The display’s response time is 15-20 ms, so fast animations may show ghosting at high frame rates, but for static data like text or gauges, it’s fine.

Power consumption varies with usage. At 3.3V, the display draws 15 mA when idle (all pixels white), 25 mA when showing a full-screen image, and 30 mA with the backlight at full brightness. The Arduino Uno’s 3.3V regulator can handle up to 50 mA, so it’s safe, but if you add other peripherals, use an external 3.3V regulator like the AMS1117-3.3. The display’s operating temperature range is -20°C to 70°C, making it suitable for indoor projects. The viewing angle is 160 degrees, with contrast ratio of 1000:1, and the pixel pitch of 0.0938mm gives a sharp image at typical viewing distances of 10-30 cm. The display’s thickness is 1.2 mm (without PCB), and the module adds about 2 mm, so it fits in tight enclosures.

If you need to display text, use the setTextSize() and setTextColor() functions from Adafruit GFX. For example, tft.setTextSize(2); tft.setTextColor(ST77XX_WHITE); tft.setCursor(0, 0); tft.println("Hello"); prints text at 2x scale (12x14 pixels per character). The library supports custom fonts via the setFont() function, but they consume flash memory. For the 240x135 resolution, you can display 20 characters per line at size 2 (12 pixels wide each) and 9 lines at size 2 (14 pixels tall each), giving a readable text area of 240x126 pixels. The remaining 9 pixels at the bottom can be used for a status bar or icons. The display’s gamma correction is set by default, but you can adjust it via the 0xE0 command for custom color curves—though this is rarely needed.

For a project like a temperature monitor, connect a DHT22 sensor to Arduino, read the data, and display it on the screen. The DHT22 uses one digital pin and updates every 2 seconds. The display can show temperature and humidity with large fonts, plus a simple bar graph for trends. The SPI speed of 20 MHz ensures the screen updates in under 5 ms, so the 2-second update interval is fine. Use the tft.fillRect() function to clear only the changed area, reducing flicker. For example, tft.fillRect(0, 0, 240, 30, ST77XX_BLACK) clears the top 30 pixels, then draw the new text. This approach saves power and improves responsiveness.

Another common use is a battery-powered project, like a smartwatch replica. The display’s low power consumption (25 mA typical) allows running on a 200 mAh LiPo battery for about 8 hours. Use the display’s sleep mode (command 0x10) to reduce power to 0.1 mA when the screen is off. Wake it up with command 0x11, which takes 5 ms. The backlight can be PWM-controlled via a transistor (e.g., 2N2222) connected to an Arduino pin, allowing brightness adjustment from 0 to 100%. The PWM frequency should be 1 kHz to avoid flicker, and the duty cycle can be set via analogWrite() on a PWM-capable pin like pin 9. The maximum backlight current is 30 mA at 100% duty, so use a 100-ohm resistor in series to limit it.

The display’s SPI interface is compatible with other Arduino boards, like the ESP8266 and ESP32. For ESP32, use the VSPI pins: MOSI=23, MISO=19, SCK=18, and any GPIO for CS, DC, RES. The ESP32 runs at 3.3V, so no level shifting is needed. The SPI clock can go up to 40 MHz, but some modules may require 20 MHz for stability. The ESP32’s dual-core processor allows running the display update on one core and sensor reading on the other, achieving smooth 60 fps animations. The display’s 240x135 resolution is ideal for ESP32’s 520 KB SRAM, allowing double buffering for tear-free graphics. Use the TFT_eSPI library, which is optimized for ESP32 and supports direct memory access (DMA) for faster transfers—up to 80 MHz SPI with proper wiring.

For the Raspberry Pi Pico (RP2040), use the SPI pins: GP2 (SCK), GP3 (MOSI), GP4 (CS), GP5 (DC), GP6 (RES), and connect VCC to 3.3V. The Pico’s SPI can run at 30 MHz, and the PIO (Programmable I/O) can drive the display at 40 MHz with custom timing. The display’s small size (25.5mm x 35mm module) fits well on the Pico’s breadboard. The Pico’s 264 KB SRAM is enough for a single frame buffer (64,800 bytes), plus graphics data. Use the Adafruit_ST7789 library with the Pico’s Arduino core, or the official Raspberry Pi Pico C SDK for lower-level control. The display’s contrast and brightness are adjustable via the 0xC0 command (power control) and 0xC1 (VCOM control), but default values work well.

If you encounter issues like garbled graphics, check the SPI wiring—loose connections cause clock skew. The SPI data lines should be kept short (under 10 cm) and away from power lines to avoid interference. Use a logic analyzer to verify the SPI signals: the clock should be clean, with no ringing, and the data should be stable during the clock edge. The display’s initialization sequence must include the correct pixel format (0x3A with 0x05 for 16-bit). If the screen shows only white or black, the reset pin may not be held high—add a 10k pull-up resistor to 3.3V. The backlight pin should be connected to a current-limited source; a direct 3.3V connection without resistor may cause the backlight to draw 100 mA, which can damage the LED. The typical forward voltage of the backlight LED is 3.0V, so a 100-ohm resistor gives 3 mA, which is sufficient for indoor use; for outdoor use, use a 50-ohm resistor for 6 mA.

For displaying images, convert them to 16-bit RGB565 format using a tool like Image2LCD. The image size must be 240x135 pixels, and the byte order is little-endian (low byte first). Store the data in PROGMEM on Arduino (using const uint16_t image[] PROGMEM = {...}) and use drawBitmap() to render it. The transfer time for a full image at 20 MHz SPI is about 13 ms (64,800 bytes / 5 MB/s), so you can update the screen at 30 fps with minimal CPU overhead. The display’s built-in frame buffer allows partial updates via the 0x2A (column address) and 0x2B (row address) commands, which let you update only a rectangular region—useful for fast animations like a moving dot. The minimum update size is 1 pixel, but the overhead of setting the address window (3 bytes per command) makes it efficient for regions larger than 10 pixels.

The display’s color accuracy is decent for an IPS panel, with a typical color temperature of 6500K and RGB gamma of 2.2. The 262K colors are achieved via 6-bit per channel with FRC (Frame Rate Control), which dithers between adjacent colors at 60 Hz. This can cause slight flicker in gradients, but it’s not noticeable in most applications. The display’s viewing angle is 160 degrees horizontally and vertically, with minimal color shift—unlike TN panels, which invert colors at angles. The contrast ratio of 1000:1 means blacks are deep, but not as deep as OLED. The display’s response time is 15 ms (rise) and 20 ms (fall), so fast-moving objects may show a slight trailing effect, but it’s acceptable for UI elements.

For a data logger project, use the display to show real-time graphs. The Adafruit GFX library includes a line drawing function (tft.drawLine()), but for smooth curves, use the drawPixel() function to plot individual points. The 240x135 resolution allows plotting 240 data points across the screen, with a 135-pixel vertical range. For a scrolling graph, shift the data left by 1 pixel each update using tft.readRect() and tft.writeRect()—but this requires a frame buffer. On Arduino Uno, use PROGMEM to store a single row of data and update only the new column. The display’s SPI speed of 20 MHz allows a full-screen update every 10 ms, so you can achieve 100 Hz update rate for a single column. The display’s backlight can be PWM-controlled to indicate alerts—e.g., blink at 2 Hz when data exceeds a threshold.

The display’s environmental resistance is limited: it has no protective coating, so avoid moisture and dust. The operating humidity is 10-90% non-condensing. The storage temperature is -30°C to 80°C. The display’s glass is 0.5 mm thick, so it can crack if dropped—use a protective acrylic cover. The module’s PCB is 1.6 mm thick with gold-plated pads, which are solderable but fragile—use a female header for easy connection. The pin spacing is 2.54 mm, standard for breadboards. The module’s dimensions are 25.5mm x 35mm, with a 1.14-inch active area (23.5mm x 13.2mm). The bezel is 1 mm on each side, so the display is nearly edge-to-edge, giving a modern look.

In terms of cost, the display module is typically $3-5, making it one of the cheapest IPS options for Arduino. The total cost for a project including Arduino Uno, display, and a few sensors is under $20. The display’s lifespan is 50,000 hours (about 5.7 years of continuous use) for the backlight LED, and the LCD panel itself lasts longer. The SPI interface is robust, with no wear-out mechanism, so the display can be used for millions of updates. The library support is mature, with Adafruit’s code being actively maintained and compatible with many Arduino boards. The display’s small size and low power make it ideal for wearable projects, but the 240x135 resolution limits text density—use a font size of 2 or larger for readability.

For troubleshooting, if the display shows a blank screen, verify the power supply: measure 3.3V at the display’s VCC pin with a multimeter. If the voltage is below 3.0V, the display may not initialize. The backlight should light up immediately when power is applied—if not, check the BLK pin connection. The display’s reset pin must be pulled high; if using an Arduino pin, set it to HIGH in the setup() function. The SPI lines must be connected to the correct pins; on Uno, SCL is pin 13, SDA is pin 11, and CS is pin 10. If using software SPI, the speed is limited to 1 MHz, which causes slow updates—use hardware SPI for better performance. The library’s init() function must be called with the correct resolution (240