Wemos is crashing

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Wemos is crashing

#1 Post by timbiker » 14 Dec 2017, 10:10

Hi everybody,

Since few days, I am experiencing some issue with EspEasy on my Wemos D1 mini v2.0.0 for my new project. I used to flash espeasy R120 and I decided, for my project needs, to switch to the V2.0 Dev 9 or dev 12 depending of what I need. I used to flash with Arduino IDE 1.8.5 settled on :

- Wemos D1 R2 & Mini
- CPU frequency : 80Mhz
- Flash Size : 4M (1M SPIFFS)

The point is whatever the version of Espeasy I flash (dev 9 or dev 12), I need to plug and unplug the Wemos few times in order to make it properly running. e.g. when I connect to the Wemos, and navigate into the different tab, it stops responding and crash...


Now, for a new project with a new Wemos
I am currently working on a project for air monitoring using : Wemos D1 mini, MH-Z19 sensor, SDS011 dust sensor and a DHT22. I easily passed the proof of concept in getting every sensor works separately. But when I tried to put them together, the nightmare started...
The only way to make it work was to flash a custom version of Espeasy 2 dev 9 with the needed plugin. After what I had to add the sensor one by one in the interface and plug them also one by one. It was working but when I restarted (unplug from the PC to plug it on a power supply) the Wemos, it crashed. And I need to format it and reflash the firm.........(FYI the bin is about 480ko)

First question, is the 1M Spiffs I chose could be an issue ? Do I need to choose 3M SPIFFS ?

I am plugging as well :

DHT 22 : D8
Oled SS1306 : D1 & D2
CO2 : D3 & D4
SDS011 : D5 & D6
Led WS2812 : D7

It was working until I unplug the Wemos from my PC...

Do you have some idea ?

thanks

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#2 Post by timbiker » 14 Dec 2017, 19:07

Well, I can't understand what is going on with the Wemos.

I compiled another light version only with Neopixel, DHT22, MH-Z19, OLED, Framed OLED and SDS011 dust sensor and flashed it.

I can connect the Wemos, set the right network with the password. The countdown goes from 20s to 0s and then goes back to the config page...

I am trying with another Wemos but if somebody can compil me a bin file with my needed plugin : I need the MH-Z19 for the B version sensor. It may help me... Thanks !!!

When I success to connect the Wemos to my router, its access is verrrrrryyyyy long and I have an error page loading...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Wemos is crashing

#3 Post by grovkillen » 14 Dec 2017, 19:36

Try to ping the unit prior to connecting to it.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#4 Post by timbiker » 14 Dec 2017, 20:18

It's really crazy...

After 5 times of setting the wifi network it finally connect to my router. Then, going to the main page of the Wemos : OK, going to the device page : OK but it's sooooooooooooooo long to charge the page.

Pinging it : on 4 packets, 1 is lost... Going into the edit device page : unable to load the page...

Pinging again : 0 packet lost... but the webpage is not loading

I will try to flash a bin of the dev 12 version without compiling to check if the issue is coming from the Wemos I received or from the compiling...

edit : tried also plugged to a 2000mA power supply instead of my pc's usb
Last edited by timbiker on 14 Dec 2017, 20:26, edited 2 times in total.

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#5 Post by timbiker » 14 Dec 2017, 20:19

BTW we agree that for a Wemos mini D1 (4M) I can only flash the 1024.bin file ?

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#6 Post by timbiker » 14 Dec 2017, 20:32

Well, even with the bin of the dev 12 version, it still has issue... On 2 different Wemos

Sounds like Wemos issue...

Or a problem with my routeur because the wemos seems to work well in AP mode

OK.......... Well..... I spent about 5 hours on this issue... Tried lot of things... I've juste restart my router and... It seems to work... I have to perform some tests but... :evil: :evil: :evil: :evil:

TD-er
Core team member
Posts: 8772
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos is crashing

#7 Post by TD-er » 14 Dec 2017, 20:57

Could you try and disconnect the MH-Z19?
You connected the CO2 sensor to D3, D4, which I also did on my PCB. But during flash I have to press the flash button continuously, or else it won't flash.
I used a NodeMCU, which has a flash button. But the Wemos D1 mini has not.

The flash button is working as a pull-down on GPIO-0, which is D3.
So please disconnect pin D3 from the Wemos (or disconnect from the CO2 sensor if that's easier) and try to flash again.

You also use both the SDS011 and the CO2, which are power-hungry. It may well be they both demand too much from the powersupply, or the used cable to cause a power dip which may crash the Wemos.
You could try to add some capacitors on the power line, to lessen the load.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Wemos is crashing

#8 Post by grovkillen » 14 Dec 2017, 21:14

Do you have NTP activated? Is the device getting a time from the NTP server? If not the unit will be super slow.

But if you do not have NTP activated then it's something else.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Wemos is crashing

#9 Post by grovkillen » 14 Dec 2017, 21:17

timbiker wrote: 14 Dec 2017, 20:19 BTW we agree that for a Wemos mini D1 (4M) I can only flash the 1024.bin file ?
You can flash the 4096 version, no problem.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#10 Post by timbiker » 14 Dec 2017, 22:02

Ok well, it is working since about 10mn...

I succeed in compiling a dev12 version with only the needed plugins

Strangely I had to disconnect the 3.3V power from the board (supplying DHT22 & OLED screen) to be able to boot the Wemos... :?: :?: :?:
I will try to let it runs this night to check if it's stable


@grovkillen : I tried to connect to the ntp but did you mean that the ntp is making it slower ? Is it better to use the ntp or not ?

@TD-er : I tried every sensor separately and they were working well. The wemos is working but it seems to be on its knees as the webpage access is quite long and I have to reload the pages to get them full

I was about to add a 15 led strip ws2812a on the board 5v... But do you think it would be a bad idea because of the overall power consumption ? BTW it's only connected to the usb plug power...

DHT22 + 68x24 oled screen + MH-Z19 + SDS011... Would the 15 5050 led be too much ? :roll:

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Wemos is crashing

#11 Post by grovkillen » 14 Dec 2017, 22:05

timbiker wrote: 14 Dec 2017, 22:02 ...
@grovkillen : I tried to connect to the ntp but did you mean that the ntp is making it slower ? Is it better to use the ntp or not ?
...
If you have it activated but the unit isn't able to communicate with the NTP server it will be slow as heck.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8772
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos is crashing

#12 Post by TD-er » 14 Dec 2017, 23:41

timbiker wrote: 14 Dec 2017, 22:02 [...]
I was about to add a 15 led strip ws2812a on the board 5v... But do you think it would be a bad idea because of the overall power consumption ? BTW it's only connected to the usb plug power...

DHT22 + 68x24 oled screen + MH-Z19 + SDS011... Would the 15 5050 led be too much ? :roll:
One WS2812 LED may take up to 168mWatt (taken from datasheet)
So 15x means up to 2.5 Watt for the LEDs alone.
That's 500 mA @ 5V.
The datasheet mentions 6-7 V as power. Don't know how they act on different voltage and maybe they have extra resistors to let the strip work on 12V ?

I guess that's at least too much according to the USB standard (USB1.0/2.0), but USB chargers may supply more.
Then you will have a USB cable, which may give some voltage drop with higher current. So depending on the quality of that cable, it may add up to instability.

The MH-Z19 may peak up to 200 mA @ 5V, but with a small capacitor that peak may easily be halved or better, depending on the size of the capacitor.
The particle sensor does have a fan and a laser, so that may also peak. (which reminds me, I still have to finish my code to switch the laser off between measurements)

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Wemos is crashing

#13 Post by Shardan » 14 Dec 2017, 23:43

timbiker wrote: 14 Dec 2017, 20:19 BTW we agree that for a Wemos mini D1 (4M) I can only flash the 1024.bin file ?
Nope. The Wemos uses an ESP-12 E/F with 4MB so it needs the 4096 bin file.
Regards
Shardan

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#14 Post by timbiker » 15 Dec 2017, 09:09

OK, the board is still running after one night ! I did not try to unplug and replug it as I am afraid of the board won't boot. :D

In fact you're right, I would have a scientific approach so...

Wemos built-in 5v regulator is given for 500mA :

- DHT 22 : 5mA
- SDS011 : 220mA peak
- MH-Z19 : 150mA peak
- Oled screen 0.48": 15mA

So : 390mA... Only room for less than 1 led. I succeed in powering the 15 but how many time the board will support...

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#15 Post by timbiker » 15 Dec 2017, 09:11

TD-er wrote: 14 Dec 2017, 23:41 (which reminds me, I still have to finish my code to switch the laser off between measurements)
That's exactly what I was wondering... If the laser of the SDS011 was turned off between measurements. So I have my answer now

Its lifetime actually would be less than 1 year. Your code update would be a real improvement ! :roll:

TD-er
Core team member
Posts: 8772
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos is crashing

#16 Post by TD-er » 15 Dec 2017, 10:42

timbiker wrote: 15 Dec 2017, 09:11
TD-er wrote: 14 Dec 2017, 23:41 (which reminds me, I still have to finish my code to switch the laser off between measurements)
That's exactly what I was wondering... If the laser of the SDS011 was turned off between measurements. So I have my answer now

Its lifetime actually would be less than 1 year. Your code update would be a real improvement ! :roll:
I was working on it... https://github.com/TD-er/ESPEasy/commit ... 93a8962624
Until now, no writing was done to the module, so that had to be implemented first.
Now, I have to test it with my module. Only thing is I hardly have 1.5 hours a day free to work on all the projects.

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#17 Post by timbiker » 15 Dec 2017, 12:02

Well you know, from my side I am clearly not capable of working on such a code so... Unfortunately I can't help

But I am very thankful for people like you who can and do so I am happy, I am enjoying your work in working on little project with them

So I am waiting for improvement but many thanks for your work !

EDIT : by the way, I tried to unplug and replug the Wemos. It does not boot. I must unplug the 3V3 from the DHT22 to make it boot... Do you have an idea ?

(the data of the DHT22 is connected to D8 : GPIO 15 and I did not touch anything in the GPIO parameters) I tried to unplug the DHT22 data and it does boot so it's a GPIO issue... Should I do something ?

TD-er
Core team member
Posts: 8772
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos is crashing

#18 Post by TD-er » 15 Dec 2017, 14:19

Looking at the pinout of the Wemos: https://wiki.wemos.cc/products:d1:d1_mini
Only thing that looks different is that that port has apparently a pull-down resistor. (D3, D4 have pull-up)
Maybe the Wemos dus activate that pull down resistor during boot, which may cause strange things?

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#19 Post by timbiker » 17 Dec 2017, 10:31

TD-er wrote: 15 Dec 2017, 14:19 Looking at the pinout of the Wemos: https://wiki.wemos.cc/products:d1:d1_mini
Only thing that looks different is that that port has apparently a pull-down resistor. (D3, D4 have pull-up)
Maybe the Wemos dus activate that pull down resistor during boot, which may cause strange things?
I'll try to plug in on the D0.

I thought about that this night, I made one of those sensor for the project luftdaten.info. It's working since few days now. I read on their website that the sensor is turned off between measurements. It seems that you can have access to their source code.
Maybe that would inspire or help you for yours !

Thanks

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#20 Post by timbiker » 17 Dec 2017, 15:47

TD-er wrote: 15 Dec 2017, 14:19 Looking at the pinout of the Wemos: https://wiki.wemos.cc/products:d1:d1_mini
Only thing that looks different is that that port has apparently a pull-down resistor. (D3, D4 have pull-up)
Maybe the Wemos dus activate that pull down resistor during boot, which may cause strange things?
I have a little question TD-er, I tried to send the dust info to Domoticz. First I created a P1 Smart counter as I though that ESPEasy will send a command like VALUE1;VALUE2 but I crashed my domoticz database and I had to reinstall everything.

Well I also tried a dummy temperature+humidity sensor but it is not working too. Which sensor should I create to get the PM10 and PM2.5 value ?

Thanks

TD-er
Core team member
Posts: 8772
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos is crashing

#21 Post by TD-er » 17 Dec 2017, 17:49

I haven't tried yet to get the SDS011 operational.
I know from the BMP280/BME280 that Domoticz is a bit a-typical in what sensor to use.
So if anyone else has any idea on what sensortype to select in Domoticz, it would be nice.

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#22 Post by timbiker » 17 Dec 2017, 18:02

OK thanks, I'll work on it.

I saw that the frame sent by Espeasy is like "0, 3.2;10.7" which is quite uncommon

Now I just have to find something which fits to it ! ;)

timbiker
Normal user
Posts: 29
Joined: 09 Nov 2017, 11:37

Re: Wemos is crashing

#23 Post by timbiker » 18 Dec 2017, 10:05

I was about to forget that Espeasy does support json request so I know now how to retrieve the data !!! ;)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests