I designed this stepper motor with eight electromagnets, six neodymium magnets, with a 3d printed rotor and stator housing. This is specifically a permanent magnet stepper motor capable of 15 degree full steps and 7.5 degree half steps. There are many different types of stepper motors but most of them work very similar to the one I have designed here. This is an educational display to show others how stepper motors work. I designed this to run on a 5-12VDC power supply so it will work with most USB power supplies.
0.315mm Magnet Wire
Diameter not critical.
8d 2-3/8" nails
Not critical what nails you use as long as they fit.
Use a compass to determine the poles of your magnets and glue the magnets with the north poles facing outward. If your magnets are strong enough, the compass on some smartphones will show you the polarity of the magnets.
Press fit the bearing into the stator and then press the rotor into the bearing. I was pleasantly surprised how well the bearing press fit into the stator. When 3d printing, holes tend to want to shrink inward and end up smaller than expected so I usually oversize them a bit.