Electronics

OLED 0.96 Inch 128x64 I2C SSD1306 Display Module White

Out Of Stock

1

Description

The OLED display module offers a combination of high-quality visual output in size of 0.96 Inch 128x64, ease of integration, and efficient communication with I2C protocol, making it a popular choice among electronics enthusiasts and professionals alike.

 

Package Includes:

  • 1x OLED 0.96 Inch 128x64 I2C SSD1306 Display Module White

 

Features:

  • Display Technology: The module utilizes OLED (Organic Light-Emitting Diode) technology, which provides vibrant colors, high contrast, and wide viewing angles. OLED technology allows for individual pixels to emit light, resulting in deep blacks and excellent color reproduction.
  • Display Size and Resolution: The module has a compact 0.96-inch display area with a resolution of 128x64 pixels. This resolution ensures clear and sharp visuals, allowing for the display of text, graphics, icons, and simple animations.
  • I2C Interface: The module supports the I2C (Inter-Integrated Circuit) communication protocol. This two-wire serial interface enables easy and convenient interfacing with microcontrollers and other devices. The I2C interface simplifies wiring and facilitates efficient data transfer between the display module and the controller.
  • SSD1306 Driver Chip: The display module is equipped with the SSD1306 driver chip, which controls the display and provides a user-friendly interface. The SSD1306 chip offers various functions such as text and graphic rendering, scrolling, and animation capabilities.
  • White Display Color: This particular module features a white display color, which provides a crisp and clear visual output with good contrast against the background.
  • Low Power Consumption: The SSD1306 driver chip used in this module is designed to be energy-efficient, contributing to low power consumption. This makes it suitable for battery-powered devices and helps prolong battery life.
  • Compact Size: The module has a compact form factor, making it suitable for projects with limited space requirements. Its small size allows for easy integration onto a PCB or within a custom enclosure.
  • Versatile Applications: The OLED 0.96 Inch 128x64 I2C SSD1306 Display Module White finds applications in various electronic projects, including wearable devices, IoT projects, digital meters, information displays, and more. Its versatility and ease of use make it a popular choice among hobbyists and professionals alike.

 

Description:

The OLED 0.96 Inch 128x64 I2C SSD1306 Display Module White is a compact and versatile display module that utilizes OLED (Organic Light-Emitting Diode) technology. It features a 0.96-inch display area with a resolution of 128x64 pixels, allowing for clear and sharp visual output. The module is designed to be easily integrated into various electronic projects, offering a white-colored display that provides excellent contrast and visibility. The OLED technology used in this module ensures vibrant colors, deep blacks, and wide viewing angles, making it suitable for a wide range of applications. One of the notable features of this module is its support for I2C (Inter-Integrated Circuit) communication protocol. This allows for easy and convenient interfacing with microcontrollers and other devices using a two-wire serial interface. The I2C interface simplifies the wiring and enables efficient data transfer, reducing the complexity of the overall system. The SSD1306 driver chip is responsible for controlling the display module and providing a user-friendly interface. It supports various functions such as displaying text, graphics, and icons, as well as scrolling and animation capabilities. The SSD1306 chip also offers low power consumption, making it energy-efficient for battery-powered devices. The compact size of the OLED 0.96 Inch 128x64 I2C SSD1306 Display Module White makes it ideal for projects with limited space requirements. It can be easily mounted on a PCB or integrated into a custom enclosure. The module is commonly used in applications such as wearable devices, IoT (Internet of Things) projects, digital meters, small information displays, and more.

 

Principle of Work:

the OLED 0.96 Inch 128x64 I2C SSD1306 Display Module utilizes an OLED array, controlled by the SSD1306 controller chip, and communicates with a microcontroller using the I2C protocol to display content and refresh the image on the screen:

  1. Display Structure: The OLED display consists of organic light-emitting diodes (OLEDs) arranged in an array. Each OLED acts as a pixel and emits light when an electric current is applied.
  2. SSD1306 Controller: The display module is equipped with an SSD1306 controller chip, which controls the operation of the OLED display. It handles tasks such as refreshing the display, accepting data, and executing commands.
  3. Communication with Microcontroller: The display module uses the I2C protocol to communicate with a microcontroller. I2C is a serial communication protocol that enables devices to exchange data over a shared bus. The SSD1306 display module has built-in I2C hardware that simplifies the communication process.
  4. I2C Protocol: The microcontroller and the SSD1306 display module communicate through I2C by sending and receiving data in a structured format. The microcontroller acts as the master device, while the display module is the slave device.
  5. Initialization: To use the OLED display, the microcontroller sends initialization commands to the SSD1306 controller. These commands configure the display settings, such as contrast, brightness, and addressing mode.
  6. Displaying Content: Once initialized, the microcontroller can send data or commands to the display module. Data can include pixel values for each OLED in the display, while commands control operations like turning pixels on/off, scrolling, or setting the cursor position.
  7. Display Refresh: The SSD1306 controller continuously refreshes the display by scanning through the pixel data and activating the corresponding OLEDs to emit light. This process happens rapidly to create a stable and persistent image on the OLED display.

 

Pinout of the Module:

  • Vin: This pin should be connected to the 5V pin on the Arduino Uno to provide power to the display module.
  • GND: Connect this pin to the ground (GND) pin on the Arduino Uno to establish a common reference voltage.
  • SCL: This pin is used for I2C communication and should be connected to the SCL pin (usually A5) on the Arduino Uno.
  • SDA: This pin is also used for I2C communication and should be connected to the SDA pin (usually A4) on the Arduino Uno.

 

Applications:

  1. Wearable Devices: This OLED display's compact size and low power consumption make it suitable for wearable devices such as smartwatches, fitness trackers, and health monitoring devices.
  2. IoT (Internet of Things) Devices: The display can be integrated into IoT devices, providing visual feedback or status information for smart home automation, weather stations, environmental sensors, and other connected devices.
  3. Prototyping and DIY Projects: This display module is often used in hobbyist projects, maker projects, and prototyping activities to provide a visual interface for user interaction, sensor data display, or system status feedback.
  4. Embedded Systems: The display can be used in various embedded systems, including handheld devices, measurement instruments, control panels, and industrial automation systems, where a compact display is required to present data or control information.
  5. Educational Tools: The OLED display can serve as a valuable educational tool for learning about microcontrollers, programming, and electronics. It can be used to display sensor readings, create simple games, or showcase graphical user interfaces.
  6. Instrumentation and Test Equipment: The high contrast and resolution of the display make it suitable for displaying data and measurement readings in instrumentation and test equipment, such as multimeters, oscilloscopes, and signal analyzers.
  7. Consumer Electronics: The OLED display can be found in various consumer electronic devices like digital cameras, MP3 players, portable media players, and small handheld devices where a compact and visually appealing display is required.

 

Circuit:

the connections for the OLED 0.96 Inch 128x64 I2C SSD1306 Display Module to different Arduino boards:

For Arduino Uno:

  • Vin: Connect to 5V
  • GND: Connect to GND
  • SCL: Connect to A5
  • SDA: Connect to A4

For other Arduino boards:

  • Arduino Nano:

    • SDA: Connect to A4
    • SCL: Connect to A5
  • Arduino Mega:

    • SDA: Connect to 20
    • SCL: Connect to 21
  • Arduino Leonardo:

    • SDA: Connect to 20
    • SCL: Connect to 21

 

Library:

To install the Adafruit GFX and Adafruit SSD1306 libraries in the Arduino IDE, follow these steps:

  1. Open the Arduino IDE on your computer.
  2. Go to "Sketch" in the top menu and navigate to "Include Library" > "Manage Libraries".
  3. The Library Manager window will open, showing a list of available libraries.
  4. In the search bar, type "Adafruit GFX" and press Enter. The Adafruit GFX library should appear in the search results.
  5. Click on the Adafruit GFX library in the search results.
  6. Click the "Install" button to install the library.
  7. Wait for the installation process to complete. You will see a green checkmark when it's finished.
  8. Repeat steps 4-7 to install the Adafruit SSD1306 library. In the Library Manager, search for "Adafruit SSD1306" and install the library.

Once the installation is complete, the Adafruit GFX and Adafruit SSD1306 libraries will be available for use in your Arduino sketches. You can include them in your code by going to "Sketch" > "Include Library" and selecting the respective libraries from the list.

Note: Make sure you have an active internet connection while installing libraries from the Library Manager.

 

Code:

In the next code, you need to adjust the OLED_ADDR variable if your display has a different I2C address, you can use an I2C scanner code to identify the correct address. Here's an I2C scanner code that scans for available I2C devices and displays their addresses in the Serial Monitor just install connect the display and open the serial monitor to get the code and if its different than the code next to the OLED_ADDR :

 

#include "Wire.h"

void setup() {
  Wire.begin();

  Serial.begin(9600);
  while (!Serial);

  Serial.println("\nI2C Scanner");
}

void loop() {
  byte error, address;
  int deviceCount = 0;

  Serial.println("Scanning...");

  for (address = 1; address < 127; address++) {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("Device found at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.print(address, HEX);
      Serial.println(" !");
      deviceCount++;
    }
    else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.println(address, HEX);
    }
  }

  if (deviceCount == 0) {
    Serial.println("No I2C devices found.\n");
  }
  else {
    Serial.println("Scanning complete.\n");
  }

  delay(5000);
}

A sample code that demonstrates how to use the OLED 0.96 Inch 128x64 I2C SSD1306 Display Module with an Arduino Uno. This code assumes that you have already installed the appropriate library for the SSD1306 display.

#include "Wire.h"  // Library for I2C communication
#include "Adafruit_GFX.h"  // Library for graphics
#include "Adafruit_SSD1306.h"  // Library for SSD1306 OLED display

// Define the OLED display object
#define OLED_ADDR 0x3C  // I2C address of the display
Adafruit_SSD1306 display(128, 64, &Wire, -1);  // Create a display object

void setup() {
  // Initialize the I2C communication
  Wire.begin();

  // Initialize the display
  display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
  display.clearDisplay();

  // Optional: Uncomment the following line to set display contrast
  // display.setContrast(255);

  // Print text on the display
  display.setTextSize(1);  // Set text size (1-6)
  display.setCursor(0, 0);  // Set text position
  display.println("Hello, World!");

  // Display the content
  display.display();
}

void loop() {
  // Your code here (if needed)
}

  1. It includes the necessary libraries: Wire.h for I2C communication, Adafruit_GFX.h for graphics, and Adafruit_SSD1306.h for the SSD1306 OLED display.

  2. The code defines the I2C address of the display as OLED_ADDR (in this case, it's set to 0x3C).

  3. An Adafruit_SSD1306 object called display is created with a display size of 128x64 pixels, using the I2C communication via the Wire library.

  4. In the setup() function:

    • The I2C communication is initialized with Wire.begin().
    • The display is initialized with display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR).
    • The display is cleared with display.clearDisplay().
    • (Optional) You can uncomment the line display.setContrast(255) to set the display contrast to maximum.
    • The text settings are configured: text size is set to 1 (1-6 range) with display.setTextSize(1), and the text color is set to white with display.setTextColor(WHITE).
    • The text cursor is set to position (0, 0) on the display using display.setCursor(0, 0).
    • The text "Hello, World!" is printed on the display using display.println("Hello, World!").
    • The content is displayed on the OLED screen using display.display().
  5. The loop() function is left empty, but you can add your own code here if needed.

 

Technical Details:

  • Display Technology: OLED (Organic LED) technology is used in this display module. OLEDs provide vibrant colors, high contrast, and fast response times.
  • MCU Interface: The display module can be controlled using either the I2C (Inter-Integrated Circuit) or SPI (Serial Peripheral Interface) interface protocols, offering flexibility in communication with microcontrollers.
  • Screen Size: The display has a compact size of 0.96 inches diagonally, making it suitable for applications where space is limited.
  • Resolution: With a resolution of 128×64 pixels, the display offers a clear and detailed image representation.
  • Operating Voltage: The display can operate within a voltage range of 3.3V to 5V, allowing compatibility with a wide range of microcontrollers and systems.
  • Operating Current: The maximum operating current for the display module is 20mA, ensuring efficient power consumption.
  • Viewing Angle: The display provides a wide viewing angle of 160°, allowing the content to be easily seen from different orientations and positions.
  • Characters Per Row: Each row of the display can accommodate up to 21 characters, enabling the display of longer text or information in a single line.
  • Number of Character Rows: The display supports a total of 7 rows, offering ample space to display multiple lines of text or graphical content.

 

Resources:

 

Comparisons:

The OLED 0.96 Inch 128x64 I2C SSD1306 Display Module and the OLED 0.96 Inch 128x64 SPI Display Module are both OLED displays with the same physical dimensions and resolution. However, they differ in terms of their communication interface:

OLED 0.96 Inch 128x64 I2C SSD1306 Display Module:

  • Communication Interface: I2C (Inter-Integrated Circuit)
  • Wiring: It requires only two wires (SCL and SDA) for communication with the microcontroller.
  • Advantages:
    • Simple wiring and fewer pins are required.
    • Commonly supported by various microcontrollers and development boards.
    • Suitable for projects with limited available pins or when simplicity is preferred.
  • Disadvantages:
    • Slower data transfer speed compared to SPI.
    • May require additional I2C address configuration if multiple I2C devices are used.

OLED 0.96 Inch 128x64 SPI Display Module:

  • Communication Interface: SPI (Serial Peripheral Interface)
  • Wiring: It requires four wires (SCK, MOSI, CS, DC) for communication with the microcontroller.
  • Advantages:
    • Faster data transfer speed compared to I2C.
    • No address conflicts when using multiple SPI devices.
  • Disadvantages:
    • More pins required, which can be a limitation in projects with limited available pins.
    • Requires additional CS (Chip Select) and DC (Data/Command) pins.