0
\$\begingroup\$

I’m working on a project called “SenseBox” that includes:

  • CH340
  • ESP8266
  • BME680 sensor
  • SSD1306 OLED display

https://gitlab.com/bytewire/sensebox

Schematic of project (KiCad)

The hardware implementation for the Display i got from here: http://wiki.sunfounder.cc/index.php?title=OLED-SSD1306_Module

Got the display from aliexpress: https://de.aliexpress.com/item/1005006419941940.html

The BME680 and OLED display are both connected to the ESP8266 via I2C. The sensor works great, and I’m getting data without any issues. However, the display refuses to turn on. The I2C connection seems fine, and there’s no error in the software.

I tried both I2C addresses i found mentioned online which are 0x3C and 0x3D. My test implementation looks like the following

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Arduino.h>

#define SCREEN_WIDTH 128  // OLED display width, in pixels
#define SCREEN_HEIGHT 64  // OLED display height, in pixels
#define OLED_RESET    -1   // Reset pin # (or -1 if sharing Arduino reset pin)

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

void setup() {
  Serial.begin(115200);
  Serial.println("Initializing SSD1306...");

  // SSD1306 initialization
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {  // Address 0x3C for 128x64
    Serial.println(F("SSD1306 allocation failed"));
    while (true); // Don't proceed, loop forever
  }

  Serial.println("SSD1306 initialized successfully.");

  display.clearDisplay();
  display.setTextSize(1);      // Normal 1:1 pixel scale
  display.setTextColor(SSD1306_WHITE); // Draw white text
  display.setCursor(0, 0);     // Start at top-left corner
  display.println(F("Hello, World!"));
  display.display();

  Serial.println("Message displayed on SSD1306.");
}

void loop() {
  Serial.println("Updating display...");
  display.clearDisplay();
  display.setCursor(0, 0);
  display.println("Testing SSD1306");
  display.display();

  delay(1000);

  display.clearDisplay();
  display.setCursor(0, 0);
  display.println("ESP8266 Debug Output");
  display.display();

  delay(1000);
}

I’ve attached the schematics for reference. Any ideas on why the display might not be working?

EDIT: From the Datasheet: After VDD become stable, set RES# pin LOW (logic low) for at least 3us (t1) (4) and then HIGH (logic high).

https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf

Voltage on C14 (RST) after inserting the usb connector C14 Voltage Curve

\$\endgroup\$
10
  • \$\begingroup\$ The library code is a black box provided by Arduino and you are using a black box which we can't see if it does things correctly or not. We also don't know if it is supposed to work on your specific display. Without adding more info and debugging where the problem might be, we can't say what the problem might be. \$\endgroup\$ Commented Nov 9, 2024 at 18:59
  • \$\begingroup\$ Do you mean this blackbox? github.com/adafruit/Adafruit_SSD1306 I tried a I2C Scanner: pastebin.com/kMU9M5m7 ```````````````````````````````````````````````````````````````````` I2C device found at address 0x3C ! I2C device found at address 0x76 ! I2C scan complete. ````````````````````````````````````````````````````````````` Still nothing on the display. But the scanner found the adress. So I suspect there must be a hardware related issue, which is not obvious to me tho \$\endgroup\$ Commented Nov 9, 2024 at 19:17
  • \$\begingroup\$ AliExpress are not to be trusted when it comes to many electronic products. Neither are eBay, Amazon and several others. If the schematic links die (as they do over time), your question becomes invalid. You should embed the info into your question. \$\endgroup\$ Commented Nov 9, 2024 at 19:25
  • \$\begingroup\$ I embedded the image of the schematic, but a moderator (electronics.stackexchange.com/users/64158/marcus-m%c3%bcller) removed it \$\endgroup\$ Commented Nov 9, 2024 at 19:29
  • \$\begingroup\$ I don't see anything obviously wrong. Have you verified that the display /RESET pin is high? Are you using a socket for the display FPC? \$\endgroup\$ Commented Nov 9, 2024 at 19:44

1 Answer 1

1
\$\begingroup\$

I discovered the problem was due to high contact resistance at one of the solder joints on the pump charge capacitor (specifically C13/C14).

After resoldering the affected joints, everything is now working as intended. Just a heads-up if anyone else runs into similar issues!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.