0

2.7'' OLED Display graphics corrupted
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

2.7'' OLED Display graphics corrupted

by luopio on Sat Feb 10, 2018 5:39 pm

Hi,

we've bought the 2.7 inch Monochrome OLED display module that comes with the logic level converted, capacitor and headers. The display is connected and shows the start screen correctly but after a few draws the graphics become corrupted and eventually the screen goes black.

The example given in the Adafruit GFX-library doesn't really manage to show anything properly.

A simple sketch that shows a HELLO text that moves a few pixels down and goes back up runs for a about half a minute before failing. Here's a video displaying the process https://drive.google.com/file/d/1Agr4cc ... sp=sharing

We've switched Arduinos, checked the connections and changed all the wiring, but the problem persists. Any ideas? Someone on youtube said it's the CD4050 logic level shifter instead of HC4050 (we have the "wrong" CD4050) https://www.youtube.com/watch?v=1YLhLW4J9rY. Can it be that? Thanks in advance.

luopio
 
Posts: 7
Joined: Wed Nov 07, 2012 10:12 am

Re: 2.7'' OLED Display graphics corrupted

by adafruit_support_bill on Sun Feb 11, 2018 6:58 am

What processor are you using?
How are you powering the screen?

adafruit_support_bill
 
Posts: 67258
Joined: Sat Feb 07, 2009 10:11 am

Re: 2.7'' OLED Display graphics corrupted

by luopio on Tue Feb 13, 2018 4:55 am

We're using Arduino Uno connected to a laptop via USB (laptop connected to power).

Screen receives power through the Arduino pins as suggested in the tutorial.

luopio
 
Posts: 7
Joined: Wed Nov 07, 2012 10:12 am

Re: 2.7'' OLED Display graphics corrupted

by adafruit_support_bill on Tue Feb 13, 2018 7:27 am

So it is not likely a power issue. I'll check into the level shifter theory.

adafruit_support_bill
 
Posts: 67258
Joined: Sat Feb 07, 2009 10:11 am

Re: 2.7'' OLED Display graphics corrupted

by adafruit2 on Tue Feb 13, 2018 12:28 pm

the level shifter is the same chip. its been a while but i vaguely recall that could happen if you have long wires or too fast update speed. try shortening the wires, or dropping the SPI speed down

adafruit2
Site Admin
 
Posts: 16406
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.7'' OLED Display graphics corrupted

by adafruit_support_mike on Tue Feb 13, 2018 5:56 pm

The HEF logic family is a little faster than the CD family.

The CD family usually operates at 1MHz, and has a maximum frequency of about 5MHz when running from a 5V supply. The HEF family goes up to about 15MHz.

The Arduino's SPI bus operates at 8MHz, which is a little fast for CD logic. I wouldn't be surprised to see glitching or bit errors at that speed. Try dropping the SPI to 4MHz and see if that helps.

adafruit_support_mike
 
Posts: 50680
Joined: Thu Feb 11, 2010 2:51 pm

Re: 2.7'' OLED Display graphics corrupted

by luopio on Thu Feb 22, 2018 3:56 am

Thanks for all the assistance and sorry for the late reply.

Seems like the Adafruit_SSD1325 library already had 4MHz as default. I tried lowering to 1.5 and 1MHz but the results are the same:

Code: Select all | TOGGLE FULL SIZE
#ifdef SPI_HAS_TRANSACTION
// SPISettings oledspi = SPISettings(4000000, MSBFIRST, SPI_MODE0);
SPISettings oledspi = SPISettings(1000000, MSBFIRST, SPI_MODE0);
#else
#define ADAFRUIT_SSD1325_SPI SPI_CLOCK_DIV2
#endif


Also tried using an external power supply delivering 12V (1000ma), but that didn't change anything either.

luopio
 
Posts: 7
Joined: Wed Nov 07, 2012 10:12 am

Re: 2.7'' OLED Display graphics corrupted

by adafruit2 on Thu Feb 22, 2018 3:22 pm

hrmmm.
1) try adding some capacitance to the 3.3V+GND power supply, maybe 100uF if you have anything handy
2) do you mind trying I2C?

adafruit2
Site Admin
 
Posts: 16406
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.7'' OLED Display graphics corrupted

by luopio on Tue Feb 27, 2018 5:06 am

Didn't have a 100uF handy, but I threw in 5 x 10uF in parallel (in addition to the 220uF included). Also tried swapping all of them for one 1000uF. Neither really produced any good results. Same corruption happening.

2) I2C would be the 8bit option on the display? Any instructions for this?

luopio
 
Posts: 7
Joined: Wed Nov 07, 2012 10:12 am

Re: 2.7'' OLED Display graphics corrupted

by adafruit2 on Tue Feb 27, 2018 9:19 am

oh shoot, yeah this one does not have I2C. forgot, that's just the smaller one.
Well, before we replace it, might as well try wiring w/o the level shifter, it can't harm the arduino and at least we'll know :) still power the OLED from 3.3V but use the logic wiring direct from the duino w/o the 4050!

adafruit2
Site Admin
 
Posts: 16406
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.7'' OLED Display graphics corrupted

by luopio on Wed Feb 28, 2018 4:21 am

Thanks for the advice. I'll try that. We also ordered a few HC-shifters from China while ordering other stuff so we'll try if swapping the CD-shifter for a HC will help.

luopio
 
Posts: 7
Joined: Wed Nov 07, 2012 10:12 am

Please be positive and constructive with your questions and comments.