In this tutorial, we will see how we can interface Stepper Motor with Aries v2.0 Board by using A4988 Stepper Motor Driver.

Stepper Motor

A stepper motor, also known as a step motor or stepping motor, is an electromechanical device that converts electrical power into mechanical power and it is also called as a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor’s position can be commanded to move and hold at one of these steps without any position sensor for feedback (an open-loop controller), as long as the motor is correctly sized to the application with respect to torque and speed.

Stepper Motor

A4988 Stepper Motor Driver

The A4988 is a complete microstepping motor driver with a built-in translator for easy operation. It is a microstepping driver for controlling bipolar stepper motors which have a built-in translator for easy operation. This means that we can control the stepper motor with just 2 pins from our controller, or one for controlling the rotation direction and the other for controlling the steps. It is designed to operate bipolar stepper motors in full-, half-, quarter-, eighth-, and sixteenth-step modes, with an output drive capacity of up to 35 V and ±2 A.

A4988 Stepper Motor Driver

Circuit Diagram:

Connections:

Note: We have to connect A4988 driver with external power supply i.e. VMOT pin of driver to +10V of external power supply with the ground connection followed by RST & SLP pins short as shown in circuit diagram.

Stepper MotorA4988 Stepper Motor DriverAries V2 Board
Wire 12B
Wire 22A
Wire 31A
Wire 41B
STEP GPIO1
DIR GPIO0
VDD +5V
GND GND
Connection pins of Stepper Motor & ARIES v2.0 Board with A4988 Stepper Motor Driver

Now, for powering up the ARIES v2 board via USB port of a Laptop/Desktop/PC and burning the code into the ARIES v2 board, we have to use a micro-USB type B to USB type A cable. The cable should be connected to UART0 port of the ARIES v2 board, and the Laptop/Desktop/PC should be preinstalled with VEGA SDK and Toolchain.

Procedure:

After setting up the toolchain and SDK path environments, clean the executable using make clean command.

cd examples/gpio/stepper_motor_pgm/
make clean

Build the example program for Stepper Motor by using make command

make 

Before transferring the built program to board, ensure that you have connected the UART0 connector of the board to the PC.

Open a new terminal, execute the following command

sudo minicom aries

Now you can see the minicom terminal opened and the board UART terminal is ready.

Press Reset Button to set the Aries Board.
Press CTRL+A and then press S to enter the file sending menu and select xmodem by pressing Enter as follows:

In the next window, with the space bar select the  file stepper_demo_pgm.bin to be transferred, by pressing Enter, the transfer process starts.

Wait until the process is completed. The screen should display how much data has been transferred.

After completing the transfer the Program will start to execute.

Output:

The Motor shaft will start to rotate.

Leave a Reply

Your email address will not be published. Required fields are marked *