Stability of ESP32 vs ESP8266

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
mkiotdev
Posts: 8
Joined: Sun Nov 11, 2018 9:12 am

Stability of ESP32 vs ESP8266

Post by mkiotdev » Tue Nov 13, 2018 8:20 am

Hello!

Just wanted to ask here, in the ESP32 subsection of forum. I have opened another topic here:

viewtopic.php?f=16&t=5517

The thing is; my ESP8266 after ~10 hrs of working quite fine; doing one HTTP POST request per minute is crashed/frozen/not iterating through main loop. It is suggested that there are some problems with sockets and memory/garbage collector alltogether.

As I am quite found of the whole ide around ESP and Pytrhon; the question is; whether this issues are less prominent with ESP32? Will ESP32 and it's MicroPython crash/freze less?

Thank you!

User avatar
pythoncoder
Posts: 3137
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Stability of ESP32 vs ESP8266

Post by pythoncoder » Tue Nov 13, 2018 10:58 am

The ESP8266 can be reliable if you choose your board and power supply with care.

ESP32 running official firmware is reasonably stable but it has this problem which in my opinion is a complete deal-breaker.

I'm waiting for the Pyboard D series.
Peter Hinch

mkiotdev
Posts: 8
Joined: Sun Nov 11, 2018 9:12 am

Re: Stability of ESP32 vs ESP8266

Post by mkiotdev » Tue Nov 13, 2018 4:56 pm

Peter,

Seems like you know your way around this, thank you!

About choosing board and power supply. I’ve bought few $5 NodeMCU boards from AliExpress. I can’t say I have put much of a thought into that. Could you please advise me towards which boards would be more stable/better? Would Olimex/Adafruit/Sparkfun be better choice, and wich one? Probably thouse would be better choice; those one of those stand out?

Regarding the power supply, i have 5V 3A Power supply; it was about $10; needed more amps to drive relays.

User avatar
Roberthh
Posts: 1122
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Stability of ESP32 vs ESP8266

Post by Roberthh » Tue Nov 13, 2018 9:09 pm

Does the freezing correlate with relay operation ?

User avatar
pythoncoder
Posts: 3137
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Application design for stability

Post by pythoncoder » Wed Nov 14, 2018 7:44 am

@mkiotdev My experience of different ESP8266 boards is limited. The reference board (Adafruit Feather Huzzah) and the Adafruit Feather are rock solid. I've found the Wemos D1 Mini to be very good. Aside from those I can't really offer any views other than the general observation that quality varies.

Attention to detail is required in the design of applications for WiFi connected devices. This is because WiFi networks are inherently unreliable: an access point (AP) can go down, the link may briefly be swamped by RF noise, or the unit may move out of range of the AP. Further, the easiest way to crash a device is by failing to close sockets after their use has ended.

Even simple applications need constantly to monitor the state of the network. If the WiFi goes down, all open sockets must be closed. When the network again becomes available sockets need to be created and connections re-established.

Having demonstrated that this works when the AP is temporarily downed, further testing should be done to prove that the mechanism works when the radio signal is degraded rather than suddenly lost. I do this by repeatedly walking the unit out of range of the AP and then back in again. A quick test can be done using a microwave oven - this provides a Faraday cage while enabling you to see any LED's. The door needs to be completely shut so you need to enclose the unit and its power source. I power the device with a battery unit intended for charging mobiles.

Once you have code which reliably recovers after those tests you are in a position to assess the underlying failure rate of the ESP8266.
Peter Hinch

Post Reply