CNC machine, music fountain and other industrial automatic equipment.

0 comments

Connect to the motor controller.

Bipolar stepper motor controllers have four screw terminals for the motor (usually two on each side) and three screw terminals on the front for Voltage in (Vin), ground (GND) and 5v. Do not connect anything to the 5v terminal. Plug your power supply to Vin and GND.

The motor terminals will be labelled in one of the following ways:

OUTA, OUTB, OUTC, OUTD

OUT1, OUT2, OUT3, OUT4

MOTA, MOTB, MOTC, MOTD

MOT1, MOT2, MOT3, MOT4

If you need help with this leave a comment at the bottom of this page and I will get back to you with some help.

You will need to use two GPIOs to enable your motor and four GPIO pins to drive the stepping sequence. You can use a jumper on the enable pin (ENB) to save using an extra two GPIOs but this tutorial and the code we will write uses dedicated enable wires.

Which GPIO pins you choose is not important as long as you change the pins in the code to suit.

The motor controller should have four pins called in1, in2, in3 and in4, as well as two ENB pins. If the ENB pins have jumpers attached, remove them.

If you use different pins you will need to change the code to suit.

Leave a comment

All blog comments are checked prior to publishing
You have successfully subscribed!