Arduino resetting randomly

I built a 3D printer and I’m using an Arduino Nano to controll it. I’m using some easydrivers to control the stepper motors and an irf530n MOSFET to power the heater. It works perfeclty, but sometimes the Arduino Nano resets. There is nothing conneted wrong. Any idea?

Schematics: Imgur: The magic of the Internet

Obs: +12V is a PC power suply, and +20V is a notebook charger.

Obs 2: It is a 3D printer, the code is too big fot put here, but in it, the Arduino talks to a c#application via Serial Port (baud: 115200)

Any idea?

Several!

Read and follow the instructions in the "How to use this forum" post.

Post a hand drawn wiring diagram, and links to your components.

State the power requirements of all the components, and the specs on the power supply.

Post the code, using code tags.

jremington:
Several!

Read and follow the instructions in the "How to use this forum" post.

Post a hand drawn wiring diagram, and links to your components.

State the power requirements of all the components, and the specs on the power supply.

Post the code, using code tags.

done....

Post the schematics here please. Many people won't follow external links for security reasons, among others...

Thank you guys, I solve it by adding a 10uF capacitor between reset and GND.