PUYA firmware reboots ofren

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
FredZ
New user
Posts: 4
Joined: 19 Oct 2020, 07:28

PUYA firmware reboots ofren

#1 Post by FredZ » 11 Nov 2020, 20:36

Hello all

Fairly new to ESP Easy, so please excuse me if this is covered elsewhere, but my searches have proven fruitless.

I have a relay board fitted the an ESP-01 board. I'v install the ESPEasy_Mega_P165_1M_128kS_lwip20_PUYA firmware and all functions as expected. Except that the device reboots on its own very often.
I've install this firmware as I needed the "Serial MCU controlled switch" device which apparently doesn't exist in the new firmware.
The baord is being controlled by a Domoticz server.

This is the board I'm using.

Here is the system info

Code: Select all

Build
20102  - Mega
Libraries
ESP82xx Core 2_4_0, NONOS SDK 2.1.0(deb1901), LWIP: 2.0.3
GIT version
(custom)
Plugins
11 [Normal]
Build time
Sep 20 2018 20:18:40
Binary filename
ThisIsTheDummyPlaceHolderForTheBinaryFilename64ByteLongFilenames

ESP board
ESP Chip ID	8032758 (0x7A91F6)
ESP Chip Freq:	80 MHz
Storage
Flash Chip ID	Vendor: 0x5E Device: 0x6014
Flash Chip Real Size:	1024 kB
Flash IDE Size:	1024 kB
Flash IDE speed:	40 MHz
Flash IDE mode:	DOUT
Flash Writes	2 daily / 2 boot
Sketch Size	580 kB (292 kB free)
Your comments would be most helpful.

Regards

Fred

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: PUYA firmware reboots ofren

#2 Post by ThomasB » 11 Nov 2020, 21:42

You're using old firmware, so my go-to advice is to upgrade to the latest Mega release. Unfortunately this solution requires that you compile the firmware yourself.

The ESP-01's 1MB flash is the main reason for this. If you had a 4MB Flash then I would suggest trying the latest [Testing] bin. If you're adventurous and have good soldering skills, then consider upgrading the Flash chip to 4MB. There are online instructions to guide you. For example:
https://tech.scargill.net/32mb-esp01/

But before doing that, there's some basic causes of random reboots.

1. A common troublemaker is the 5V power supply. ESP8266 needs clean power (minimal ripple, good transient response). Even the supply's wire cable can cause problems due to voltage drop under instantaneous peak loads (blame small gauge wire and/or wire length).

2. Another source of reboots is weak WiFi signal strength. Especially on older firmware releases. I suggest you relocate the node to a location that provides better than -73dBm RSSI. If uptime reliability improves then your intended installation should ensure adequate WiFi signal strength.

3. Adding bulk capacitance to the ESP-01 board's voltage rails is recommended. For example, add a 470uF to the 5V pin and a 220uF to the 3.3V pin. These values are not critical; just use something with large capacitance. Keep component leads short. Include a 0.001uF to 0.1uF ceramic decoupling cap on the 3.3V pin too.

- Thomas

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

Re: PUYA firmware reboots ofren

#3 Post by TD-er » 11 Nov 2020, 21:44

Well that build is not stable (as you may have found out now...)
We do have a build named "hard_LCtech_relay_x2_1M" (may not be present in nightly builds)
It is slightly too large to perform an OTA update, but I thing it does have support for your hardware.

FredZ
New user
Posts: 4
Joined: 19 Oct 2020, 07:28

Re: PUYA firmware reboots ofren

#4 Post by FredZ » 12 Nov 2020, 21:26

So I installed the suggested firmware and the problem still exists.

Code: Select all

System Info
Unit Number:	0
Local Time:	2020-11-13 09:06:55
Uptime:	0 days 2 hours 46 minutes
Load:	4.67% (LC=4628)
CPU Eco Mode:	false
Free RAM:	25424 (36744 - )
Free Stack:	3664 (3744 - )
Heap Max Free Block:	21920
Heap Fragmentation:	13%
Boot:	Manual reboot (10)
Reset Reason:	Hardware Watchdog
Last Task:	Backgr1ound Task
SW WD count:	0
Firmware
Build:⋄	20110 - Mega
System Libraries:⋄	ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄	
Plugin Count:⋄	7 [Normal]
Build Origin:	Travis
Build Time:⋄	Sep 13 2020 00:18:44
Binary Filename:⋄	ESP_Easy_mega_20200913_hard_LCtech_relay_x2_1M
Build Platform:⋄	Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.29
Git HEAD:⋄	mega_fe6e911
System Status
Syslog Log Level:	Debug More
Serial Log Level:	None
Web Log Level:	None
ESP Board
ESP Chip ID:	8032758 (0x7A91F6)
ESP Chip Frequency:	80 MHz
ESP Board Name:	PLATFORMIO_ESP01_1M
Storage
Flash Chip ID:	Vendor: 0x5E Device: 0x6014
Flash Chip Real Size:	1024 kB
Flash IDE Size:	1024 kB
Flash IDE Speed:	40 MHz
Flash IDE Mode:	DOUT
Flash Writes:	2 daily / 4 boot
Sketch Size:	665 kB (208 kB free)
Max. OTA Sketch Size:	599 kB (614384 bytes)
OTA possible:	false
OTA 2-step Needed:	true
SPIFFS Size:	110 kB (32 kB free)
Page size:	256
Block size:	4096
Number of blocks:	27
Maximum open files:	5
Maximum path length:	32
Things I noted whilst doing this.
I have several (6) ESP-01 devices here, both in blue and black boards, but only one unit actually loaded the firmware and was usable. I'm somewhat perplexed over that.
I will get the magnifying glass out and see if the chipsets are the same or not.

I've also noted the following in the system info

Code: Select all

Boot:	Manual reboot (10)
So my question is why is it rebooting. Need to do some research.

Your comments would be most helpful.

Regards

Fred

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

Re: PUYA firmware reboots ofren

#5 Post by TD-er » 12 Nov 2020, 21:42

Manual reboot sounds like something that either gets the reset pin triggered often or an unstable power supply (thus simply a crash corrupting RTC memory -> boot as if just powered on)

FredZ
New user
Posts: 4
Joined: 19 Oct 2020, 07:28

Re: PUYA firmware reboots ofren

#6 Post by FredZ » 12 Nov 2020, 21:57

I guessed power supply, but have changed it several times. All PSUs I've tested are 12V 2A+

I've ordered memory chips to upgrade the ESP-01 to 4M, but I don't think any of the current 4M firmwares support "Serial MCU controlled switch".

I'm thinking it may be something to do with the relays generating EMF that is reseting the boards. I'll put the scope on it and monitor it. If this is the case it should be a simple case of decoupling the relays.
If it isn't that it may be the 5V regulator is a low quality noisy device. Yes I'm using a 12V board.

More info and hopefully pictures to come.

Regards

Fred

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: PUYA firmware reboots ofren

#7 Post by ThomasB » 12 Nov 2020, 22:37

I've ordered memory chips to upgrade the ESP-01 to 4M, but I don't think any of the current 4M firmwares support "Serial MCU controlled switch".
After the Flash upgrade install a recent Mega 4MB "Testing" release. Then use the device plugin named Serial MCU Controlled Switch.

Edit: But since ESP_Easy_mega_20200913_hard_LCtech_relay_x2_1M did not fix the reboots, I doubt the 4MB release will resolve the problem. Issues with 5V power, back-EMF from the relays, or marginal WiFi signals are more likely.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests