How does ESP32 drives OLED 1106

AffDk1
Posts: 2
Joined: Tue Jul 07, 2020 7:12 am

How does ESP32 drives OLED 1106

Postby AffDk1 » Tue Jul 07, 2020 7:24 am

Hi,

I have very recently purchased Esp32 Devkit V1 (Esp-wroom-32) and I want to connect it to an OLED which is driven by an 1106 driver as noted on the vendor web page. The pinout of the OLED is quite different from the examples I found online and I tried many of them but none of them seem to be working.
On the OLED package, I can the following information:

1.3' OLED 4-SPI
and it has a pinout like:
GND, VDD, SCK, SDA, RES, DC, CS

On the vendor page, there is a code example but the wiring concerns ESP8266 (the wbepage is in Danish).

https://jentronic.dk/content/12-oled-di ... e-eksempel

Apparently the OLED must be connected to a 5v supply but I can see on many video tutorials that similar OLED packages can be supplied by 3.3v.

Does anybody have a hint?

Best,
Aff

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: How does ESP32 drives OLED 1106

Postby ESP_Sprite » Tue Jul 07, 2020 8:13 am

Seems the OLED itself is a 3.3V part, but the board has a small LDO on it that converts an external 5V power supply to 3.3V. You could likely convert the OLED module back to 3.3V by soldering a bridge over the correct pins of the LDO (U2), or you could just feed it 5V.

AffDk1
Posts: 2
Joined: Tue Jul 07, 2020 7:12 am

Re: How does ESP32 drives OLED 1106

Postby AffDk1 » Tue Jul 07, 2020 8:35 am

ESP_Sprite wrote:
Tue Jul 07, 2020 8:13 am
Seems the OLED itself is a 3.3V part, but the board has a small LDO on it that converts an external 5V power supply to 3.3V. You could likely convert the OLED module back to 3.3V by soldering a bridge over the correct pins of the LDO (U2), or you could just feed it 5V.
Thanks for your reply.
this is a good point. There is a voltage regulator 662K on the board which could potentially be bypassed but my main issue is the correct wiring and the corresponding code for it. Even the vendor's example concerns ESP8266 and the shown pinout does not completely match with ESP32. I could not find any example which coould perfectly match with my setup.
Do you have one example of wiring and the corresponding code?

Bes,
Aff

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: How does ESP32 drives OLED 1106

Postby ESP_Sprite » Tue Jul 07, 2020 8:51 am

I do not, but I can imagine whatever code you end up using will tell you explicitly what GPIOs it expects the signals to be on. The ESP32 hardware doesn't quite care; it's mostly the software that needs to match up with your wiring.

idahowalker
Posts: 166
Joined: Wed Aug 01, 2018 12:06 pm

Re: How does ESP32 drives OLED 1106

Postby idahowalker » Tue Jul 07, 2020 6:41 pm

The u8g2 library works on the SH1106 OLED, https://github.com/olikraus/u8g2/wiki

Example of a sh1106 instantiation,
U8G2_SH1106_72X40_WISE_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
Select an instantiation that matches your OLED.

You can see the default pin numbers/connections and you can change them to suit your thingies.

bobtidey
Posts: 43
Joined: Mon Jun 18, 2018 2:24 pm

Re: How does ESP32 drives OLED 1106

Postby bobtidey » Tue Jul 07, 2020 8:08 pm

These display modules can either be SPI or I2C. It sounds like yours defaults to I2C.

I2C connects to the SCK & SDA pins. They should normally have the required I@C pull ups on the display board.

DC in I2C is used as an I2C address selector. If it is pulled low then the address should normally be 0x3C. If it is high the address is 0x3D.

CS should be pulled low or connected to 0V to enable it.

RES resets the internal controller. Some displays power up OK but in my experience when there is a RES pin then you should pulse it low / high during initialisation code. Not all libraries allow for this so you may need to do it in the application code.

Although the onboard LDO regulator allows for supplying from 5V, it has a low drop out so the display will work fine when supplied with 3.3V without having to bypass it.

Who is online

Users browsing this forum: No registered users and 113 guests