corrupted display - signal noise?

128x128 pixel 1.5" full colour OLED display with MicroSD card slot. [Product page]
Post Reply
nickwest
Posts: 9
Joined: Sun Oct 28, 2012 10:20 pm

corrupted display - signal noise?

Post by nickwest » Thu Sep 15, 2016 1:40 pm

Hi all,

I see these bands of coloured "static" at the tops of my images when I display .BMPs. I'm updating the display about every second or so, and the first few updates are fine, then the noise appears, then a couple of frames later the arduino+screen hangs on the noisy image and has to be reset.

Right now I have the OLED connected to a shield by short (5cm) wires, using a Freetronics "Eleven" board (Arduino Uno compatible). Arduino IDE 1:1.0.5 IDE running under Linux mint.

I do plan to do away with the wires all together and make a little custom shield.... but before I commit to that I would like to be sure that cable noise really IS the problem!

Has anyone seen similar glitches before? I thought about using inline resistors (let's say 1K ohm) in each of the signal wires - could this help? Other threads have mentioned grounding pin 4 of the OLED display which doesn't seem to make a difference either way in my case.

Thanks for the help and let me know if you need any more information.
Attachments
[2016-09-15]_screen_noise_web.jpg

nickwest
Posts: 9
Joined: Sun Oct 28, 2012 10:20 pm

Re: corrupted display - signal noise?

Post by nickwest » Thu Oct 06, 2016 9:03 pm

Nobody has ever seen this problem before? Any suggestions?

I can't see any pattern to the issue - the number of frames I get before the image corruption and eventual freezing doesn't seem consistent. I'll try sending simple data straight from the arduino to the screen, to see if taking the SD card right out of the picture can solve the problem...

nickwest
Posts: 9
Joined: Sun Oct 28, 2012 10:20 pm

Re: corrupted display - signal noise?

Post by nickwest » Sat Dec 10, 2016 7:56 pm

After some more testing, it looks like I was having a problem with using up RAM.

I was using the example code to display a .BMP. It looks like the issue is with this part:

Code: Select all

  BMP_Status result = oled.displayBMP(image, 0, 0);
if(result != BMP_OK) {
   Serial.print("Error loading BMP ");
   Serial.println((int)result);
   result = 0;
When I comment this out, the memory leak goes away. I also needed to explicitly say image.close() after displaying each image. If I don't do this, I lose 31 bytes of RAM each time I display an image.

So, the "noise" in the display doesn't seem to have been related to electrical noise at all. Instead, it was a sign that some memory somewhere was being overwritten without me knowing it.

I hope that makes sense. I found lots of good info about Arduino memory at http://playground.arduino.cc/Code/AvailableMemory and https://learn.adafruit.com/memories-of-an-arduino/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest