Esp32 d1 mini + oled + lipo 3,7V 2000mAh doesn't work only with usb connection?

Hey Folks

I'm trying to power my esp32 project with a lithium battery. therefore I've 2000mAh 3,7 V and Battery Shield which boost the voltage to 5V

But the esp32 doesn't run with the battery - the red led on the esp32 is lighting - but the oled doesnt show anything. With usb connection to the pc every thing works fine.

  • I've soldered the jumper on the Battery Shield to 1A and also charged the battery.
  • 4,2 V directly at the battery and 5v from the pins

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

//mehr Infos: https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeMonoBoldOblique12pt7b.h>
#include <Fonts/FreeSerif9pt7b.h>
Adafruit_SSD1306 display1(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
  Serial.begin(115200);

  display1.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display1.clearDisplay();
  display1.setTextSize(2);
  display1.setTextColor(WHITE);
  display1.setCursor(5, 30);
  display1.println("Loading...");
  //x0,y0,width,height,color
  display1.drawRect(0,0,128,64,SSD1306_WHITE);
  display1.display();
  delay(1000);
}

void loop(){
  //alle 2 Sekunden wird der Text geändert
  if(millis()%2000==0){
    display1.clearDisplay();
    display1.setTextColor(WHITE);
    //1 Zeile
    display1.setTextSize(1);
    display1.setCursor(0, 5);
    display1.println("my first display");
    display1.display();
  }

}

What do I miss here???
Thanks for you help

When you tested the SSD1306 with the Adafruity example library, wired as it is now and powered by a battery, did it work?

I found its best to put a cap on the ESP32's 3V3 pin when powering the ESP from a 5V buck conveter.

1 Like

A cap? mhhh

The sketch works when the esp is connected to the usb port.

I've tested no the batteryshield with an esp8266 - and there everything works fine! Also a second esp32 d1 isn't working with this battery shield...

good info to know in post#1. Good luck.

I just wanted to make sure that I have no major error in my circuit.

But I can't get it to work. I'm switching to an ESP8266 and now I have to find a multiplexer for the analog inputs.

Thanks for the help

I've used these,

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.