Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLED Display #5

Open
thurstinn opened this issue Oct 5, 2022 · 13 comments
Open

OLED Display #5

thurstinn opened this issue Oct 5, 2022 · 13 comments

Comments

@thurstinn
Copy link

thurstinn commented Oct 5, 2022

Hey, thanks for the upload. I have designed my own board with your schematics. I have checked and re-checked and I know that everything is correctly routed and assembled. I am using the exact same display with SSD1306 and I have tried 2 now. I have had no issues flashing the chip and the buttons are working causing the RGB to light up accordingly, there is just no image on screen. Unless I actually have received 2 bunk displays in a row, is there possibly anything that I could be missing here? Like I said I have tested the board and the screen is getting power, i2c, and has the exact same topology as far as passives etc. that yours has. Any advice would be appreciated, I have spent a lot of time and money on this project.
P.S. love your YT channel

@dayar
Copy link

dayar commented Oct 5, 2022

Hello,
I have recently been assembling this PCB and testing the code and have had the same problem.
The solution has been to comment out the I2C initialization line before the initialization of the U8G2 drive.
// Wire.begin(SDA_PIN, SCL_PIN);
delay(100);
u8g2.begin();
It seems that the initialization of U8G2 already performs the initialization of the I2C and if both initializations are performed, the OLED screen does not work.
Try to see if it works for you

@thurstinn
Copy link
Author

Unfortunately it is still not working :(

@dayar
Copy link

dayar commented Oct 6, 2022

Try to change OLED Display declaration of U8G2 library to one of these:

U8G2_SSD1306_128X64_VCOMH0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ OLED_RST_PIN, /* clock=*/ SCL_PIN, /* data=*/ SDA_PIN);
// U8G2_SH1106_128X64_VCOMH0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ OLED_RST_PIN, /* clock=*/ SCL_PIN, /* data=*/ SDA_PIN);

@thurstinn
Copy link
Author

No such luck. I ordered a new display that is attached to its own board and will try it using the I2C connector. One other issue I am wondering about is using GPIO 45 as the reset pin. It is a strapping pin and with the pull up resistor it is setting the esp32s2's VDD_SPI to 1.8V on startup. I have the FN4R2 and datasheet says that VDD_SPI needs to be set to 3.3V (GPIO 45 = 0) in order for the embedded flash to work. I'm not sure how vital that is as makermoekoe appears to be using a similar chip version. Either way I appreciate your help and if you have any more suggestions please keep them coming.

@thurstinn
Copy link
Author

UPDATE Display is working!! I did what I described in my last post. I also removed the pull up resistor on GPIO45 and the two on SCL and SDA as those are already on the display module I am using now. I reset the code back to how it was originally with one exception: Since I no longer have the reset pin of the display connected to the board I changed the constructor to:
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=/ U8X8_PIN_NONE, / clock=/ SCL_PIN, / data=*/ SDA_PIN);
Thanks for your suggestions. Now I'm going to install the board in the oven test it out.

@dayar
Copy link

dayar commented Oct 7, 2022

I'm glad it works for you, in my case I had the ESP32-S2FH2 version, without Embedded PSRAM, so the GPIO45 pin doesn't influence me.
Anyway, I'm testing the code and there are some unfinished things or things that don't work completely correctly, you'll see it soon.

@thurstinn
Copy link
Author

Ya I was hoping it would get some updates. I just started learning to code at university so I'm a little lost on software side. Looking forward to seeing what you got.

@p1ngb4ck
Copy link
Contributor

@thurstinn were you able to solve the issue with the "direct" OLED connection, or only with "external" display via QWIIC connector? The latter would be really bad in my usecase unfortunately - and I have the FN4R2 version of the ESP23-S2 also.
Could you maybe aid me by explaining your findings as exact as possible again for me ?
Sorry to bother you and a thanks so much in advance

@p1ngb4ck
Copy link
Contributor

nevermind. Got the displays running.
What I realized is :
@dayar : the S2FH2 version has the same dependency on VDD_SPI needs to be set to 3.3V just like the FN4R2 version (which I also have) - you would be affected if that was the errors/problems root cause.

You can burn efuses on the FN4R2 chip version to make it ignore the signal level of the GPIO 45 strapping pin and go for 3.3V on VDD_SPI always. But - this cannot be undone. Use espefuse.py tool for that, I did that successfully but had no actual effect.

If you use any version of the arduino-esp32 framework newer than the one used by makermoekoe (2.00-alpha-1) you will get problems with buzzer, display and led. right now I am investigating.

When researching this - I actually found out, that the displays connection circuit for this pcb was adapted from the adafruit display boards. (see https://cdn-learn.adafruit.com/assets/assets/000/093/884/original/adafruit_products_0-96in_OLED_sch.png)

For me, the display is working, after re-doing the soldering of all connections. Make sure to double check I2C Pins of the ESP32 and all connector-pins and to use visual studio with the exact provided library versions that makermoekoe uses (do NOT modify platformio.ini ! )to make the display work.

@thurstinn
Copy link
Author

thurstinn commented Jan 24, 2023

Not sure if you still need this but I ended up designing a new board with a new working display circuit for a direct connection. This is the schematic. The reset pin is no longer connected to the esp32 and instead has what looks an auto reset circuit. I referenced the schematic from the external display module I had bought.

reflow_schm

@p1ngb4ck
Copy link
Contributor

@thurstinn TY so much - but I actually got it working using the initial direct 30 pins OLED display I got from Aliexpress.
I also just had success with some very (!) minor tweaks, allowing me to use current versions of arduino-esp32 framework, all libraries and everything in Arduino IDE, which makes it much easier to do the ESP32 chip settings - which is important for USB-CDC (serial output) and much other stuff.
Right now working on putting these changes to my fork.

But : THANKS a bunch for that input, I will definitely take your circuit into account and check it out - it may be extremely helpful for my own pcb idea actually ... so be assured I am very thankful for your input <3

@thurstinn
Copy link
Author

No problem good luck on your project! let me know if I can help. I went by the book with my pcb on a 4 layer board. The esp32-s2 hardware design guideline pdf is a great resource.

@WainingForests
Copy link

I'm a bit confused. This seems like a nice project but it seems there's bom related issues to get everything working?

It sounds like I'd specifically need a ESP32-S2FH2?

@thurstinn You mention a new board, any chance you could link to the design files / a repo with a bom, or is it as simple as buy X model version of esp32 chip and use the original repo files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants