I’m currently working on new project based on 3.3V / 8 MHz Arduino Pro Mini (Atmega 328P-AU) with 0.9" 128x32 I2C OLED display.
I got a weird problem with the display which randomly turns OFF by itself.
Sometime it takes only few seconds before it happens, but sometime display stays ON for many hours.
I’m using U8Glib Arduino OLED library (U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // I2C / TWI)
The problem persists, no matter which sketch I use: custom sketch, “Hello Word” or “graphics test” sketch.
I have already tried to solder other OLED displays (3 pcs) but in vain.
In fact, sometime after re-soldering new display it stays ON for few hours, and then suddenly turns OFF and after that displays turns OFF very offten and after few seconds/minutes.
Here attached you can find OLED PCB’s schematic.
OLED is on small breakout PCB and attached to following Atmega 328P-AU pins:
- Regulated +3.3V (XC6206 regulator)
- SCL (A5)
- SDA (A4)
In my previous projects, I have used similar schematic but with on-PCB 3.3V voltage regulator, without any problem.
I cant figure out were that problem with random turns OFF is coming from.
Any help will be appreciated.
I forgot to say, that the only way to turn the display ON, after it's been turned OFF, is to reset (or power OFF and then ON) Adruino.
The schematic on page 5 of the datasheet shows much more components. My suggestion is to build exactly according to the schematic of the datasheet.
first off all, I would like to thank you for your great library.
It's a fantastic masterpiece of coding.
Secondly, I would like to think you for the support that you providing. I really appreciate that.
I have already found the problem 8) with by board.
It was missing PCB's track between R1 and OLED's RES# pin.
I soldered a "wire track" and it works now. No more random turns OFF.
As you have mentioned, it is true, that I have used a strict minimum of components, and I probably will add 2 additional 1uF and0.1uF capacitors to VBREF and VDD pins, because despite the fact that OLED works now, I found that it works little bit slow (slow refresh rate) with "U8G_I2C_OPT_NONE"
And when I tried "U8G_I2C_OPT_DEV_0|U8G_I2C_OPT_NO_ACK|U8G_I2C_OPT_FAST" options, it works 2 times slower, when it's supposed to work at full I2C speed.
I have another OLED break board which looks similar to Adafruit 128x32 OLED board, with more components and logic level shifters, and this board works faster with "fast I2C" option enabled.
Do you think it may be because of the logic level shifters ?
If you observe a difference with the "FAST" option, it might also be because of the microcontroller. The fast option may behave differently on various different uC systems. But in general i would say, it should not depend on the logic shifter.