Clear all

Stepper Motor Arduino Problem  


New Member
Joined: 2 months ago
Posts: 4
2020-08-19 10:56 pm  

I purchased a "TOAUTO Integrated Closed-Loop Nema23 Stepper Motor with Driver IHSS57-36-20 2Nm 36V Position Encoder for Lazer 3D Printer CNC Control" from Amazon.

I also purchased an ELEGOO UNO R3 Arduino starter kit which includes the UNO R3.

I tried following the tutorials the kit provides, but when I tried to control the "TOAUTO Nema23 Stepper Motor" with the UNO R3 it didn't rotate or anything. I connected the PUL+ and DIR+ with 4.7K resistors to pins 11 and 9 on the UNO R3. The PUL- and DIR- are connected to Ground. The motor itself is powered by a 36V power supply with a 100uf capacitor. The motor is set to 6400 steps.

I included pictures of how I wired everything.

My end goal is to make a diy gaming PC steering wheel.

The code I used is:


  Stepper Motor Control - one revolution

  This program drives a unipolar or bipolar stepper motor.
  The motor is attached to digital pins 8 - 11 of the Arduino.

  The motor should revolve one revolution in one direction, then
  one revolution in the other direction.


#include <Stepper.h>

const int stepsPerRevolution = 6400;  // change this to fit the number of steps per revolution
const int rolePerMinute = 15;         // Adjustable range of 28BYJ-48 stepper is 0~17 rpm

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 9, 11);

void setup() {
  // initialize the serial port:

void loop() {  
  // step one revolution in one direction:

  // step one revolution in the other direction:
This topic was modified 2 months ago by AndroidFTW