November 19, 2019

OLED Display Interface with Arduino

In this post, we are going to discuss OLED display interfacing with Arduino as it is very important to interfacing with an output device to view the output from a controller.

Components Required:
1. Arduino Uno
2. OLED Display ( 0.96" )
3. Bread Board ( not necessary )
4. Jumper Wires
5. Data Cables

What is OLED Display?
An organic light-emitting diode (OLED or Organic LED), also known as an organic EL (organic electroluminescent) diode, is a light-emitting diode (LED) in which the emissive electroluminescent layer is a film of organic compound that emits light in response to an electric current. This organic layer is situated between two electrodes; typically, at least one of these electrodes is transparent. OLEDs are used to create digital displays in devices such as television screens, computer monitors, portable systems such as smartphoneshandheld game consoles, and PDAs.
An OLED display works without a backlight because it emits visible light. Thus, it can display deep black levels and can be thinner and lighter than a liquid crystal display (LCD). In low ambient light conditions (such as a darkroom), an OLED screen can achieve a higher contrast ratio than an LCD, regardless of whether the LCD uses cold cathode fluorescent lamps or an LED backlight.

Pinout:

    • VCC: OLED Display runs on 3.3V. It can be powered by Arduino UNO but an external power supply is safe.
    • GND: Goes to any ground pin.
    • SDA: Serial Data pin transmits the data ar receives the data.
    • SCL: Serial Clock pin in I2C communication usually sends the clock pulse.
How To Interface?
Arduino has SDA and SCL pin inbuilt, for the I2C device interface externally. Arduino Pin A4 and A5 are used for I2C where A4 SDA is A5 is SCL. Just connect the pin accordingly and upload the code in the Arduino.

Arduino Pin     OLED Pin
3.3V  -------------- VCC
GND -------------- GND
A5 ----------------- SCL
A4 ----------------- SDA

Be careful! do the wiring accordingly, double-check the wiring before powering the circuit and watch the video link below to get an idea about the project.

          Now here is a twist. Using I2C Communication we could connect more than one device using only those two ( SDA, SCL ) wires, now How the controller supposed to know from which device it is getting a data or How the device supposed to know which data to pick up. Here comes the address of devices. Each and every device comes with a unique address. 
          To interface the OLED Display you have to find its address and send the data to that address so that the display picks up that data.
          To find the address of the Display upload the code below. Once you get the address copy the address and put it in the main code and you are ready.


OLED Display Library:
Before you upload the code library needs to be installed. Please follow the below mention instruction to install the library.
https://creativestudio1973.blogspot.com/2019/11/introduction-to-arduino-library-manager.html

Software:
  1. For finding the I2C address:
  2. Main Code:

Video Example:



No comments:

Post a Comment