arduino hangs due to brushless motor backcurrents

Hello all, I have been working on controlling brushless motors for a drone project. I have been facing issues related to arduino getting stuck at certain times. My observations are that this happens whenever a very large change in a motor speed occurs. The curent power supply to the arduino is through the BEC circuit in ESCs attached to the arduino's Vin. Can somebody suggest a way to test this hypothesis and suggest a way out? Thanks for your time!

I would want to perform the same test with the arduino powered from an independent source. USB power stick is a common way to test this.

I tried using a separate 9V battery attached to Vin. Still the same trouble. I found out that sometimes the code freezes without high changes in motor speeds. So the problem seems somewhat different from what I initially anticipated. Still could try using options couplers to completely isolate everything high power.

Are you running 5 volts into the VIN pin from the Bec? Should be 7 to 12. What kind of battery are you powering everything with? The Arduino vin is going to a 5v regulator so there's no need to use the 5v regulator on the ESC unless you are using too high a voltage for the Arduino one.

Use nice thick wires run all grounds back to a central point as close to the main battery as possible. If using an external battery make sure the grounds are connected. Would really have to know more of the setup to help more. Details of the motors, batteries, wiring etc.

I'd never power anything from an ESC's BEC, I've seen too many ESC's just explode into flames... Besides the ground currents in the supply to the ESC is massive and will inject lots of interference.

Separate power for Arduino, common the ground with the ESC's at one point only where the 3 pin connectors come in. No other electrical connections between the ESC circuitry and the Arduino (except perhaps a resistor- divider voltage sensing circuit or an isolated hall-effect current sensor.