Uncategorized

SSD1306 OLED notes

Asked 
Active today
Viewed 15 times
0

I know there are similar questions, but none of them helped me out.

I have a Raspberry Pi 3 Model B Rev 1.2 and Raspbian 10 installed. I try to connect an 0.91″ Oled display (Hardware Details) which has a ssd1306 chip on it.

I already activated i2c:

$ cat /boot/config.txt | grep i2c
dtparam=i2c_arm=on

I wired it like the following, based on (a german blog) found here, like the following:

  • GND -> PIN9 (Ground)
  • VCC -> PIN2 (5 Volt)
  • SCK -> PIN5 (GPIO3 / SCL)
  • SDA -> PIN3 (GPIO2 / SDA)

enter image description here enter image description here

When running i2cdetect -y 1 I get the following:

$ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

What can i do? Best regards!

 New contributor
  • We need a clear photo showing the connections between the Pi and OLED. We need to be able to trace from Pi pin to OLED pin. – joan 8 hours ago
  • 1
    It’s safer to power the OLED from 3V3 if you can. Feeding 5V into a Pi GPIO can destroy the GPIO and the Pi. – joan 8 hours ago
  • 1
    added pictures. i wired it with 5V, since the docu i got from the display (which is for arduino only) says, to wire it to 5V. But i can of course change it (and tried it in first place) – bernhardh 8 hours ago
  • Here you can find the wire info for arduino i.imgur.com/c2oxsRg.png – bernhardh 7 hours ago
  • Unfortunately that all looks fine. Could you check for continuity from Pi pin to corresponding OLED pin? – joan 7 hours ago
  • Sry don’t understand what you mean. You see the wires on the oled in first photo and of course their color. If its hard to read: gnd. Vcc.sck. sda – bernhardh 7 hours ago
  • I mean set a meter to measure resistance. Stick one meter lead at the Pi end pin and the other lead on the OLED pin. Check that there is zero resistance. One or more of the jumper leads may be broken. – joan 7 hours ago

2 Answers

1

two things:

1) RPi I2C bus uses 3.3V levels, so connecting here any I2C device powered from 5V can damage your RPi. Additionally, your OLED module documentation shows that it is designed to be powered from 3.3V, and absolute maximum Vcc is… 4V !!!! So, it is possible that you burned-out your display 😦 So, as the first step RECONNECT the power of your module to 3.3V. (for reference: https://cdn.shopify.com/s/files/1/1509/1638/files/0.91_inch_OLED_Datenblatt_48df5c86-6edd-48d9-92ab-c3d76691ac73.pdf?91672)

2) If this abowe will not help, try adding pull-up resistors between SDA and VCC (3.3V), and SCL and VCC (3.3V) – both 3.3kOhm or 4.7kOhm (or something in the middle).

 New contributor
0

Answer

Ah, let me see. It is true that 3V3 SMD/through hole ICs/chips should be powered by 3V3.

However, most 3V3 chips with breakouts or in the form of modules are almost always designed to be powered by 5V0 for two reasons:

(1) To make breakout/module compatible to both

(a) [3V3/5V0 powered Arduino with 3V3/5V0 GPIO/logic] AND 

(b) [5V0 powered Rpi with 3V3 GPIO/logic], 

(2) The breakout/module usually uses a LDO (Low Drop Out) regulator to step down 5V0 to 3V3 which is now more precise, regulated, and stable than directly feeding with 3V3 source which might be too low, noisy, poorly regulated (because overload with other devices, long thin cables, etc).

To play safe, I almost always look closely at the PCB for the 3 leg LDO guy (marked 562K below).

ldo

My suggestion: Go ahead with 5V0.

Warning: No guarantee no nothing would melt down or blow up.


PS1 – To troubleshoot, you can try any other I2C devices to i2cdetect -y 1 again, to make sure that your Rpi + I2C driver/software etc are updated/upgraded, correctly setup and enabled, and working. Good luck and cheers.

PS2 – The module shows three 4k7s which should be the I2C pullups. There is no need to add your own pullup in this case. On the other hand, if LATER you add more I2C devices and detection is no longer stable, you might consider removing the 4k7 pullups, because Rpi I2C pins already have 1k7 pull ups which are strong enough to do the pull up/down job. (Too many 4k7s in parallel would result a too strong (much lower than even 1k equivalent resistance.) Rpi I2C pins then need to pull harder (Ohm’s Law! :))and therefore Rpi would age faster or die sooner. [Pull down current of 3V/1k7 is much smaller than 3V/1k.]


References

(1) How to connect Raspberry Pi 4 to sparkfun SSD1306 / SSD1309 OLED transparent display?

(2) AliExpress SSD1306 / SSD1309 OLED Catalog

(3) Solomon Systech SSD1306 LCD Controller Catalog

(4) Solomon Systech SSD1306 LCD Controller Datasheet

(5) Velleman SH1106 Datasheet

(6) AliExpress SH1106 Module Catalolg

(7) TaoBao SH1106 1.3″ OLED Module

(8) TaoBao SH1106 0.9″ OLED Module

(9) Luma.OLED: Display drivers for SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106

(10) Luma.OLED API Doc for SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SSD1331, SSD1351 and SH1106API OLED


.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: