user52537: My Wemos card is reseting for unknown reason. For example, the pump plugged on the relay works fine till 1am and then the pump stop. After a few research I figured out the ESP should reset because all internal parameters are reseted.

My hardware is simple Wemos card + relay + sensors (not here because not connected yet).

My program is quite complex. I can command/configure the wemos via webservice (ex relay on pin 5 with on 5min/off 10min).
https://github.com/TittyPanda/ESP-commander/blob/master/ESP-COMMANDER

OK if no AC device is connected on relay (no reset)
OK if a light is connected on relay
The issue occurs only when the water pump is connected

Maybe it's an electrical/electromagnetical thing because the pump has motor. What do you think ?
Thanks,
EDIT
Power part are done with common wires from power extension cord
AC-DC converter 5 V 1A 1.5A 500mA

Pump 40W 3000L/H 220V 50Hz


user14490: Try add some power filter like this:


Between the breadboard and ESP board. 

52537: <p>My Wemos card is reseting for unknown reason. For example, the pump plugged on the relay works fine till 1am and then the pump stop. After a few research I figured out the ESP should reset because all internal parameters are reseted.
<a href="https://i.stack.imgur.com/jijaJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jijaJ.png" alt="enter image description here"></a></p>

<p>My hardware is simple Wemos card + relay + sensors (not here because not connected yet).
<a href="https://i.stack.imgur.com/yoMOa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yoMOa.png" alt="enter image description here"></a></p>

<p>My program is quite complex. I can command/configure the wemos via webservice (ex relay on pin 5 with on 5min/off 10min).
<a href="https://github.com/TittyPanda/ESP-commander/blob/master/ESP-COMMANDER" rel="nofollow noreferrer">https://github.com/TittyPanda/ESP-commander/blob/master/ESP-COMMANDER</a></p>

<ul>
<li>OK if no AC device is connected on relay (no reset)</li>
<li>OK if a light is connected on relay</li>
<li>The issue occurs only when the water pump is connected</li>
</ul>

<p>Maybe it's an electrical/electromagnetical thing because the pump has motor. What do you think ?</p>

<p>Thanks,</p>

<p><strong>EDIT</strong>
Power part are done with common wires from power extension cord</p>

<p><a href="https://fr.aliexpress.com/item/32800561583.html" rel="nofollow noreferrer">AC-DC converter 5 V 1A 1.5A 500mA</a>
<a href="https://i.stack.imgur.com/E583J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E583J.png" alt="C-DC converter"></a></p>

<p><a href="https://www.amazon.fr/gp/product/B07B8MHYCP" rel="nofollow noreferrer">Pump 40W 3000L/H 220V 50Hz</a>
<a href="https://i.stack.imgur.com/rabHp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rabHp.png" alt="Pump"></a></p>
 14490: <p>Try add some power filter like this:
<a href="https://i.stack.imgur.com/xXRju.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xXRju.png" alt="An LC filter"></a></p>

<p><a href="https://i.stack.imgur.com/2meRd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2meRd.jpg" alt="Filter image"></a></p>

<p>Between the breadboard and ESP board. </p>
