Very important warning
Never connect anything to anything with power connected. Always physically disconnect the power source before connecting any electronics components. The 12V line on SmartMini is always live when a power source is connected. Accidentally connecting 12V to a 5V line, even for a fraction of a second, will destroy the Arduino Pro Mini.
You, like me, will ignore this advice. You, like me, will destroy things (many things in my case). You,like me, will learn a salutary lesson!
Connecting the motor to SmartMini-SA
The A4988 stepper driver module is suitable for four wire motors so, please don’t try it with motors with 5, 6, 8 or any other number of wires.
The technical spec for you motor will show a diagram like the one above.
The motor has two coils with the ends labelled either with colours or as 1A. 1B, 2A, 2B – or both!
The key thing is that the wires are pairs.
The motor terminals on SmartMini-SA are labelled 1B, 1A, 2A, 2B so, if your motor spec shows the same labelling system, you know what goes where!
If your motor spec uses colours just connect one pair to 1A and 1B and the other to 2A and 2B. In the example above, black would go to 1A, green to 1B, red to 2A and Blue to 3B.
Having said all this, it is quite possible the motor will rotate the wrong way – but don’t worry, we will fix that later.
The two wires from the micro switch go to the two terminals labelled „Home“ – it does’t matter which wire goes to which terminal – it’s a switch – it is normally „open“ but get’s closed when the work holder crashes into it. (Sorry, not „crashes“ – „touches“!)
We will leave power until the next step. Don’t connect power yet and don’t switch on!