What causes so many warm boots?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
themanfrommoon
Normal user
Posts: 48
Joined: 23 May 2017, 21:38
Location: Malente / Germany

What causes so many warm boots?

#1 Post by themanfrommoon » 07 Oct 2017, 11:06

Hi,

I have a nodeMCU ESP8266 with new flashed ESP v2.0.0-dev12 (same behaviour recognized with dev11)
I have attached 3 pulse counters with around 4100-4200Hz each.
Every 60 seconds the three values are reported to a "volkszähler" server.
This works fine.
BUT there are a lot of spikes in the diagrams and I found out that these are caused by warm boots of the nodeMCU ESP8266.
They occur not regulary.
Sometimes it works one hour without any issue.
Sometimes it warm boots within one minute.
...and everything between these times.
It is no regular phenomen (then it could be something with a overflow of a variable, but it is not)
PulseCounter11.PNG
PulseCounter11.PNG (255.29 KiB) Viewed 7066 times
PulseCounter12.PNG
PulseCounter12.PNG (134.76 KiB) Viewed 7066 times
PulseCounter13.PNG
PulseCounter13.PNG (169.21 KiB) Viewed 7066 times
Any idea what can be the reason?

....maybe the power supply???? Currently it is a work bench test installation. I didn't check this. It runs on USB 5V from the computer.

Thanks and best regards,
Chris

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

Re: What causes so many warm boots?

#2 Post by grovkillen » 07 Oct 2017, 14:19

I have one unit attached to a USB UPS and that unit hasn't rebooted for 3 months. I suspect it being a power supply problem, not qualified to give more insight than that though.
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:

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

Re: What causes so many warm boots?

#3 Post by Shardan » 07 Oct 2017, 16:13

Hello all,

It might be a power problem even if the one from grovkillen and some nodemCUs running here work fine.

This depends on the quality and length of the USB cable you use.

I have some USB cables that cause such problems. The wires inside are very thin so currrent peaks
for example if WiFi sends data may cause voltage dropping down.
Well cheap cables.... i got what i paid for. Ruskin's rule is everywhere.

You might try a "fat" cable with thick wires inside.
Or you may try a capacitor of 470µF or bigger from 3.3V to ground.

Anyways i'd recommend using a high quality power supply with at least 1,5...2 ampere.
If you're doing such workbench tests often in a long run you might consider
buying a lab power supply. If doing such things often it pays.

Regards
Shardan
Regards
Shardan

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: What causes so many warm boots?

#4 Post by Drum » 08 Oct 2017, 01:03

I agree on the power issue, especially because you are running it off a computer USB port, I have had a lot of problems with those. Get a wall-wart, cell phone chargers tend to work well for me.

I use some good size caps, 1000uF on my nodemcu and .22F 5.5v on others (actually really small). 1.5F runs an ESP-12F for a few seconds, but I think it is overkill. It is a little harder to add caps to the nodemcu, easier to use a good powersupply. I have mine on a breadboard so it is easy to plug in, but I also fried a diode at one point shorting the legs. Still works, I replaced the diode with wire. :o

themanfrommoon
Normal user
Posts: 48
Joined: 23 May 2017, 21:38
Location: Malente / Germany

Re: What causes so many warm boots?

#5 Post by themanfrommoon » 22 Oct 2017, 11:56

Thank you for your feedback!

Yesterday night I moved from the workbench to the object of interest.
I installed two (will be three in the end) optical rpm sensors, wired it up, and powered it directly with a good quality 3A power supply with a fat short cable.
The installation works, but nothing changed regarding the warmboots.
20 warm boots within 9 hours.
Because it ran at night, no one could cause wobble contact or similar.
The behaviour is the same, no matter if I use a thin 2m USB cable powered by the computer or a short fat cable and a 3A power supply.
My feeling is, that it has nothing to do with the power supply.
PulseCounter14.jpg
PulseCounter14.jpg (21 KiB) Viewed 6920 times
PulseCounter15.jpg
PulseCounter15.jpg (78.54 KiB) Viewed 6920 times
PulseCounter16warmboots.PNG
PulseCounter16warmboots.PNG (44.36 KiB) Viewed 6920 times
PulseCounter17warmboots.PNG
PulseCounter17warmboots.PNG (138.03 KiB) Viewed 6920 times

Any Idea how to debug it?
How can I find the reason for the warmboots?

Thanks and best regards,
Chris

Martinus

Re: What causes so many warm boots?

#6 Post by Martinus » 22 Oct 2017, 12:14

themanfrommoon wrote: 07 Oct 2017, 11:06 I have attached 3 pulse counters with around 4100-4200Hz each.
The pulse counter was not really designed for applications like this. It was developed and tested for slow pulse devices like gas/water/electric meters.

Although counting higher frequencies may work, it produces huge amounts of ISR calls and puts a rather heavy load on the low level system.
It could just be that the ESP core watchdog kicks in because the main network core handling is delayed for too long periods

For real frequency counters, hardware counters should be considered. I'm not sure if the ESP8266 has any general purpose internal counters free to use.

themanfrommoon
Normal user
Posts: 48
Joined: 23 May 2017, 21:38
Location: Malente / Germany

Re: What causes so many warm boots?

#7 Post by themanfrommoon » 22 Oct 2017, 12:39

Hi Martinus,

On the testbench I had a small fan with around 4000rpm and three optical sensors for testing.
In the final Installation I have a fans with a max. speed of about 1700rpm, but two reflector marks because of the mechanical balance, this means frequencies of 2x 1700rpm and in the ESPEasy a divider of 2.
So the frequency to count is nearly the same like on the testbench.

I read about the internal watchdog and the need for time for the core functions of the ESP8266.
For me your explanation of causing the warmboots sounds plausible .

Is there any chance to proof this?
Is there any possibility (like a logfile or a serial output) which I can have a look for and find the reason for the warmboots?

Any idea which hardware counter I can use for this job?

Thanks and best regards,
Chris

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

Re: What causes so many warm boots?

#8 Post by Shardan » 23 Oct 2017, 12:10

Depends a bit on the accuracy you need.

If you don't need very high accuracy you simply may use a binary divider/counter chip like a 74HC4024.
This chip is a 3.3V compatible 7-bit divider. You may feed it with the 4000 Hz pulses and grab
a f/2, f/4, f/8..... f/128 signal from the outputs. So this gives 2000Hz, 1000Hz, 500Hz.....31.25Hz.
Remember: The lower the pulse frequency is, the lower is the accuracy.

Please put a capacitor of 100nF (ceramic type) on 3.3V and GND as near as possible to the counter chip.

As the chip has all 7 outputs availlable it's possible to experiment and test to find a stable and accurate enough division level.

Atm i don't see a way to directly use a counter register inside the ESP.

Regards
Shardan
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests