OLED Display 128*64 I2C not working despite all measures taken

I recently bought an OLED display on amazon. i cross-checked my connections a lot and they are correct(I am using Arduino UNO). The display receives power and seems to work fine and i also managed to find the address to be 0x3c. However, when I upload the default test code from the library I do not get any output in my display. I tried using SSD1306 and SH110X libraries but both produced no results. at one point I simply connected the SCL and SDA pins to the digital RX and TX pins of the UNO and the display lit up with some random pattern. I have attached that image here.
I have also attached the pictures of the OLED display in this post. Please help me figure out what the issue could possibly be. Thanks!
Amazon link: https://www.amazon.in/gp/product/B07W889XZ4/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1


Display not working

Rear of Display

Front of Display

Display under light. the line that runs horizontally through the display separates the yellow and blue light segments

Random pattern when SDA is connected to TX pin

How did you get that last picture ?
The top is the Adafruit logo, which is send from the Arduino to the OLED display.
You can see the logo here: https://www.adafruit.com/product/326

I don't have any clue how it was displayed. However I suspect the Adafruit logo was displayed because I used the Adafruit library. This random image was printed only when I randomly tried connecting the SDA pin to TX instead of A5 on the UNO board.

I think that the picture was uploaded to the OLED display and stayed in the OLED memory and some random code turned the display on.
That means your display works 99% with the Adafruit library, but is not fully compatible.

If you can not find someone else with the same problem, then I see no other option than to buy a new (more compatible) display.

Is there any idea as to how i can actually make this work? I dont really want to buy another new display because i know this display is still jus a little work away from actually functioning properly.

The OLED displays designed for use on 5V Arduinos normally have a regulator on the back.

I see no regulator.

So maybe its a 3.3V only display ?

1 Like

tried it, didnt work :confused:

And whilst you have said 'despite all measures taken', did you run an I2C scanner sketch to see if the display is found on the I2C bus ?

yes i did, and the address was 0x3C

What level shifter did you use?

im sorry i do not understand. whats a level shifter?

i first tried powering the display with the 3.3V pin in the UNO and running the code, and then tried 5V, but both didnt work. however, with both voltage levels, i managed to get that same random pattern

To use 3.3V devices from 5V devices you need some measure to lower the 5V to 3.3V,
and to raise the level from 3.3V to 5V.

Often the 3.3V level is enough to be recognized by the 5V device,
but you will lose error margin, which could impact communication.

The 5V to 3.3V conversion is always needed,
or you will damage the 3.3V device, at least on the long run
(there are 5V tolerant 3.3V chips, but the LED controller is not one of them).

For unidirectional full driven data lines, you can use a voltage divider from 5V to 3.3V.

You are dealing with I2C which is bidirectional and uses pull ups to assert HIGH levels,
so you need special equipment, there are converters using a single MOSFET,
or conversion chips.

I prefer the bigger ones, they are usable for SPI also,
and with the smaller ones I'm always confused how to connect them.

small

big

ah thank you that makes sense. i noticed there is no voltage regulator in my oled display. however this display is rated to run between 3.3 to 5v without any issues so would that really be an issue?

Where?

From Adafruits site:

The OLED itself requires a 3.3V power supply and 3.3V logic levels for communication,
but we include a 3.3V regulator and all pins are fully level shifted so you can use with 3V or 5V devices!

Does it work like you are using it now, ignoring the 3.3V property of the OLED?

yes the display still works with the 5V supply. and my oled display is the 0.96 inch version.

With "works", you mean it has not (yet) expelled magic smoke?

And this is from Adafruits .96" module

The design is completely 5V-ready, with an onboard regulator and built-in boost converter.
It's easier than ever to connect directly to your 3V or 5V microcontroller without needing any kind of level shifter!

But I get it, you don't want to hear the message.

Good luck with your project.

no it has not expelled any magic smoke :joy:
do check out the amazon link for the display. it is mentioned that the display is capable of handling 5V

I would never trust Amazon or Ebay Sellers. They deal in Lingerie and Snake Oil.

Just connect 3.3V, GND, SDA, SCL.
Install Adafruit_SSD1306 via IDE Library Manager.

Edit the example code for Slave address = 0x3C
Run the example code.

David.

hi, i did try that. i also changed the reset pin to -1 and did everything else possible, but it didnt work.
you can verify the changes if you wish to.
ssd1306_128x64_i2c.ino (12.1 KB)