user54862: I am driving motors for my line-follower project . The circuit schematic is given below 
The power source is a 11.1V 2200mAh 25C Lipo . Practically the cells give 11.5-12V. I used a switching buck regulator to step down the voltage. However , when i run my robot on track after few seconds,the arduino tends to reset and run again. This problem typically arises when i drive the motors at higher PWM(above 180 on analogWrite function). Since i use PID, limiting the PWM means i have to drive at lower speeds which i do not want.
I am providing links for the items i used for my circuit:

buck converter;
motor driver;
IR sensor module;
DC motors.

The sensor array draws 150mA at peak. Any suggestions as to where the problem might lie would be of great help. Thank you . 
EDIT 1: Changed the input voltage Vin to 7.9V through the buck converter . 
        The problem still persists . 

user313: Resetting is due either to a software bug or voltage sag, and since it correlates with driving the motors harder, it's almost certainly the latter. You probably suspected as much since you mentioned the current draw of the sensor array. A quick experiment - disconnecting the sensors (and possibly a software patch to keep the robot running straight, without them) might help you discover the reason.
Each chip and each of its pin drivers has a current budget. It would be a good idea to look at the max current spec of the Atmega2560 and its pin drivers, and any other current specs mentioned in the datasheet, and make sure you're not trying to run it out of spec. The buck converter will have a limit, too, so make sure you're within its spec. If the output regulation of the buck converter is good enough, you can regulate it to 5v and bypass the Mega's on board regulator, for another saving.

user55178: This is the common issue when trying to connect power and digital circuits together. Probably, when motor starts, there is a short-time voltage drop in Vin due to high motor start current. Consider to use Schottky diode and capacitor to protect digital power circuit from transitional currents.

user50469: The VIN pin goes to a 5V voltage regulator on the Arduino and needs at least about 7V minimum to work properly.  If you want to supply 5V to an Arduino do it either on the 5V pin or via the USB connector.  The VIN pin should receive 7V to 12V.

54862: <p>I am driving motors for my line-follower project . The circuit schematic is given below <a href="https://i.stack.imgur.com/7bVmC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7bVmC.jpg" alt="Circuit schematic"></a></p>

<p>The power source is a 11.1V 2200mAh 25C Lipo . Practically the cells give 11.5-12V. I used a switching buck regulator to step down the voltage. However , when i run my robot on track after few seconds,the arduino tends to reset and run again. This problem typically arises when i drive the motors at higher PWM(above 180 on analogWrite function). Since i use PID, limiting the PWM means i have to drive at lower speeds which i do not want.</p>

<p>I am providing links for the items i used for my circuit:</p>

<ol>
<li><p><a href="https://www.amazon.in/LM2596S-Converter-Module-Supply-1-23V-30V/dp/B0784PYZ97/" rel="nofollow noreferrer">buck converter</a>;</p></li>
<li><p><a href="https://www.amazon.in/Generic-E_14013096-Tb6612Fng-Arduino-Microcontroller/dp/B01DAA6GMC/" rel="nofollow noreferrer">motor driver</a>;</p></li>
<li><p><a href="https://www.amazon.in/Products-Channel-Analogue-Digital-Follower/dp/B07GXL5L7J/" rel="nofollow noreferrer">IR sensor module</a>;</p></li>
<li><p><a href="https://www.amazon.in/Invento-Kg-cm-Shaft-Torque-Geared/dp/B07CKMFYDG/" rel="nofollow noreferrer">DC motors</a>.</p></li>
</ol>

<p>The sensor array draws 150mA at peak. Any suggestions as to where the problem might lie would be of great help. Thank you . </p>

<p>EDIT 1: Changed the input voltage Vin to 7.9V through the buck converter . 
        The problem still persists . </p>
 313: <p>Resetting is due either to a software bug or voltage sag, and since it correlates with driving the motors harder, it's almost certainly the latter. You probably suspected as much since you mentioned the current draw of the sensor array. A quick experiment - disconnecting the sensors (and possibly a software patch to keep the robot running straight, without them) might help you discover the reason.</p>

<p>Each chip and each of its pin drivers has a current budget. It would be a good idea to look at the max current spec of the Atmega2560 and its pin drivers, and any other current specs mentioned in the datasheet, and make sure you're not trying to run it out of spec. The buck converter will have a limit, too, so make sure you're within its spec. If the output regulation of the buck converter is good enough, you can regulate it to 5v and bypass the Mega's on board regulator, for another saving.</p>
 55178: <p>This is the common issue when trying to connect power and digital circuits together. Probably, when motor starts, there is a short-time voltage drop in <strong>Vin</strong> due to high motor start current. Consider to use Schottky diode and capacitor to protect digital power circuit from transitional currents.<a href="https://i.stack.imgur.com/YLzQf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YLzQf.png" alt="enter image description here"></a></p>
 50469: <p>The VIN pin goes to a 5V voltage regulator on the Arduino and needs at least about 7V minimum to work properly.  If you want to supply 5V to an Arduino do it either on the 5V pin or via the USB connector.  The VIN pin should receive 7V to 12V.</p>
