Maker.io main logo

Control Stepper Motor Using EDP Stepper Component - Visuino

2026-04-10 | By Ron Cutts

License: GNU Lesser General Public License Microcontrollers Motors Stepper Arduino ESP32

In this tutorial, we are going to control a stepper motor Nema 17 by using a 3rd Party EDP stepper component in Visuino.

The EDP stepper component was created by Jim Ryan. You can read more about this component on his Patreon page, where you can also support his work.

Learn more about Visuino: What is Visuino

What You Will Need

  1. Arduino UNO (Or any other Arduino)

  2. Stepper motor NEMA 17

  3. A4988 Stepper Motor Driver or (DRV8825)

  4. DRV8825/A4988 Stepper Driver Expansion Module

  5. Jumper wires

  6. Power Supply 12V

  7. Visuino software: Download here

  8. Install Stepper Ramp EDP component. Download here

What You Will Need

What You Will Need photo 2

What You Will Need photo 3

What You Will Need photo 4

What You Will Need photo 5

What You Will Need photo 6

What You Will Need photo 7

What You Will Need photo 8

What You Will Need photo 9

The Circuit

  1. Arduino Digital Pin 2 will be used for Steps

  2. Arduino Digital Pin 3 will be used for Motor Direction

  3. Optional - Arduino Digital Pin 4 can be used for driver pin Enable

If using a Stepper Motor Driver Shield:

  1. Connect the Motor Shield GND pin to the Arduino negative pin [GND]

  2. Connect the Motor Shield [5V] pin to the Arduino positive pin [5V]

  3. Connect the Motor Shield GND pin to the Power Supply negative pin [GND]

  4. Connect Motor Shield [9V] pin to Power Supply positive pin [+]

  5. Connect the Motor Shield pin[S] to the Arduino digital pin [2]

  6. Connect the Motor Shield pin[D] to the Arduino digital pin [3]

  7. Connect the stepper motor as shown in the picture.

If using a Stepper Motor Driver 8825:

  1. Connect the DRV8825 GND pin to the Arduino negative pin [GND]

  2. Connect the DRV8825 DIR pin to Arduino digital pin [3]

  3. Connect the DRV8825 STEP pin to Arduino digital pin [2]

  4. Connect the Power Supply for the motor to the DRV8825 VMOT and GND

  5. Connect the Capacitor across VMOT and GND

  6. Connect the stepper motor as shown in the picture.

Note: If you plan to use Pin for Enable, then connect it to Arduino digital pin [4] or any other free digital pin

The Circuit

The Circuit photo 2

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino as shown in the first picture. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino. When the dialog appears, select "Arduino UNO" as shown in Picture 2

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type photo 2

In Visuino, Add Components

  1. Add "Stepper Ramp EDP" component

  2. Add 3X "Integer Value" component

In Visuino Add Components

In Visuino Add Components photo 2

In Visuino Set Components

  1. Select "IntegerValue1" and in the properties window under "Value" set the Speed of the motor. In our case, we will use 1000

  2. Select "IntegerValue2" and in the properties window under "Value" set the Acceleration Speed & Deceleration Speed of the motor, so-called Ramp Up and Ramp Down, where you set how many steps it should accelerate and decelerate. In our case, we will use 1000

Note that if you do not want to use the ramp-up or ramp-down of the stepper motor, then just don't use this step

  1. Select "IntegerValue3" and in the properties window under "Value" set the number of steps, in our case, we will use 8000

In Visuino Set Components

In Visuino Set Components photo 2

In Visuino Set Components photo 3

In Visuino Connect Components

  1. Connect "IntegerValue1" pin [Out] to "StepperRampEDP1" pin [Frequency]

  2. If you plan to use Ramp Up & Ramp Down, then connect "IntegerValue2" pin [Out] to "StepperRampEDP1" pin [Ramp Steps]

  3. Connect "IntegerValue3" pin [Out] to "StepperRampEDP1" pin [Total Steps]

  4. Connect "Start1" to "StepperRampEDP1" pin [Start]

  5. Connect "StepperRampEDP1" pin [Ena] to Arduino digital pin [4]

  6. Connect "StepperRampEDP1" pin [Dir] to Arduino digital pin [3]

  7. Connect "StepperRampEDP1" pin [Pul] to Arduino digital pin [2]

In Visuino Connect Components

Generate, Compile, and Upload the Code

In Visuino, at the bottom, click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Generate, Compile, and Upload the Code

To Use Return Type (Dir)

To return the motor position to the start after it finishes the steps, we can select "StepperRampEDP1" and set "Return Type (Dir)" to true. This means that when it finishes the steps, if you start it again by sending the clock pulse to the "Start" pin, it will reverse and do the same number of steps backward.

To test this we are going to add the "Sequence" component, in the properties window set "Repeat" to True, double click on the "Sequence1" and in the "Elements" window drag 2X "Period" to the left side, for the first period in the properties window set "Interval" to 1000, this meant that it will be activated after 1s, for the second period set in the properties window "Interval" to 10000, this meant that it will be activated after 10s.

  1. Close the "Elements" window

  2. Connect pins [Out] of both Periods to the "StepperRampEDP1" pin [start]

  3. Connect "Start1" pin [Out] to "Sequence1" pin [start]

To Use Return Type (Dir)

To Use Return Type (Dir) photo 2

To Use Return Type (Dir) photo 3

To Use Return Type (Dir) photo 4

To Use Return Type (Dir) photo 5

To Use Return Type (Dir) photo 6

Play

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project that I created for this. You can download it here and open it in Visuino: https://www.visuino.eu

Downloads

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.