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

How to Use Diyuser 1.3 Oled SH1106: Examples, Pinouts, and Specs

Image of Diyuser 1.3 Oled SH1106Design with Diyuser 1.3 Oled SH1106 in Cirkit Designer

Introduction

The Diyuser 1.3 Oled SH1106 is a 1.3-inch OLED display module manufactured by Arduino, featuring the SH1106 driver. This display is known for its high contrast, low power consumption, and wide viewing angles, making it an excellent choice for a variety of DIY electronics projects. It communicates via the I2C protocol, which simplifies wiring and integration with microcontrollers like the Arduino UNO.

Explore Projects Built with Diyuser 1.3 Oled SH1106

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 ESP8266 NodeMCU Controlled OLED Display: A project utilizing Diyuser 1.3 Oled SH1106 in a practical application
ESP8266 NodeMCU Controlled OLED Display

This circuit connects an ESP8266 NodeMCU microcontroller to a 1.3" OLED display. The ESP8266's D1 and D2 pins are used for the SCL and SDA I2C communication lines, respectively, to interface with the OLED. The circuit is designed to display information or graphics on the OLED screen, controlled by the ESP8266.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The Diyuser 1.3 Oled SH1106 module has a 4-pin interface for I2C communication. Below is the pinout:

Pin Name Description
1 GND Ground pin. Connect to the ground of the circuit.
2 VCC Power supply pin. Connect to 3.3V or 5V.
3 SCL I2C clock line. Connect to the SCL pin of MCU.
4 SDA I2C data line. Connect to the SDA pin of MCU.

Usage Instructions

How to Use the Component in a Circuit

  1. Wiring the Display:

    • Connect the GND pin of the display to the ground (GND) of your microcontroller.
    • Connect the VCC pin to a 3.3V or 5V power source, depending on your microcontroller's voltage.
    • Connect the SCL pin to the I2C clock line (e.g., A5 on Arduino UNO).
    • Connect the SDA pin to the I2C data line (e.g., A4 on Arduino UNO).
  2. Install Required Libraries:

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

    • Below is a sample code snippet to display "Hello, World!" on the screen:
#include <Adafruit_GFX.h>       // Graphics library for OLED
#include <Adafruit_SH1106.h>    // SH1106 driver library

#define OLED_RESET -1           // Reset pin not used
Adafruit_SH1106 display(OLED_RESET);

void setup() {
  display.begin(SH1106_I2C_ADDRESS, 0x3C); // Initialize display with I2C address
  display.clearDisplay();                 // Clear the display buffer
  display.setTextSize(1);                 // Set text size to 1 (smallest)
  display.setTextColor(WHITE);            // Set text color to white
  display.setCursor(0, 0);                // Set cursor to top-left corner
  display.println("Hello, World!");       // Print text to display buffer
  display.display();                      // Send buffer to display
}

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

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues and Solutions

  1. Display Not Turning On:

    • Verify the wiring connections, especially GND and VCC.
    • Ensure the power supply voltage is within the specified range (3.3V to 5V).
  2. No Output on the Screen:

    • Check the I2C address in the code. Use an I2C scanner sketch to confirm the address.
    • Ensure the Adafruit_GFX and Adafruit_SH1106 libraries are correctly installed.
  3. Flickering or Unstable Display:

    • Add decoupling capacitors (e.g., 0.1µF) near the power pins to stabilize the voltage.
    • Check for loose connections or poor soldering.
  4. Text or Graphics Not Displaying Properly:

    • Ensure the correct resolution (128x64) is set in the library or code.
    • Clear the display buffer (display.clearDisplay()) before updating the screen.

FAQs

Q: Can I use this display with a 3.3V microcontroller like ESP32?
A: Yes, the display is compatible with both 3.3V and 5V systems.

Q: What is the maximum cable length for I2C communication?
A: The I2C protocol is designed for short distances, typically less than 1 meter. For longer distances, use lower clock speeds or I2C extenders.

Q: Can I use this display with SPI instead of I2C?
A: No, this module is designed specifically for I2C communication.

Q: How do I display custom graphics?
A: Use the Adafruit_GFX library to draw shapes, bitmaps, or custom graphics. Refer to the library documentation for examples.

By following this documentation, you can effectively integrate the Diyuser 1.3 Oled SH1106 into your projects and troubleshoot common issues.