Mega2560 keeps restarting due to another system issue

ESP32, relay, and water pump form another system, both of which have independent power sources and no connection. ESP32 controls the relay to run and stop the water pump. As long as the water pump is turned on or off for a moment. Mega2560 may restart. Is it electromagnetic interference? Is mega2560 so fragile? How to solve it?

Most probably, yes.

Solution depends on the precise situation. Add a snubber to each relay, spike filters to each input line...

I am a beginner learner, and I am curious. After so many years, is there no standard solution to this common problem。

Yes, there is, but:

However, a good starting place for a 'standard' solution would be:

To give more useful hints, it would help if you posted a schematic of your system and a good photo that shows how everything is connected.

There are standard techniques, taught for decades in advanced circuit design courses. Look up "power supply decoupling". In your case, the restart is caused by the pump starting, leading to a voltage drop in the (probably inadequate) power supply.

Start by looking up the voltage and current requirements of every component in your project. With motors, the fully loaded average and maximum current draw (the start/stall current) must be known.

Thank you everyone. I have bought magnetic beads, magnetic rings, metal covers, absorbing materials,spike filters, and arc extinguishers. I don't know which one works, let's see God's choice.

That's one way of approaching the matter.
I'd suggest a different route, which would start with a schematic of your project and a photo of how it's wired, and then taking the measures aimed at resolving the problem for your specific use case.

You may have to buy more stuff.
You have bought some stuff you don't need.

More complex and cumbersome than I imagined. I suspect that every part will have an impact on other parts. If a slightly more complex system could run, I think, um, thank God, good luck.

If the power supply is inadequate, those won't do anything useful.

For help, you need to provide much more information about your project.

To an extent, yes. Some of those impacts are significant and need to be managed, some we can safely ignore. Which is which depends on the specific setup/system/installation.

quite possibly right down to the gauge of wire used in particular sections of your supersecret system.
Good luck.

The first experiment used magnetic beads. Switch on and off 30 times, there is a problem once. Not using magnetic beads causes approximately one problem every 5 times. The effect is really obvious.

The magnetic ring effect is not good, I don't know why.

I am on the lazy side I use Solid State relays with Zero cross for AC loads up to 480 Volts AC. I use them for DC but not much experience above 60V.

Thank you, I didn't know about this method yet. I have bought a brushless water pump, and it is said that the brushless water pump will not have electromagnetic interference.

---- Replied Message ----

From | gilshultz via Arduino Forumnotifications@arduino.discoursemail.com |

  • | - |
    Date | 05/05/2024 00:32 |
    To | hafome3@163.com |
    Cc | |
    Subject | [Arduino Forum] [Using Arduino/Motors, Mechanics, Power and CNC] Mega2560 keeps restarting due to another system issue |

| gilshultz Tesla
May 4 |

  • | - |

I am on the lazy side I use Solid State relays with Zero cross for AC loads up to 480 Volts AC. I use them for DC but not much experience above 60V.

The pump may not but the relay contacts when opening and closing can generate a lot of noise (EMI).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.