Erratic OLED 128x32 display
Moderators: adafruit_support_bill, adafruit

Erratic OLED 128x32 display

by Scott216 on Tue Oct 29, 2013 11:46 pm

I'm using the I2C 128x32 OLED display. I've used it successfully on a a few projects and love it. But now I'm trying to use it with a Arduino Pro-Mini (5v) and I'm having problems. The display is erratic. Sometimes the text looks okay, but not very often. Sometimes it's shifted vertically. Sometimes some is missing sections and sometimes it's all snowy with no text. I had this working perfectly with a Leonardo, but something is going on with the Pro-Mini. I have 4.7k pullup resistors pulling up to 3.3 volts. I've also got two other devices on the I2C bus - DS3231 real time clock, and a MMA8452Q accelerometer (Sparkfun breakout board). The accelerometer breakout board has 10k pullups to 3.3 volts. I can unplug the accelerometer from the circuit, but that doesn't seem to matter with the OLED display problems. The RTC and accelerometer are working okay. Any suggestions as to what I can try?
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by adafruit_support_bill on Wed Oct 30, 2013 5:56 am

I can unplug the accelerometer from the circuit, but that doesn't seem to matter with the OLED display problems.

Try with just the Pro-Mini and display to rule out any interference problems with the RTC. It could also be an intermittent connection somewhere. If you post photos showing your soldering and connections we'll check it over.
User avatar
adafruit_support_bill
 
Posts: 30796
Joined: Sat Feb 07, 2009 10:11 am

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 8:25 am

I can't "remove" the RTC, but I did try with the 3.3v power removed from the RTC chip and it didn't help. Here's a bunch of pictures on flickr: http://www.flickr.com/photos/organize/? ... 7118837274

In the bottom of the big PCB you'll see a few wires soldered in to correct a couple traces I forgot to connect in Eagle. They are SDA, SDL, Vcc and Ground. Pretty important things to miss. I originally had a leonardo powering this, but it was too big physically, so I swapped in the pro-mini and forgot to connect a these wires. I tested these jumper wires with an ohm meter and they seem fine. I have two more empty PCBs. I could solder in the headers for the pro-mini and try testing without the RTC chip even installed.
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 8:37 am

I just did a little test, I removed the pro-mini from the headers and used jumpers to wire in a Leonardo in it's place. I just wired Vcc, GND, OLED Reset, SCL, and SDA and the display worked great. So I guess it's something with the pro mini.
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by adafruit_support_bill on Wed Oct 30, 2013 8:43 am

Your photo link requires a sign-in, so I can't see those. The pro-mini comes in both 5v and 3.3v versions. The Leonardo is 5v. Which pro-mini are you using?
User avatar
adafruit_support_bill
 
Posts: 30796
Joined: Sat Feb 07, 2009 10:11 am

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 10:30 am

Try this link: http://www.flickr.com/photos/37101040@N ... 118837274/
I didn't realize the flickr link from the browser address bar wasn't public.

I'm using 5v pro mini.

I've made some progress with solving this. When the Leonardo worked and the pro-min didn't, I decided to hook the pro mini up like the leonardo, just use the bare minimum # of pins. So I took some stacking headers and plugged the pro-mini in so only power and the I2C pins were connected to the PCB. This worked, so I started adding more stacking headers so more pro mini pins would be connected. This didn't produce consistent results. Most of the time it's working now, but not all the time and sometimes it will not work even when I don't change anything, I just remove and replace the FTDA plug to cycle power. So I'm leaning towards some sort of intermittent connection problem. To try and fix it I'm going to remove the 2-pin header for A4 and A5 (SDA/SCL) and put a new one in leaving the pins sticking out farther so I can get a good connection on it when I redo the SDA SCL jumper wires. I'm also going to touch up all the solder joints on the pro min and headers.

I have a related question: When I do have a problem with the display being garbled, sometimes I just remove the FTDI cable and replace it to cycle power and the display may look correct, but not always. But if I press the reset button on the pro-mini when the display is garbled, it never fixes it. Only cycling power can fix it. Is there a way to clear/reset the display in software that is as effective as cycling the power. In my sketch I do use .clearDisplay()
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by adafruit_support_bill on Wed Oct 30, 2013 10:38 am

There is a reset pin on the display. Do you have that connected? The library should pulse that when you initialize the display.
User avatar
adafruit_support_bill
 
Posts: 30796
Joined: Sat Feb 07, 2009 10:11 am

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 10:49 am

Yes, I have the OLED reset pin connected to A6 on the Pro mini. I looked at your library and it does cycle it. It was always connected even with all the testing I just did.
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by adafruit_support_bill on Wed Oct 30, 2013 12:33 pm

Does the display reset if you manually short the RST pin to ground?
User avatar
adafruit_support_bill
 
Posts: 30796
Joined: Sat Feb 07, 2009 10:11 am

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 12:50 pm

I'll give that a try later today and let you know.
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 5:25 pm

Shorting reset to ground does reset the display. But I don't think the pro-mini is resetting it. I checked the connection between A6 and the reset pin with my ohm meter and it's fine. In my sketch I made A6 (my reset pin) low for 1000mS, then high again and I did not see the display reset.
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by adafruit_support_bill on Wed Oct 30, 2013 5:29 pm

I checked the connection between A6 and the reset pin with my ohm meter and it's fine.

Lots of times, intermittent connections will become conductive when you poke them with a probe. The other possibility is that you have a blown pin on the pro-mini. This can happen if it is overloaded by a short circuit for example.
User avatar
adafruit_support_bill
 
Posts: 30796
Joined: Sat Feb 07, 2009 10:11 am

Re: Erratic OLED 128x32 display

by Scott216 on Wed Oct 30, 2013 9:41 pm

I did a little test to see if pin A6 was working as a digital output and it wasn't. But it did still work as an analog input. After a little searching I found out that pins A6 and A7 on the pro-mini can only be used as analog inputs. So I put the OLED reset in D13 and it seems to be working properly now.
Scott216
 
Posts: 142
Joined: Sun Apr 12, 2009 11:08 am
Location: New Jersey

Re: Erratic OLED 128x32 display

by adafruit_support_bill on Thu Oct 31, 2013 5:16 am

After a little searching I found out that pins A6 and A7 on the pro-mini can only be used as analog inputs

Hadn't heard that before. We don't have any pro-minis here, but it's good to know anyhow.
User avatar
adafruit_support_bill
 
Posts: 30796
Joined: Sat Feb 07, 2009 10:11 am