This is the diagram of an Unipolar Stepper Motor with the 5-wire connector at right. The most used Unipolar stepper is the 28BYJ-48-5V pictured below and this is the target of my 7x5WStepper Hat.
This is a high quality/low cost stepper available for < 2.-USD. I purchased one for test and was quite take by its performance. It is silent and its 64 steps/turn is better than you expect due to the build in gear that also makes it strong. It is a bit slow, but all-in-all this is a really excellent stepper motor which is why I decided it needed it’s own control Hat.
Running this is dead simple as you apply 4 steps in sequence.
Reversing the sequence will run the Stepper in the opposite direction. The algorithm have some similarities to trapsoidal on a 3-phase, but the difference is that 1 step moves the motor one step due to the strong cogging in these motors.
To assist us I will create 2 C++ classes. One is hGPIO that wire up the pins, and the second is hStepper that takes the pins and steps. So with an array of 7 x hStepper I should be able to run 7 steppers simultaneously.
What is interesting with this is that one Hat control 7 steppers, 2 Hat’s 14 steppers and so on. And as the Steppers are low cost it is realistic to build some advanced robotic Experiments.