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

The Midas MDOB128064BV-WS is a high-quality Organic Light Emitting Diode (OLED) display module. 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 MDOB128064BV-WS is a 128x64 pixel monochrome display, ideal for applications requiring clear and sharp visuals in a compact form factor.

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

  • Wearable devices
  • Industrial control panels
  • Consumer electronics (e.g., smart home devices)
  • Medical equipment
  • Prototyping with microcontrollers (e.g., Arduino, Raspberry Pi)

Technical Specifications

The following table outlines the key technical details of the MDOB128064BV-WS OLED display:

Parameter Value
Display Type Monochrome OLED
Resolution 128 x 64 pixels
Active Area 26.42mm x 14.70mm
Interface SPI / I2C
Operating Voltage 3.3V - 5V
Operating Temperature -40°C to +80°C
Dimensions 27.3mm x 27.3mm x 1.65mm
Manufacturer Part ID MDOB128064BV-WS

Pin Configuration

The MDOB128064BV-WS has a standard pinout for SPI/I2C communication. Below is the pin configuration:

SPI Mode Pinout

Pin Name Description
1 GND Ground (0V reference)
2 VCC Power supply (3.3V or 5V)
3 SCL Serial Clock Line (SPI Clock)
4 SDA Serial Data Line (SPI MOSI)
5 RES Reset pin (active low)
6 DC Data/Command control pin
7 CS Chip Select (active low)

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)
5 RES Reset pin (active low)
6 DC Data/Command control pin (optional)
7 NC Not connected

Usage Instructions

Connecting the OLED to an Arduino UNO

The MDOB128064BV-WS can be easily interfaced with an Arduino UNO using either SPI or I2C communication. Below is an example of how to connect the OLED in I2C mode:

Wiring Diagram (I2C Mode)

OLED Pin Arduino Pin
GND GND
VCC 5V
SCL A5 (SCL)
SDA A4 (SDA)
RES Digital Pin 8

Example Code

The following Arduino sketch demonstrates how to initialize and display text on the OLED using the Adafruit SSD1306 library:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// Define OLED display dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

// Create an instance of the SSD1306 display object
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(9600);

  // Initialize the OLED display
  if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Halt execution if initialization fails
  }

  // Clear the display buffer
  display.clearDisplay();

  // Set text size and color
  display.setTextSize(1); // Small text size
  display.setTextColor(SSD1306_WHITE);

  // Display a message
  display.setCursor(0, 0); // Set cursor to top-left corner
  display.println(F("Hello, OLED!"));
  display.display(); // Render the text on the screen
}

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

Important Considerations

  1. Power Supply: Ensure the OLED is powered within its operating voltage range (3.3V to 5V).
  2. Library Compatibility: Use the Adafruit SSD1306 and GFX libraries for seamless integration.
  3. Reset Pin: Connect the RES pin to a digital pin on the microcontroller for proper initialization.
  4. Pull-up Resistors: For I2C communication, ensure pull-up resistors (typically 4.7kΩ) are present on the SCL and SDA lines.

Troubleshooting and FAQs

Common Issues

  1. Display Not Turning On

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check the connections and ensure the power supply is stable.
  2. Garbage Data on Screen

    • Cause: Incorrect communication protocol or address.
    • Solution: Verify the I2C address (default is 0x3C) and ensure the correct protocol is selected.
  3. Flickering Display

    • Cause: Insufficient current supply or loose connections.
    • Solution: Use a stable power source and secure all connections.
  4. Library Initialization Fails

    • Cause: Missing or outdated libraries.
    • Solution: Install the latest Adafruit SSD1306 and GFX libraries via the Arduino Library Manager.

FAQs

  1. Can I use the OLED with a 3.3V microcontroller?

    • Yes, the MDOB128064BV-WS is compatible with both 3.3V and 5V logic levels.
  2. What is the default I2C address of the OLED?

    • The default I2C address is 0x3C.
  3. Can I use SPI and I2C simultaneously?

    • No, the OLED operates in either SPI or I2C mode, but not both at the same time.
  4. How do I change the I2C address?

    • The I2C address is fixed and cannot be changed for this module.

By following this documentation, users can effectively integrate the Midas MDOB128064BV-WS OLED display into their projects for high-quality visual output.