Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Custom OLED: Examples, Pinouts, and Specs

Image of Custom OLEDDesign with Custom OLED in Cirkit Designer

Introduction

The Custom OLED is a high-resolution organic light-emitting diode display designed to deliver vibrant colors and exceptional visual clarity. Its low power consumption and compact form factor make it ideal for portable devices, wearables, and applications requiring flexible display options. The Custom OLED is widely used in consumer electronics, IoT devices, and embedded systems where high-quality visuals are essential.

Explore Projects Built with Custom OLED

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!

Common Applications:

Technical Specifications

Below are the key technical details of the Custom OLED display:

Parameter Specification
Display Type OLED (Organic Light-Emitting Diode)
Resolution 128 x 64 pixels
Color Depth Monochrome or RGB (depending on model)
Operating Voltage 3.3V to 5V
Interface I2C or SPI
Power Consumption < 20mW (typical)
Viewing Angle ~160°
Operating Temperature -40°C to +85°C
Dimensions 1.3" diagonal (customizable sizes)

Pin Configuration

The Custom OLED typically comes with a 4-pin or 7-pin interface, depending on the communication protocol (I2C or SPI). Below is the pin configuration for both modes:

I2C Mode Pinout:

Pin Name Description
1 GND Ground (0V reference)
2 VCC Power supply (3.3V or 5V)
3 SCL Serial Clock Line (I2C clock)
4 SDA Serial Data Line (I2C data)

SPI Mode Pinout:

Pin Name Description
1 GND Ground (0V reference)
2 VCC Power supply (3.3V or 5V)
3 SCK Serial Clock (SPI clock)
4 MOSI Master Out Slave In (SPI data)
5 RES Reset pin
6 DC Data/Command control pin
7 CS Chip Select

Usage Instructions

Connecting the Custom OLED to an Arduino UNO

The Custom OLED can be easily interfaced with an Arduino UNO using the I2C protocol. Follow these steps to set up the display:

  1. Wiring:

    • Connect the GND pin of the OLED to the GND pin on the Arduino.
    • Connect the VCC pin of the OLED to the 5V pin on the Arduino.
    • Connect the SCL pin of the OLED to the A5 pin on the Arduino (I2C clock).
    • Connect the SDA pin of the OLED to the A4 pin on the Arduino (I2C data).
  2. Install Required Libraries:

    • Download and install the Adafruit_GFX and Adafruit_SSD1306 libraries from the Arduino Library Manager.
  3. Example Code: Use the following code to display text on the Custom OLED:

    // Include necessary libraries
    #include <Wire.h>
    #include <Adafruit_GFX.h>
    #include <Adafruit_SSD1306.h>
    
    // Define OLED display width and height
    #define SCREEN_WIDTH 128
    #define SCREEN_HEIGHT 64
    
    // Create an instance of the display object
    Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
    
    void setup() {
      // Initialize the display
      if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
        // Display initialization failed
        Serial.println(F("SSD1306 allocation failed"));
        for (;;); // Halt execution
      }
    
      // Clear the display buffer
      display.clearDisplay();
    
      // Set text size and color
      display.setTextSize(1); // Normal 1:1 pixel scale
      display.setTextColor(SSD1306_WHITE);
    
      // Display a message
      display.setCursor(0, 0); // Start at top-left corner
      display.println(F("Hello, Custom OLED!"));
      display.display(); // Render the text
    }
    
    void loop() {
      // Nothing to do here
    }
    

Important Considerations:

Troubleshooting and FAQs

Common Issues and Solutions:

  1. The display does not turn on:

    • Verify the wiring connections and ensure the power supply is stable.
    • Check if the I2C address (default: 0x3C) matches the one in your code.
  2. Text or graphics are not displayed correctly:

    • Ensure the correct resolution (128x64) is defined in the code.
    • Confirm that the appropriate libraries (Adafruit_GFX and Adafruit_SSD1306) are installed and up to date.
  3. Flickering or unstable display:

    • Check for loose connections or poor soldering on the pins.
    • Use a decoupling capacitor (e.g., 0.1µF) across the power supply pins to reduce noise.
  4. The display is too dim:

    • Verify the power supply voltage is within the specified range.
    • Adjust the contrast settings in the library if supported.

FAQs:

By following this documentation, you can effectively integrate the Custom OLED into your projects and troubleshoot common issues with ease.