Wemos ESP DeepSleep weird baudrate

Im using a Wemos D1 Mini pro powered by a 3.7 volt battery charged by a solar panel. Because of saving the battery i like to use the ESP DeepSleep so the battery will be longer for use than a few days.

After programming the DeepSleep im getting a weird baudrate after the first cycle and thats it.
Output:

closing connection
Force deepsleep 15min!
rll⸮⸮|⸮l⸮|⸮l⸮b|⸮⸮⸮⸮r⸮bl⸮b⸮⸮nn⸮lnn⸮⸮⸮bp⸮⸮lrlrl⸮r⸮n⸮b⸮nbp⸮

What im doing wrong.

Ive connected the D0 to the RST pin.

My project look like this:

#include "config.h"


//WiFi
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <Wire.h>
#include <ESP8266HTTPClient.h>



// MQTT configuration
//
#include <PubSubClient.h>
WiFiClient wclient;
PubSubClient MQTTclient(wclient, mqttBroker);// < =YOUR broker address


//- #include <SPI.h>  //only if you'd want to use the SPI of the BMP
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
//- #include "DHT.h"


#define SLEEPPIN D0 //aanbrengen pull up
// D1 en D2, (GPIO5 and GPIO4)  are SCL resp SDA  and used by the BMP280
#define FORCE_DEEPSLEEP //comment when you like to use battery level dependent sleep


// Sensor configuration
//
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <BH1750.h>

HTTPClient http;
const char* host = HOST;
// function prototypes required by Arduino IDE 1.6.7
void setupOTA(void);
void createUrlTmp(void);

Adafruit_BMP280 bmp280;
BH1750 lightMeter(0x23);

unsigned int batt;
double battV;
byte count = 0;

void setup(void) {
  
  Serial.begin(115200);
  Serial.println("Setup Sketch...");
 //- dht.begin();

  Wire.begin();
  if (!bmp280.begin(0x76)) {
    Serial.println("no BMP detected");
    delay(1000);
  }
  lightMeter.begin();
  setupWiFi();
  setupOTA();

}

void loop() {
  ArduinoOTA.handle();
  batt = analogRead(A0);
  battV = batt * (4.2 / 1023);
  Serial.print(battV);
 //- float h = dht.readHumidity();
 //- float t = dht.readTemperature();
  delay(30000);
  createUrlTemp();
  createUrlPa();
  createUrlAlt();
  createUrlLux();
  createUrlBattery();

  Serial.println("Force deepsleep 15min!");
  //ESP.deepSleep(15 * 60 * 1000000);
  ESP.deepSleep(15 * 1000000); // for test
  delay(100);
}

It's normal, that's just the boot information of the ESP8266. It's printed every time the chip boots (including when it wakes up from deep sleep), and it can not be disabled.

Pieter

Hello Pieter,
yea i read something about that but after that output nothing happens anymore. It seems the firstwakeup does work and that is .

Sander

Anyone ?
Please?

I have no idea. Did you connect anything to GPIO0, GPIO2 or GPIO15?
How did you connect it to the battery?

Hello Pieter,

Ive connected the D0 (GPIO16 for arduino) to the RST pin. The battery is connected to the 5V pin and the GND.

The sensors are connected D1 and D2.

As far as i can see nothing is connected to the GPIO0, GPIO2 or GPIO15.

I also have an another strange thing because the A0 is not reading out any analog data from the battery. If the battery is connected or not it always says 1 (sometimes 2)

Did i answer your question.

How are you measuring the battery voltage? Any voltage higher than 1.8V will just blow up the analog input.

Im measuring by connecting the + to a 100K resistor and then i connected the resistor to the A0.
I used a mulitmeter and I saw the A0 is showing 3.8V. But it only works when the + is connected to the A0 and the - (of the multimeter) is connected to the battery -.

The D1 mini Pro already has a buildin 100k:220k divider on the A0 pin.
If you use 100k between batt(+) and A0, then you should measure about 3volt on A0 when the LiPo battery is 4volt.
Make sure the resistor is 100k.
Leo..

Hello Leo, the resistor is 100k. Dont know why the ReadAnalog(A0) doesn't show any information.

Had some other issues also right now. Think i've shorted the wemos with the multimeter. Connected the A0 and the GND pin on the Wemos with the meter.

Now im not able to read D2 and D3. My script also says it can not find any sensor :(.

Is it possible to shortcut the circuit with the multimeter?