Author Topic: ESP32 stop be stable when it is installed in another location  (Read 1703 times)

0 Members and 1 Guest are viewing this topic.

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
ESP32 stop be stable when it is installed in another location
« on: October 16, 2023, 03:46:50 pm »
 I describe a problem I have with a system based on an ESP32 microcontroller.
After many programming tests that I carried out in the house where I live, I got a stable system (without resets) , but, when I moved it to its destination to my country house, to control irrigation, boiler, hot water, heating, mains water pressure, temperature... etc. , I discover that the system resets randomly many times a day. The only explanation I can find is that the mains current reaches my house with an unusual noise. I have tried different power supplies for the ESP32, but the differences are minimal, and it is independent if I keep the ESP32 disconnected from all the sensors and relays, the problem is always the same.The only option I can think of now is that the power in this house is quite poor (noise), and causes the ESP32 to restart. If anyone could help me or give me some idea on how to proceed I would be very grateful.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6912
  • Country: ca
Re: ESP32 stop be stable when it is installed in another location
« Reply #1 on: October 16, 2023, 04:22:44 pm »
Try powering from a battery. If it will still have problems then the issue may be with strong RF interferrence - you will need to put the device in a metal box to shield it.
Facebook-free life and Rigol-free shack.
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: ESP32 stop be stable when it is installed in another location
« Reply #2 on: October 16, 2023, 04:25:29 pm »
Plus what Bud has just said  -

Its probably not the ESP32 , most Micros can suffer the same problem , which is usually down to the relays and devices they are controlling,  things like mains voltage solenoid coils can often  be problematic.

Try taking out one relay at a time and see what effect it has. Are you using mechanical relays or Solid Statte ones which are less prone to such problems.

Also try taking out one sensor at a time to see if the noise is coming via their cables, again what type of temperature sensors are you using.

Do you have any mains filtering on your power supply input ?  Do you have any contact suppressors across the relays, if mechanical ones ?
 

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #3 on: October 16, 2023, 04:50:41 pm »
Thank you for your ideas.
I have already tried leaving the ESP32 without any relay or sensor and the problem continues. A good test to know if the problem is coming from the power supply is to power it with a battery.  I had thought about installing an EMI filter at the input, but I don't know if it is suitable for this type of device. I'm going to try both procedures, the Faraday cage and if it doesn't work I'll try it with the battery.
« Last Edit: October 16, 2023, 05:07:09 pm by Fermin1989 »
 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 280
  • Country: nl
Re: ESP32 stop be stable when it is installed in another location
« Reply #4 on: October 16, 2023, 09:06:17 pm »
As it is an ESP32, are you connecting it to WiFi?
May there be an incompatibility with the access point at the new location?
 

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #5 on: October 17, 2023, 07:50:23 am »
Yes, it is connected to Wi-Fi, I find this new approach interesting, but I don't understand how it could be related to the ESP32 reset. Could you explain it? Thank you.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12862
Re: ESP32 stop be stable when it is installed in another location
« Reply #6 on: October 17, 2023, 08:26:29 am »
Another possible cause of crashes is EMI due to the location being 'painted' by a high power radar beam.  Is it close to a commercial airport, a military base or facility, docks or other port facilities, or any shipping route or commercial waterway? 
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 9953
  • Country: nz
Re: ESP32 stop be stable when it is installed in another location
« Reply #7 on: October 17, 2023, 08:28:01 am »
Does the WIFI on the ESP32 have dynamic power control?  Maybe it is ramping up the output power when out in the field and that is causing brown outs at peak draw. But when at home your near the router and the ESP is ramping down the output power since it's not needed.

Just a random guess,  try a bigger cap across the ESP32 supply rail, 100uF or something.
Wifi can draw quite high peak currents.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #8 on: October 17, 2023, 08:40:12 am »
Thanks Ian.M,  is not the case.
« Last Edit: October 17, 2023, 08:42:17 am by Fermin1989 »
 
The following users thanked this post: Ian.M

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #9 on: October 17, 2023, 08:48:25 am »
Thanks Psi, it might be possible, I'll try to see what happens.
 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 280
  • Country: nl
Re: ESP32 stop be stable when it is installed in another location
« Reply #10 on: October 19, 2023, 08:02:49 pm »
This ain't my personal experience, but a colleague of mine once told if certain energy saving features are enabled on the wifi access point, it may cause the ESP firmware to crash (and thus reboot)
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2587
  • Country: fr
    • kripton2035 schematics repository
Re: ESP32 stop be stable when it is installed in another location
« Reply #11 on: October 19, 2023, 09:52:44 pm »
you should try it on another completely different location, to see if it works ONLY at the first place, or it DOES NOT work at the final place.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 9953
  • Country: nz
Re: ESP32 stop be stable when it is installed in another location
« Reply #12 on: October 19, 2023, 10:33:23 pm »
Another option might be if the wifi router at the country house is old and does not support the wifi standards correctly, or is just fully of bugs.
This maybe is confusing the wifi stack in the ESP32 and eventually it crashes when buffers get to large.

There is every reason to think the wifi stack in the ESP32 may have bugs and when you combine bugs in ESP32 with bugs in wifi router you will get crashing as buffers overflow etc...  Either router locks up and need restarting or the ESP32 reboots.

Try a different router at your country house.
« Last Edit: October 21, 2023, 10:04:30 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #13 on: October 20, 2023, 12:08:07 pm »
Thank you for your ideas.
The truth is that I am eager to try all the proposed options, unfortunately at the moment I do not have a scheduled date to go there.

Faraday cage.
Router.
EMI filter.
Powered by external battery.
Condenser installation.....

I'm sure some option will solve the problem. I am betting on interference from the electrical grid input, since there have been many water restrictions due to its scarcity and several neighbors are using electric pumps that, if not properly installed, can cause a lot of noise.
As for the result, I'll let you know, and if anyone comes up with something else, I'd be happy to try it.
 

Offline BBBbbb

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Re: ESP32 stop be stable when it is installed in another location
« Reply #14 on: October 20, 2023, 12:45:50 pm »
How about something simpler like an unhandled (in SW) unexpected input from the sensors that occurs there on the real system, but not at the test environment at home?
But yeah first instinct is power issue and trying from a battery.
 

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #15 on: October 22, 2023, 02:43:29 pm »
Hi BBBbbb if you read
My first post i sayd that I did it without success.The batery is a good idea I will try.
« Last Edit: October 22, 2023, 02:46:42 pm by Fermin1989 »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: Fermin1989

Offline Fermin1989Topic starter

  • Newbie
  • Posts: 8
  • Country: es
Re: ESP32 stop be stable when it is installed in another location
« Reply #17 on: October 24, 2023, 07:32:26 am »
Good and bad news, let's start with the good, I have been in my country house very briefly and I have managed to do a few tests.
- External battery test result, everything perfect, no reset.
- Second EMI filter test after power input, everything perfect for more than 48 hours without any problem and until now it continues without problems, (I have left the EMI filter installed).
Now the bad news, there is water in the area and there are no cuts and therefore no one uses water pumps anymore.
Conclusion: There is no problem with the software or hardware under these conditions. I will have to wait until they see water restrictions again to find out if anything has changed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf