4 Pin SH1106 I2C IIC 128X64 OLED Screen Blank

Hi All,

I know my way around a computer and a soldering iron but a bit rusty a code to put it nicely.

I am trying to get an Arduino Nano and SH1106 I2C OLED display to work (links to exact parts at the bottom)

When I connect them together 4 wires GND - GND, 5v - VCC, SCL - A5, SDA - A4 and upload the sketch to the board the OLED is blank (Links at the bottom).

I have noticed in the IDE I have to use the ATmega328p old bootloader option to allow the IDE to fully upload the code if I use the atmega328p option it comes up with this error

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x60

I have ran the I2C Scanner and it scans the the board returns no results

If I run it without SCL and SDA connected it returns display not found, if I run it with them connected it just holds on scanning

If anyone has any ideas it would be much appreciated :slight_smile:

Thank-You

Kind Regards
Reece

Sketch: arduino-oled-auto-gauges/boost at master · matt-downs/arduino-oled-auto-gauges · GitHub

Nano: Multi buy (Arduino Nano - Compatible) v3.0 Board CH340G 5V 16MHz atmega328 | eBay

OLED: https://www.ebay.co.uk/itm/1-3-4-Pin-SH1106-I2C-IIC-128X64-OLED-LED-Display-Module-Board-For-Arduino-UV/264030531167?ssPageName=STRK%3AMEBIDX%3AIT&var=563565984534&_trksid=p2057872.m2749.l2649

That display may not have pullups on the board. Do you have pullup resistors (4.7K) installed on the SDA and SCL lines?

I haven't got any to hand but if I look on the back of the display I can see 5 472 resistors which are 4.7k resistors and the scanner must be seeing something or it would just return no i2c found :slight_smile:

The resistors do not have to be 4.7K. Any thing between 2K to 10K should work. Adding external resistors won't hurt, but will confirm that that is or is not the problem. Since the scanner doesn't see the display it is not a problem with your code. It is most certainly a hardware problem. I think that the Wire library enables the internal pullups (30K - 50K). That may be why the scanner hangs. Not enough pullup?

After rummaging through my draw off components I have luckily found some 10k resistor's I soldered them in but no luck unfortunately the scanner is still hanging :frowning:

Attached a picture off it :slight_smile:

Image had to be compressed to be able to upload

The resistors are soldered in the wrong place. They should go from SCL to Vcc and SDA to Vcc. In the meantime, I have looked at several tutorials and none require external pullups. Remove the resistors and reconnect the wires direct.

Where did you get your display? While searching for an answer for you I came across a couple of threads that mentioned that they got bad displays from Ebay. Didn't mention a vendor, though.

Okie dokie, connected them without the resistors like they were before and with resistors to VCC.

I2C scanner still just saying scanning

I did buy it off Ebay, link is in the first post :slight_smile: