Using the Arduino Shield listed, connect the circuit shown in the https://bit.ly/2MXQdYd">Arduino Project Hub project, noting the following differences.
1) Arduino pins 10 and 11 are connected to the prototype shield LEDs
2) The switches are connected to Arduino pins 12 and 13
3) Arduino pin 9 is connected to the base of the TIP120
Also, I don't have an external DC jack for the 12VDC supply, but just plug 12VDC into the Arduino's jack and use Vin.
The screw terminal is just for convenience; you can solder the electromagnet wires to the shield (but then you can't easily use the magnet for other projects :-)
Use the openSCAD files to generate the upper magnet support and the base.
I printed the parts on a MendelMax 2, but most any printer should work. No special settings, printed in PLA.
You may need to change the diameter for the dowel if you haven't got a 33 mm dowel available.
The 3/8" nuts should fit in the hexagonal recesses in the upper support.
I printed knurled knobs for the 3/8" bolts, but they are not absolutely necessary.
The Arduino program may need tweaking for the Kp, Ki, and Kd parameters depending on the weight and neodymium magnet used.