Did I do this circuit diagram correctly?
I'm sorry to say, you need to go back to the drawing board.

An Arduino Uno (i.e., ATMega328P) can only sink or source an absolute maximum of 40mA through any one of its IO pins, and Atmel only guarantee up to 20mA.

That is not enough current to power (or sink power from) things like motors, electromagnets, etc.

You need to switch the motors etc with transistors, and add flyback diodes to absorb the induced back EMF from the collapsing magnetic fields.

Treat them like you would a relay - google "Arduino Relay" for how to do that.

Also, your regulators make no sense, and your batteries are backwards.