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

How to Use oled: Examples, Pinouts, and Specs

Image of oledDesign with oled in Cirkit Designer

Introduction

The Yuri OLED (Part ID: OOH) is a high-performance Organic Light Emitting Diode (OLED) display module designed for a wide range of applications. OLED technology utilizes organic compounds that emit light when an electric current is applied, eliminating the need for a backlight. This results in displays with exceptional contrast ratios, vibrant colors, and deep blacks. The Yuri OLED is compact, energy-efficient, and ideal for use in devices such as smartphones, wearables, industrial equipment, and DIY electronics projects.

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 Arduino UNO Controlled Touch Interface with OLED Display and Servo Feedback: A project utilizing oled in a practical application
Arduino UNO Controlled Touch Interface with OLED Display and Servo Feedback

This circuit features an Arduino UNO microcontroller connected to a touch sensor, an OLED display, a servomotor, and a buzzer. The touch sensor's output is connected to a digital pin on the Arduino for touch input detection. The OLED display communicates with the Arduino via I2C (SDA and SCL lines connected to A4 and A5), the servomotor is controlled by a digital PWM output (D9), and the buzzer is connected to another digital pin (D8) for audio feedback.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The Yuri OLED (Part ID: OOH) is available in various sizes and resolutions. Below are the key technical details for the most common configuration:

General Specifications

Parameter Value
Display Type OLED (Organic Light Emitting Diode)
Manufacturer Yuri
Part ID OOH
Resolution 128 x 64 pixels
Display Size 0.96 inches (diagonal)
Interface I2C (Inter-Integrated Circuit)
Operating Voltage 3.3V to 5V
Operating Temperature -40°C to 85°C
Power Consumption ~20mA (typical)
Viewing Angle >160°
Contrast Ratio 10,000:1
Color Monochrome (white)

Pin Configuration

The Yuri OLED module features a 4-pin interface for I2C communication. Below is the pinout:

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

Usage Instructions

Connecting the OLED to an Arduino UNO

The Yuri OLED is compatible with Arduino boards and can be easily connected using the I2C interface. Follow these steps to set up the OLED with an Arduino UNO:

  1. Wiring the OLED Module:

    • 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 line).
    • Connect the SDA pin of the OLED to the A4 pin on the Arduino (I2C data line).
  2. Installing the Required Library:

    • Open the Arduino IDE.
    • Go to Sketch > Include Library > Manage Libraries.
    • Search for the "Adafruit SSD1306" library and install it.
    • Also, install the "Adafruit GFX" library, which is required for graphics rendering.
  3. Uploading Example Code: Use the following example code to display text on the OLED:

    // Include the necessary libraries
    #include <Adafruit_GFX.h>  // Graphics library for rendering shapes and text
    #include <Adafruit_SSD1306.h>  // Library for SSD1306 OLED displays
    
    // Define the OLED display dimensions
    #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)) {
        // If initialization fails, print an error message
        Serial.println(F("SSD1306 allocation failed"));
        for (;;);  // Halt the program
      }
    
      // Clear the display buffer
      display.clearDisplay();
    
      // Set text size and color
      display.setTextSize(1);  // Text size multiplier
      display.setTextColor(SSD1306_WHITE);  // White text
    
      // Display a message
      display.setCursor(0, 0);  // Set cursor position
      display.println(F("Hello, Yuri OLED!"));
      display.display();  // Render the text on the screen
    }
    
    void loop() {
      // No actions in the loop for this example
    }
    

Important Considerations

Troubleshooting and FAQs

Common Issues

  1. The OLED does not turn on:

    • Verify the wiring connections, especially GND and VCC.
    • Ensure the power supply voltage is within the specified range (3.3V to 5V).
    • Check if the I2C address in the code matches the OLED's default address (0x3C).
  2. The display shows random or garbled characters:

    • Ensure the I2C connections (SCL and SDA) are secure.
    • Verify that the correct libraries ("Adafruit SSD1306" and "Adafruit GFX") are installed.
    • Check for loose or damaged wires.
  3. The text or graphics are not visible:

    • Confirm that the display.display() function is called after rendering text or graphics.
    • Adjust the contrast settings in the code if necessary.

FAQs

Q: Can the Yuri OLED be used with 3.3V microcontrollers like ESP32?
A: Yes, the OLED is compatible with 3.3V microcontrollers. Connect the VCC pin to the 3.3V output of the microcontroller.

Q: How can I display custom graphics on the OLED?
A: Use the "Adafruit GFX" library to draw shapes, lines, and bitmaps. Refer to the library documentation for detailed instructions.

Q: What is the lifespan of the Yuri OLED?
A: The typical lifespan of the OLED is around 30,000 to 50,000 hours, depending on usage and brightness settings.

Q: Can I use the OLED with SPI instead of I2C?
A: The Yuri OLED (Part ID: OOH) is designed specifically for I2C communication. For SPI support, consider other OLED models.

By following this documentation, users can effectively integrate the Yuri OLED into their projects and troubleshoot common issues with ease.