Variable Electromagnet Winder
For a recent project, I needed 15 electromagnets of approximately the same strength. Using some simple electronics and programming this electromagnet winder came to be. With configurable coil counts and a handy printable modular body, it is simple to build and use giving you whatever strength electro magnet you need for the job.
Supplies
Arduino Uno
Stepper Motor (a ELEGOO 28BYJ-48 ULN2003 5V with driver board was used In this project)
Micro Linear Actuator
2 small elastic bands
Small Bread Board
Jumper Cables
Roll of magnet wire (38 AWG/ 0.10mm used here)
A computer with Arduino ide
Nail with a 2mm Shank Diameter 15-20mm long
Super Glue
4 Small screws
A 3D Printer to print the body
Screwdriver
Wire Cutters
Print and Collect the Components
Using the included STL Files print the base, connector, core, and cover. Print a core for every magnet that needs to be made. Collect all other supplies mentioned above and set them to the side.
Assembly
Mount the linear actuator using the 4 screws, and make sure the cables lead towards the closest side of the print. Next seat the stepper motor into its support, then secure it using a rubber band.
Upload the Program and Wire the Electronics
Install the Arduino ide program if you do not yet have it. Under the tools tab make sure the port and board settings are correct. Paste the code below into the sketch area. Note the “Changeable lines of code” section. Here is where you can set the number of passes and coils per pass. Once the program is loaded, wire the components together as shown below and see if the linear actuator and stepper motor move as expected.
Wiring:
Stepper motor----------- Arduino---------- Linear actuator
Power--------------------------5v------------------- Power
Ground------------------------Ground------------ Ground
IN1------------------------------8
IN2------------------------------9
IN3------------------------------10
IN4------------------------------11
----------------------------------13--------------------- Signal
Code:
Downloads
: Load a Core and Start the Program
With the Arduino unplugged, put the roll of magnet wire onto the post. Feed the wire from the spool, loop it through the tensioning hole and the linear actuator, and finally feed it through the core as shown below leaving a couple of cm of lead. Place the connector on the shaft of the stepper motor, load the nail into the core and align it with the connector, the elastic band should make this process easier because you can tilt the stepper motor up as needed. Secure the core into place using the cover and another rubber band.
Run the Program and Prep the Finished Coil
Once the core is mounted plug the Arduino in and the program should begin to run. Note that these stepper motors are not fast, and a big coil can take up to 3 hours to wind. The program will stop once complete so leave it winding somewhere it can be checked on occasionally. The first lead that was left sticking out in step 4 will likely wrap around the nail, this is ok if it doesn’t knock the core off the stand. Once the program is complete put a drop of superglue on the coil to prevent unwinding. Pull the coil out and clip the wire off, this wire can now be glued into place in the groove beside the hole in the core the first wire was fed through. Sand the insulation off the leads and your electromagnet is now good to go.