I'm new to this community and joined it because I'm looking for some help regarding ESP8266 modules.
I've created my own ESP-driven WiFi socket (github page is available here)
The code works, the relay controlling AC power for connected devices switches properly when requested as long as nothing is connected to the socket, or the device connected doesn't generate much electromagnetic noise (or so I think).
The things that I have tested to work are: hair-dryer, vacuum-cleaner, small desk lamp, electric heater, phone charger.
All of those can be switched on and off without any problem and it's been more than one year since I've started using my WiFi sockets.
But yesterday I've decided to connect portable fan (like this).
Turning the relay on causes ESP to reset (not always, usually 20% of requests are broken).
I've tried to look for the cause of this and it's definitely not a software issue. When debugging ESP (connected to computer via UART) I get random characters on screen the moment relay (with connected fan) is turned on. Characters appear in terminal regardless of the operation outcome (when they appear ESP does not necessarily reset).
If the ESP "decides" to reset, it hangs itself for about 2-3 seconds and then the hardware watchdog restarts it. It looks as if the software hangs but it happens even when there's no application running (clean software flashed) and I'm manually changing gpio's state via nodemcu commands (I'm using 1.5.4.1-final nodemcu branch).
The problem exists regardless of the ESP type chosen (I've tested ESP-01 and ESP-07). Right now I'm waiting for WeMos D1 mini to arrive and will check that in a few days.
Do you have any idea what may be causing those resets? I don't have oscilloscope so I'm unable to check for any voltage drops (still, I've added capacitor between Vcc and GND).
I'd like to mention that I'm aware of similar threads (here or here) but would still appreciate some help.