0
\$\begingroup\$

Even though it seems to be a common question, but I just can’t find a detailed answer on the Internet after days searching. I’ve been working on this problem for months up until now.

I’m making an electric vehicle remotely controlled by an ESP32. The chip is sharing power with 4 6V DC motors, 2 SG90 servos and 1 28byj-48 stepper motor. The DC motors are controlled by an Adafruit Motor Shield V1 and I’ve soldered 4 104 microfarad ceremic caps to each of the motor. Also, every other components in the circuit have at least 350 microfarad wired in parallel to them. All motors are back-emf protected using a flyback diode.

Problem: ESP32 reset due to electrical noise from motor (When a motor runs, the red LED on the chip dims lightly, and the brownout detector reset the chip when sufficient voltage drops below a threshold).

Question: Should I try using a bigger bypass capacitor, or use a separate power supply (Still ground connected) for the motor and control section? Is separate power supply like this common in the industry? In the long run, I’m gonna add more motors and microcontrollers to the system, and I want to complelely solve this brownout problem for maximum reliability. Thank you for your suggestion.

\$\endgroup\$
5
  • \$\begingroup\$ Assuming the power supply can supply enough current, the brownout is likely to be due to voltage drop across the power wires. Do you have separate wires from the PSU for the power to the ESP32 and the power to the motors? \$\endgroup\$ Commented Jul 12, 2023 at 11:36
  • \$\begingroup\$ @AndrewMorton I’m using 6 AA battery that can supply 9v 3000mWh (not mAh). I’m using an Adafruit motor shield to distribute power between components (and drive the 4 DC motors). ESP32, servos and stepper motor each takes power from the 5v pins on the shield. I also have bypass caps between each component and the shield, as mentioned in the post. \$\endgroup\$
    – Speh
    Commented Jul 12, 2023 at 11:47
  • \$\begingroup\$ What is the voltage across the battery when at maximum current draw? \$\endgroup\$
    – HandyHowie
    Commented Jul 12, 2023 at 11:52
  • \$\begingroup\$ @HandyHowie It won’t get below 8.6v. I’ve just tested it \$\endgroup\$
    – Speh
    Commented Jul 12, 2023 at 12:15
  • \$\begingroup\$ There are Adafruit guidelines for Powering your DC motors, voltage and current requirements. \$\endgroup\$ Commented Jul 12, 2023 at 12:33

2 Answers 2

2
\$\begingroup\$

Yes, a separate power supply is common in high noise environments. Usually there is a single point where the two grounds are tied together. The uC supply is doing the same job as the diode-and-capacitor filter mentioned above, making sure the uC has a stable operating voltage.

Another issue is radiated noise. Long power wires make excellent antennae for motors, radiating noise into reset inputs, write strobes, etc. Look for opportunities for twisted pairs, and consider putting the uC in a shielded box or adding a shield can to an area of the pc board.

\$\endgroup\$
1
\$\begingroup\$

Your power rails are likely suffering from transients produced by the motors. These transients being long enough to cause your control chip to reset. Simply adding more output capacitance will likely not solve the problem, especially when you add more motors. Instead you must separate your supplies. they keyword here being PSRR (power supply rejection ration).

You can feed the esp with a diode and place a cap directly across the esp. That way transient voltage drops won't make it all the way to the esp. The cap obviously needs to be large enough to supply the esp during those glitches.

Alternatively if transients aren't very large you can use an LDO instead of a diode. Choose one with a with a high PSRR.

Or if all else fails you can simply use a second independent power supply.

In any case get a scope so you can see what you are dealing with. You can measure the transients and decide which approach is best suited to defend against them.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for your answer! I’m just wondering whether using separate power supply is common for these “fairly” high voltage system? I don’t have enough knowledge to go against the standard 😅 \$\endgroup\$
    – Speh
    Commented Jul 12, 2023 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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