1
\$\begingroup\$

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.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Welcome to EE.SE! Please draw a block diagram or even better a schematic. There is a built in schematic editor here if you click on edit and the schematic symbol. It sounds like you are suffering from the very common lack of decoupling and/or bad layout. Please show your layout. Also, please note that there is no voltage load from motors (in any normal sense), only current load, or just load in normal speaking terms. \$\endgroup\$ – winny Jun 5 at 8:03
  • \$\begingroup\$ Schematic added. \$\endgroup\$ – Debarshi Das Jun 5 at 8:56
  • 1
    \$\begingroup\$ Hi! Can you describe when exactly does your MCU reset? Is it all the time, only when the drivers are connected, or only after it enables the motors? Does your MCU also have ceramic (i.e. 100nF) decoupling capacitors besides the big ones shown in the schema? \$\endgroup\$ – akwky Jun 5 at 9:09
  • 1
    \$\begingroup\$ Please explain how many cells are in your 8 volt battery. \$\endgroup\$ – Andy aka Jun 5 at 9:37
  • \$\begingroup\$ MCU resets when motors are enabled. I don't have any ceramic capacitors in my circuit. Also, my battery pack contains 2 18650 lithium cells producing approx 8v. \$\endgroup\$ – Debarshi Das Jun 5 at 9:49
0
\$\begingroup\$

I would say you could use some larger capacitance next to nodemcu. Also, make sure the battery is OK with current spikes you want. Don't forget the more current you draw, the greater the voltage drop on the output due to internal resistance of the battery (battery is always a voltage source + resistor in series, that resistance varies from battery to battery a lot). If your voltage converter doesn't allow you to have large output capacitance, which can be the case, I would probably try to put a beefy diode on buck converter's output in the direction of NodeMCU and then a large capacitor after the diode. If you care about voltage drop, maybe some beefy schottky. Some 1n5817/1n5818/1n5819 from ebay diode sets should do the trick, they have like 0.15V-0.2V voltage drop, which you probably won't care about(?). Try some smaller electrolytic capacitor first (make sure it's correctly polarized). And of course your little decoupling cap must stay there, it plays a different functional role.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.