Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use OLED: Examples, Pinouts, and Specs

Image of OLED
Cirkit Designer LogoDesign with OLED in Cirkit Designer

Introduction

An Organic Light Emitting Diode (OLED) is a display technology that uses organic compounds to emit light when an electric current is applied. Unlike traditional LCDs, OLEDs do not require a backlight, allowing for thinner, more energy-efficient displays with superior image quality. OLEDs are known for their high contrast ratios, vibrant colors, and ability to produce deep blacks, making them ideal for applications requiring high visual fidelity.

Explore Projects Built with 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!
IoT Board with 0.96" OLED Display for Real-Time Data Visualization
Image of dgd: A project utilizing OLED in a practical application
This circuit connects a 0.96" OLED display to an IoT board. The OLED display is powered by the 3.3V and GND pins of the IoT board, and communicates with the board via I2C using the SDA and SCL pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino 101 OLED Display Animation Project
Image of wokwi animater test: A project utilizing OLED in a practical application
This circuit consists of an Arduino 101 microcontroller connected to a 0.96" OLED display via I2C communication. The Arduino runs a program that initializes the OLED and continuously displays an animated sequence of frames on the screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Wi-Fi Controlled RGB LED and OLED Display with ESP8266
Image of ESP thermometer reciever: A project utilizing OLED in a practical application
This circuit features an ESP8266 microcontroller interfaced with a 128x64 OLED display via I2C for visual output and an RGB LED controlled through current-limiting resistors. The ESP8266 provides power and control signals to both the display and the LED, enabling visual feedback and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and OLED Display for Real-Time Data Visualization
Image of OLED Display: A project utilizing OLED in a practical application
This circuit consists of an Arduino Nano microcontroller connected to a 0.96" OLED display. The Arduino Nano provides power to the OLED display and communicates with it using the I2C protocol via the A4 (SDA) and A5 (SCK) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 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!
Image of dgd: A project utilizing OLED in a practical application
IoT Board with 0.96" OLED Display for Real-Time Data Visualization
This circuit connects a 0.96" OLED display to an IoT board. The OLED display is powered by the 3.3V and GND pins of the IoT board, and communicates with the board via I2C using the SDA and SCL pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of wokwi animater test: A project utilizing OLED in a practical application
Arduino 101 OLED Display Animation Project
This circuit consists of an Arduino 101 microcontroller connected to a 0.96" OLED display via I2C communication. The Arduino runs a program that initializes the OLED and continuously displays an animated sequence of frames on the screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP thermometer reciever: A project utilizing OLED in a practical application
Wi-Fi Controlled RGB LED and OLED Display with ESP8266
This circuit features an ESP8266 microcontroller interfaced with a 128x64 OLED display via I2C for visual output and an RGB LED controlled through current-limiting resistors. The ESP8266 provides power and control signals to both the display and the LED, enabling visual feedback and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of OLED Display: A project utilizing OLED in a practical application
Arduino Nano and OLED Display for Real-Time Data Visualization
This circuit consists of an Arduino Nano microcontroller connected to a 0.96" OLED display. The Arduino Nano provides power to the OLED display and communicates with it using the I2C protocol via the A4 (SDA) and A5 (SCK) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Displays for smartphones, tablets, and televisions
  • Wearable devices and smartwatches
  • Industrial and medical equipment displays
  • Arduino-based projects for visual output
  • Compact, low-power graphical interfaces for IoT devices

Technical Specifications

Below are the general technical specifications for an OLED display module compatible with the Arduino UNO:

Parameter Specification
Manufacturer Arduino
Part ID UNO
Display Type OLED (Organic Light Emitting Diode)
Resolution 128 x 64 pixels
Interface I2C or SPI
Operating Voltage 3.3V to 5V
Current Consumption ~20mA (varies with brightness)
Viewing Angle ~160°
Operating Temperature -40°C to 85°C
Dimensions Varies (e.g., 0.96-inch diagonal)

Pin Configuration and Descriptions

The pinout for a typical I2C-based OLED module is as follows:

Pin Name Description
VCC Power supply (3.3V or 5V)
GND Ground
SCL Serial Clock Line for I2C communication
SDA Serial Data Line for I2C communication

For SPI-based OLED modules, the pinout may include additional pins such as CS (Chip Select) and DC (Data/Command).

Usage Instructions

How to Use the OLED in a Circuit

  1. Connect the OLED to the Arduino UNO:

    • For I2C communication:
      • Connect VCC to the 5V pin on the Arduino.
      • Connect GND to the GND pin on the Arduino.
      • Connect SCL to the A5 pin (or SCL pin on newer boards).
      • Connect SDA to the A4 pin (or SDA pin on newer boards).
    • For SPI communication, refer to the specific pinout of your OLED module.
  2. Install Required Libraries:

    • Use the Arduino IDE to install the Adafruit_GFX and Adafruit_SSD1306 libraries. These libraries provide functions for controlling the OLED.
  3. Upload Example Code:

    • Use the following sample code to display text on the OLED:
#include <Adafruit_GFX.h>       // Graphics library for OLED
#include <Adafruit_SSD1306.h>  // OLED driver library

#define SCREEN_WIDTH 128        // OLED display width, in pixels
#define SCREEN_HEIGHT 64        // OLED display height, in pixels

// Declaration for an SSD1306 display connected via I2C
#define OLED_RESET -1           // Reset pin (not used with I2C)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

void setup() {
  // Initialize the display
  if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
    // Check if the display is connected
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Don't proceed, loop forever
  }

  display.clearDisplay();        // Clear the buffer
  display.setTextSize(1);        // Set text size (1 = small, 2 = medium, etc.)
  display.setTextColor(SSD1306_WHITE); // Set text color
  display.setCursor(0, 0);       // Set cursor position
  display.println(F("Hello, OLED!")); // Print text to display
  display.display();             // Display the text
}

void loop() {
  // Nothing to do here
}

Important Considerations and Best Practices

  • Power Supply: Ensure the OLED module is powered within its operating voltage range (3.3V to 5V). Exceeding this range may damage the display.
  • I2C Address: The default I2C address for most OLED modules is 0x3C. If the display does not work, check the address using an I2C scanner sketch.
  • Contrast and Brightness: Adjust the brightness settings in the code to optimize power consumption and display longevity.
  • Wiring: Double-check all connections to avoid short circuits or incorrect wiring.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The OLED does not display anything:

    • Verify the wiring and ensure all connections are secure.
    • Check the I2C address in the code. Use an I2C scanner to confirm the address.
    • Ensure the required libraries (Adafruit_GFX and Adafruit_SSD1306) are installed and up to date.
  2. The display flickers or shows distorted graphics:

    • Ensure the power supply is stable and sufficient for the OLED module.
    • Check for loose connections or interference in the I2C/SPI lines.
  3. The text or graphics are not visible:

    • Increase the brightness in the code.
    • Ensure the text size and cursor position are set correctly.

FAQs

Q: Can I use the OLED with a 3.3V microcontroller?
A: Yes, most OLED modules are compatible with both 3.3V and 5V logic levels. Check the module's datasheet to confirm.

Q: How do I display custom graphics on the OLED?
A: Use the Adafruit_GFX library to draw shapes, lines, and bitmaps. You can also use online tools to convert images into bitmap arrays for display.

Q: Can I use multiple OLEDs with one Arduino?
A: Yes, you can use multiple OLEDs by assigning unique I2C addresses or using separate SPI chip select pins.

By following this documentation, you can successfully integrate and use an OLED display in your Arduino projects.