ESP8266 crash


I developing home watering system with two(or more) ESP8266 moduls.

First ESP module is the server its going from line power, it has DHT11 temperature sensor. I can reach it from the web interface. On webpage I can issue commands like on/off watering and also I have there javascript graphs some css and etc… This module controls the client ESP8266.

The second one is the client that going from 3.7V lipoly battery with solar panel (because there is no line power but wifi signal yes). This modul is sleeping and wakes up in every 5 minutes to ask from the server(first ESP module) to turn on/off the water pump and also reports the battery voltage.

This is going very fine with one big problem. The server is randomly resets the maximum uptime what I reached is about 12 hours. I use 5V 700mA phone charger adapter with two diodes to reduce the voltage(to ~3.6V), also on module I have 1000uF 16V, 1uF 16V electrolytic capacitor and 100nF ceramic type.
Also I tried put delay() and yield() functions into code but I dont know where I shoud it put.

I attach the code, there is lot of functions like calculate daily max, min, avarage temperature, humidity, automated watering, saving these values for graphs and etc. In htmlpage.h is the HTML webpage.

HTMLpage.h (12.6 KB)

webserver_watering.ino (17.4 KB)

webclient_watering.ino (2.65 KB)

Maybe it's not your software but your provider. I read about a SIM card where the provider cuts the connection every 2 hours. The connection can be built again immediately but every 2 hours it is disconnected.


Certainly not. This is completly independent from internet, I am using only local network(see on 8266.png).

I am sure this is reset because I can see in serial console the line wdt reset. Also I store server start time in variable(which variable is print out on web page) and this is on reset changes.

One more remark, when I calls the ESP8266 server web page( many times in a row it always generates reset (5x-10x calls).