I have made a wifi controlled car using nodemcu. It works fine if I connect nodemcu to a separate 5v supply.
But if I use the same power supply for both the motors and nodemcu, it resets automatically sometimes when the load is high & I lost my wifi connection with the mobile.
I am using L298 motor driver to drive 4 plastic geared motors and two 18650 battery (8v Approx).
Reset happens when I use inbuild 5v supply from L298 to power up the nodemcu. Also, I tried a separate 7805 regulator for nodemcu, but same problem.
I believe this problem happening due to high load on motors. But I don't want to use a separate power supply for nodemcu since my space is very small.
simulate this circuit – Schematic created using CircuitLab